diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/config/default.py b/spiffworkflow-backend/src/spiffworkflow_backend/config/default.py index 8964dfad2..6395a9ddd 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/config/default.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/config/default.py @@ -187,7 +187,7 @@ SPIFFWORKFLOW_BACKEND_DATABASE_PASSWORD = environ.get("SPIFFWORKFLOW_BACKEND_DAT # ) SPIFFWORKFLOW_BACKEND_FEATURE_ELEMENT_UNITS_ENABLED = ( - environ.get("SPIFFWORKFLOW_BACKEND_FEATURE_ELEMENT_UNITS_ENABLED", default="true") == "true" + environ.get("SPIFFWORKFLOW_BACKEND_FEATURE_ELEMENT_UNITS_ENABLED", default="false") == "true" ) SPIFFWORKFLOW_BACKEND_ELEMENT_UNITS_CACHE_DIR = environ.get( diff --git a/spiffworkflow-backend/tests/data/call_activity_with_manual_task/call_activity_with_manual_task.bpmn b/spiffworkflow-backend/tests/data/call_activity_with_manual_task/call_activity_with_manual_task.bpmn new file mode 100644 index 000000000..684ba2669 --- /dev/null +++ b/spiffworkflow-backend/tests/data/call_activity_with_manual_task/call_activity_with_manual_task.bpmn @@ -0,0 +1,58 @@ + + + + + + + + Flow_1rcteeq + + + + + + Flow_1rcteeq + Flow_00q9hwt + + + Flow_1rid3w7 + + + Flow_00q9hwt + Flow_1rid3w7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spiffworkflow-backend/tests/data/call_activity_with_manual_task/callable_process.bpmn b/spiffworkflow-backend/tests/data/call_activity_with_manual_task/callable_process.bpmn new file mode 100644 index 000000000..7eb4f3d04 --- /dev/null +++ b/spiffworkflow-backend/tests/data/call_activity_with_manual_task/callable_process.bpmn @@ -0,0 +1,26 @@ + + + + + Flow_0ogjqo9 + + + Flow_0ogjqo9 + + + + + + + + + + + + + + + + + + diff --git a/spiffworkflow-backend/tests/spiffworkflow_backend/unit/test_process_instance_processor.py b/spiffworkflow-backend/tests/spiffworkflow_backend/unit/test_process_instance_processor.py index dc83f353c..8ec460935 100644 --- a/spiffworkflow-backend/tests/spiffworkflow_backend/unit/test_process_instance_processor.py +++ b/spiffworkflow-backend/tests/spiffworkflow_backend/unit/test_process_instance_processor.py @@ -893,3 +893,25 @@ class TestProcessInstanceProcessor(BaseTest): assert error_detail.task_line_number == 1 assert error_detail.task_line_contents == "hey" assert error_detail.task_trace is not None + + def test_can_complete_task_with_call_activity_after_manual_task( + self, + app: Flask, + client: FlaskClient, + with_db_and_bpmn_file_cleanup: None, + ) -> None: + process_model = load_test_spec( + process_model_id="group/call_activity_with_manual_task", + process_model_source_directory="call_activity_with_manual_task", + ) + process_instance = self.create_process_instance_from_process_model(process_model=process_model) + processor = ProcessInstanceProcessor(process_instance) + processor.do_engine_steps(save=True) + + process_instance = ProcessInstanceModel.query.filter_by(id=process_instance.id).first() + processor = ProcessInstanceProcessor(process_instance) + human_task_one = process_instance.active_human_tasks[0] + spiff_manual_task = processor.bpmn_process_instance.get_task_from_id(UUID(human_task_one.task_id)) + ProcessInstanceService.complete_form_task( + processor, spiff_manual_task, {}, process_instance.process_initiator, human_task_one + )