From 03b21accec02daec2afd9c991e3075ed47f6d8c5 Mon Sep 17 00:00:00 2001 From: Dan Funk Date: Mon, 29 Jan 2024 09:40:39 -0500 Subject: [PATCH] allow looping back in a process to create more messages - minor bug fix - didn't add what would be a complex test to this, as it was a one line change that seems an oversight in the original code. (#924) --- spiffworkflow-backend/bin/local_development_environment_setup | 2 +- .../services/workflow_execution_service.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spiffworkflow-backend/bin/local_development_environment_setup b/spiffworkflow-backend/bin/local_development_environment_setup index 32a8f057..3a2294c2 100755 --- a/spiffworkflow-backend/bin/local_development_environment_setup +++ b/spiffworkflow-backend/bin/local_development_environment_setup @@ -33,7 +33,7 @@ if [[ "$process_model_dir" == "acceptance" ]]; then export SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME=acceptance_tests.yml elif [[ "$process_model_dir" == "localopenid" ]]; then export SPIFFWORKFLOW_BACKEND_AUTH_CONFIGS__0__identifier="default" - export SPIFFWORKFLOW_BACKEND_AUTH_CONFIGS__0__label="inernal openid" + export SPIFFWORKFLOW_BACKEND_AUTH_CONFIGS__0__label="internal openid" export SPIFFWORKFLOW_BACKEND_AUTH_CONFIGS__0__uri="http://localhost:$port/openid" export SPIFFWORKFLOW_BACKEND_AUTH_CONFIGS__0__client_id="spiffworkflow-backend" export SPIFFWORKFLOW_BACKEND_AUTH_CONFIGS__0__client_secret="JXeQExm0JhQPLumgHtIIqf52bDalHz0q" diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py index 5bc3cdee..4fad1e9a 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py @@ -522,12 +522,13 @@ class WorkflowExecutionService: waiting_events = self.bpmn_process_instance.waiting_events() waiting_message_events = filter(lambda e: e.event_type == "MessageEventDefinition", waiting_events) for event in waiting_message_events: - # Ensure we are only creating one message instance for each waiting message + # Ensure we are only creating one active message instance for each waiting message if ( MessageInstanceModel.query.filter_by( process_instance_id=self.process_instance_model.id, message_type="receive", name=event.name, + status="ready", ).count() > 0 ):