This commit is contained in:
Dan 2023-02-27 14:05:00 -05:00
parent 4ca6e3f276
commit bf25c1cefb
2 changed files with 5 additions and 4 deletions

View File

@ -104,7 +104,6 @@ class MessageInstanceModel(SpiffworkflowBaseDBModel):
# Then there is nothing more to match on -- we accept any message with the given name.
return True
# Loop over the receives' correlation keys - if any of the keys fully match, then we match.
for expected_values in self.correlation_keys.values():
if self.payload_matches_expected_values(

View File

@ -1,7 +1,8 @@
"""Message_service."""
from spiffworkflow_backend.models.db import db
from spiffworkflow_backend.models.message_instance import MessageInstanceModel, MessageTypes
from spiffworkflow_backend.models.message_instance import MessageInstanceModel
from spiffworkflow_backend.models.message_instance import MessageStatuses
from spiffworkflow_backend.models.message_instance import MessageTypes
from spiffworkflow_backend.models.message_triggerable_process_model import (
MessageTriggerableProcessModel,
)
@ -42,8 +43,9 @@ class MessageService:
# Find available messages that might match
available_receive_messages = MessageInstanceModel.query.filter_by(
name=message_instance_send.name, status=MessageStatuses.ready.value,
message_type=MessageTypes.receive.value
name=message_instance_send.name,
status=MessageStatuses.ready.value,
message_type=MessageTypes.receive.value,
).all()
message_instance_receive: MessageInstanceModel | None = None
try: