Skip to content

Commit

Permalink
pyl.
Browse files Browse the repository at this point in the history
  • Loading branch information
danfunk committed Feb 6, 2025
1 parent f52c6ac commit 676e29f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def run_process_model_from_message(
try:
receiver_message = cls.correlate_send_message(message_instance, execution_mode=execution_mode)
except Exception as e:
db.session.delete(message_instance) # Here is the source of the problem
db.session.delete(message_instance) # Here is the source of the problem
db.session.commit()
raise e
if not receiver_message:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,7 @@ def test_start_process_with_message_when_failure(
client: FlaskClient,
with_db_and_bpmn_file_cleanup: None,
) -> None:
"""Assure we get a valid error when trying to start a process, and that process fails for some reason.
"""
payload = {
"customer_id": "Sartography",
"po_number": 1001,
"description": "We built a new feature for messages!",
"amount": "100.00",
}
"""Assure we get a valid error when trying to start a process, and that process fails for some reason."""

# Load up the definition for the receiving process
# It has a message start event that should cause it to fire when a unique message comes through
Expand All @@ -123,10 +116,12 @@ def test_start_process_with_message_when_failure(

# Now send in the message
user = self.find_or_create_user()
message_triggerable_process_model = MessageTriggerableProcessModel.query.filter_by(message_name="test_bad_process").first()
message_triggerable_process_model = MessageTriggerableProcessModel.query.filter_by(
message_name="test_bad_process"
).first()
assert message_triggerable_process_model is not None

message_instance = MessageInstanceModel(
MessageInstanceModel(
message_type="send",
name="test_bad_process",
payload={},
Expand All @@ -138,7 +133,6 @@ def test_start_process_with_message_when_failure(
except WorkflowExecutionServiceError as e:
assert "The process encountered and error and failed after starting." in e.notes


def test_can_send_message_to_multiple_process_models(
self,
app: Flask,
Expand Down

0 comments on commit 676e29f

Please sign in to comment.