From c11e71dd02d058571fed0b5a3d1bba2c66eac767 Mon Sep 17 00:00:00 2001 From: jasquat Date: Wed, 5 Apr 2023 14:22:37 -0400 Subject: [PATCH 1/8] WIP - not getting a keyerror with an escalation boundary event now w/ burnettk --- .../services/process_instance_processor.py | 7 +++ .../services/task_service.py | 9 +-- .../services/workflow_execution_service.py | 26 +++++++- .../cypress/pilot/pp1.cy.js | 60 ++++++++++--------- 4 files changed, 68 insertions(+), 34 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py index 864ab2d1..3b66818a 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -354,6 +354,9 @@ class CustomBpmnScriptEngine(PythonScriptEngine): # type: ignore external_methods: Optional[Dict[str, Any]] = None, ) -> Any: """_evaluate.""" + # if task.task_spec.name == 'passing_script_task': + # import pdb; pdb.set_trace() + # print("HEY2") methods = self.__get_augment_methods(task) if external_methods: methods.update(external_methods) @@ -375,6 +378,9 @@ class CustomBpmnScriptEngine(PythonScriptEngine): # type: ignore def execute(self, task: SpiffTask, script: str, external_methods: Any = None) -> None: """Execute.""" + # if task.task_spec.name == 'passing_script_task': + # import pdb; pdb.set_trace() + # print("HEY3") try: # reset failing task just in case self.failing_spiff_task = None @@ -1644,6 +1650,7 @@ class ProcessInstanceProcessor: and self._script_engine.failing_spiff_task is not None ): self._script_engine.failing_spiff_task = None + with open("do_engine_steps.json", 'w') as f: f.write(json.dumps(self.serialize(), indent=2)) @classmethod def get_tasks_with_data(cls, bpmn_process_instance: BpmnWorkflow) -> List[SpiffTask]: diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py index 8223f5be..cd0191ac 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py @@ -432,10 +432,11 @@ class TaskService: spiff_task_guid = str(spiff_task.id) if spiff_task_parent_guid in task_models: parent_task_model = task_models[spiff_task_parent_guid] - new_parent_properties_json = copy.copy(parent_task_model.properties_json) - new_parent_properties_json["children"].remove(spiff_task_guid) - parent_task_model.properties_json = new_parent_properties_json - task_models[spiff_task_parent_guid] = parent_task_model + if spiff_task_guid in parent_task_model.properties_json['children']: + new_parent_properties_json = copy.copy(parent_task_model.properties_json) + new_parent_properties_json["children"].remove(spiff_task_guid) + parent_task_model.properties_json = new_parent_properties_json + task_models[spiff_task_parent_guid] = parent_task_model @classmethod def update_task_data_on_bpmn_process( 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 5398fff4..e645a51b 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py @@ -1,5 +1,6 @@ import time from typing import Callable +import json from typing import Optional from SpiffWorkflow.bpmn.serializer.workflow import BpmnWorkflowSerializer # type: ignore @@ -71,6 +72,9 @@ class TaskModelSavingDelegate(EngineStepDelegate): def will_complete_task(self, spiff_task: SpiffTask) -> None: if self._should_update_task_model(): + # if spiff_task.task_spec.name == 'passing_script_task': + # import pdb; pdb.set_trace() + # print("HEY1") self.current_task_start_in_seconds = time.time() spiff_task.task_spec._predict(spiff_task, mask=TaskState.NOT_FINISHED_MASK) if self.secondary_engine_step_delegate: @@ -78,12 +82,17 @@ class TaskModelSavingDelegate(EngineStepDelegate): def did_complete_task(self, spiff_task: SpiffTask) -> None: if self._should_update_task_model(): + # if spiff_task.task_spec.name == 'test_process_to_call_script.BoundaryEventParent': + # import pdb; pdb.set_trace() + # print("HEY") task_model = self.task_service.update_task_model_with_spiff_task(spiff_task) if self.current_task_start_in_seconds is None: raise Exception("Could not find cached current_task_start_in_seconds. This should never have happend") task_model.start_in_seconds = self.current_task_start_in_seconds task_model.end_in_seconds = time.time() self.last_completed_spiff_task = spiff_task + # self.task_service.process_spiff_task_parent_subprocess_tasks(spiff_task) + # self.task_service.process_spiff_task_children(spiff_task) if self.secondary_engine_step_delegate: self.secondary_engine_step_delegate.did_complete_task(spiff_task) @@ -103,9 +112,20 @@ class TaskModelSavingDelegate(EngineStepDelegate): def after_engine_steps(self, bpmn_process_instance: BpmnWorkflow) -> None: if self._should_update_task_model(): - if self.last_completed_spiff_task is not None: - self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task) - self.task_service.process_spiff_task_children(self.last_completed_spiff_task) + # excludes COMPLETED. the others were required to get PP1 to go to completion. + # process FUTURE tasks because Boundary events are not processed otherwise. + for waiting_spiff_task in bpmn_process_instance.get_tasks( + TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.MAYBE | TaskState.LIKELY | TaskState.FUTURE + ): + # include PREDICTED_MASK tasks in list so we can remove them from the parent + if waiting_spiff_task._has_state(TaskState.PREDICTED_MASK): + TaskService.remove_spiff_task_from_parent(waiting_spiff_task, self.task_service.task_models) + continue + self.task_service.update_task_model_with_spiff_task(waiting_spiff_task) + + # if self.last_completed_spiff_task is not None: + # self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task) + # self.task_service.process_spiff_task_children(self.last_completed_spiff_task) def _should_update_task_model(self) -> bool: """We need to figure out if we have previously save task info on this process intance. diff --git a/spiffworkflow-frontend/cypress/pilot/pp1.cy.js b/spiffworkflow-frontend/cypress/pilot/pp1.cy.js index b713e51f..7f8ad85a 100644 --- a/spiffworkflow-frontend/cypress/pilot/pp1.cy.js +++ b/spiffworkflow-frontend/cypress/pilot/pp1.cy.js @@ -1,9 +1,13 @@ const approveWithUser = ( username, processInstanceId, - expectAdditionalApprovalInfoPage = false + expectAdditionalApprovalInfoPage = false, + password = null ) => { - cy.login(username, username); + if (!password) { + password = username; + } + cy.login(username, password); cy.visit('/admin/process-instances/find-by-id'); cy.get('#process-instance-id-input').type(processInstanceId); cy.get('button') @@ -33,22 +37,23 @@ const approveWithUser = ( describe('pp1', () => { it('can run PP1', () => { cy.login('core-a1.contributor', 'core-a1.contributor'); + // cy.login('sasha', 'sasha'); cy.visit('/'); cy.contains('Start New +').click(); - cy.contains('Raise New Demand Request'); + cy.contains('New Demand Request - Procurement').click(); cy.runPrimaryBpmnFile(true); - cy.contains('Please select the type of request to start the process.'); - // wait a second to ensure we can click the radio button - cy.wait(2000); - cy.get('input#root-procurement').click(); - cy.wait(2000); - cy.get('button') - .contains(/^Submit$/) - .click(); - cy.contains( - 'Submit a new demand request for the procurement of needed items', - { timeout: 60000 } - ); + // cy.contains('Please select the type of request to start the process.'); + // // wait a second to ensure we can click the radio button + // cy.wait(2000); + // cy.get('input#root-procurement').click(); + // cy.wait(2000); + // cy.get('button') + // .contains(/^Submit$/) + // .click(); + // cy.contains( + // 'Submit a new demand request for the procurement of needed items', + // { timeout: 60000 } + // ); cy.url().then((currentUrl) => { // if url is "/tasks/8/d37c2f0f-016a-4066-b669-e0925b759560" @@ -64,17 +69,17 @@ describe('pp1', () => { cy.get('#root_payment_method').select('Bank Transfer'); cy.get('#root_project').select('18564'); cy.get('#root_category').select('soft_and_lic'); - cy.get('button') - .contains(/^Submit$/) - .click(); - - cy.contains('Task: Enter NDR-P Items', { timeout: 60000 }); - cy.get('#root_0_sub_category').select('op_src'); - cy.get('#root_0_item').clear().type('spiffworkflow'); - cy.get('#root_0_qty').clear().type('1'); - cy.get('#root_0_currency_type').select('Fiat'); - cy.get('#root_0_currency').select('AUD'); - cy.get('#root_0_unit_price').type('100'); + // cy.get('button') + // .contains(/^Submit$/) + // .click(); + // + // cy.contains('Task: Enter NDR-P Items', { timeout: 60000 }); + cy.get('#root_item_0_sub_category').select('op_src'); + cy.get('#root_item_0_item_name').clear().type('spiffworkflow'); + cy.get('#root_item_0_qty').clear().type('1'); + cy.get('#root_item_0_currency_type').select('Fiat'); + cy.get('#root_item_0_currency').select('AUD'); + cy.get('#root_item_0_unit_price').type('100'); cy.get('button') .contains(/^Submit$/) .click(); @@ -94,7 +99,8 @@ describe('pp1', () => { approveWithUser( 'infra.project-lead', processInstanceId, - 'Task: Reminder: Request Additional Budget' + 'Task: Reminder: Request Additional Budget', + 'infra.project-leadx' ); approveWithUser('ppg.ba-a1.sme', processInstanceId); approveWithUser('security-a1.sme', processInstanceId); From 6948df3163f713670bbd999391de04eb77a7a554 Mon Sep 17 00:00:00 2001 From: jasquat Date: Wed, 5 Apr 2023 16:07:35 -0400 Subject: [PATCH 2/8] WIP - test is still passing, no longer processing all tasks w/ burnettk --- spiffworkflow-backend/do_engine_steps.json | 2713 +++++++++++++++++ spiffworkflow-backend/poetry.lock | 12 +- spiffworkflow-backend/pyproject.toml | 4 +- .../routes/process_instances_controller.py | 20 +- .../services/workflow_execution_service.py | 47 +- 5 files changed, 2773 insertions(+), 23 deletions(-) create mode 100644 spiffworkflow-backend/do_engine_steps.json diff --git a/spiffworkflow-backend/do_engine_steps.json b/spiffworkflow-backend/do_engine_steps.json new file mode 100644 index 00000000..0a98a048 --- /dev/null +++ b/spiffworkflow-backend/do_engine_steps.json @@ -0,0 +1,2713 @@ +{ + "data": { + "we_move_on": true, + "validate_only": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1, + "set_top_level_process_script_after_gate": 1 + }, + "last_task": "60263aec-e699-4c31-b138-1de108d178e3", + "success": true, + "tasks": { + "0513d774-56c2-49e3-a588-9942113dd216": { + "id": "0513d774-56c2-49e3-a588-9942113dd216", + "parent": null, + "children": [ + "e8304619-6932-48f9-8ba6-224de48fd0d7" + ], + "last_state_change": 1680725218.4451263, + "state": 32, + "task_spec": "Start", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": {} + }, + "e8304619-6932-48f9-8ba6-224de48fd0d7": { + "id": "e8304619-6932-48f9-8ba6-224de48fd0d7", + "parent": "0513d774-56c2-49e3-a588-9942113dd216", + "children": [ + "a3e7c140-23b1-45cd-892b-9bc250c004a5" + ], + "last_state_change": 1680725218.4841814, + "state": 32, + "task_spec": "StartEvent_1", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": { + "event_fired": true + }, + "data": {} + }, + "a3e7c140-23b1-45cd-892b-9bc250c004a5": { + "id": "a3e7c140-23b1-45cd-892b-9bc250c004a5", + "parent": "e8304619-6932-48f9-8ba6-224de48fd0d7", + "children": [ + "5e68cc7c-7ac0-47fa-ab00-a986b59906b0" + ], + "last_state_change": 1680725218.5034194, + "state": 32, + "task_spec": "top_level_script", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "set_in_top_level_script": 1 + } + }, + "5e68cc7c-7ac0-47fa-ab00-a986b59906b0": { + "id": "5e68cc7c-7ac0-47fa-ab00-a986b59906b0", + "parent": "a3e7c140-23b1-45cd-892b-9bc250c004a5", + "children": [ + "9e9f3fa4-796c-4900-8874-16450c11d934" + ], + "last_state_change": 1680725219.68113, + "state": 32, + "task_spec": "top_level_manual_task_one", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "set_in_top_level_script": 1 + } + }, + "9e9f3fa4-796c-4900-8874-16450c11d934": { + "id": "9e9f3fa4-796c-4900-8874-16450c11d934", + "parent": "5e68cc7c-7ac0-47fa-ab00-a986b59906b0", + "children": [ + "ff5b041e-48ae-4d8b-bfd1-baadffa36078" + ], + "last_state_change": 1680725220.9605448, + "state": 32, + "task_spec": "top_level_manual_task_two", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "set_in_top_level_script": 1 + } + }, + "ff5b041e-48ae-4d8b-bfd1-baadffa36078": { + "id": "ff5b041e-48ae-4d8b-bfd1-baadffa36078", + "parent": "9e9f3fa4-796c-4900-8874-16450c11d934", + "children": [ + "0367d28c-409e-410d-b21f-fcf497217b3f" + ], + "last_state_change": 1680725221.1420493, + "state": 32, + "task_spec": "top_level_subprocess", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + } + }, + "0367d28c-409e-410d-b21f-fcf497217b3f": { + "id": "0367d28c-409e-410d-b21f-fcf497217b3f", + "parent": "ff5b041e-48ae-4d8b-bfd1-baadffa36078", + "children": [ + "e404fe86-5a4a-4578-adf8-c9aa7c6f24c1" + ], + "last_state_change": 1680725221.593291, + "state": 32, + "task_spec": "top_level_call_activity", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "e404fe86-5a4a-4578-adf8-c9aa7c6f24c1": { + "id": "e404fe86-5a4a-4578-adf8-c9aa7c6f24c1", + "parent": "0367d28c-409e-410d-b21f-fcf497217b3f", + "children": [ + "63f3205f-726f-46e7-8e2f-e11c7f5038a1" + ], + "last_state_change": 1680725221.597673, + "state": 32, + "task_spec": "Gateway_0p8naw0", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "63f3205f-726f-46e7-8e2f-e11c7f5038a1": { + "id": "63f3205f-726f-46e7-8e2f-e11c7f5038a1", + "parent": "e404fe86-5a4a-4578-adf8-c9aa7c6f24c1", + "children": [ + "893c7fbf-5e27-42ea-8c5b-8187bbd12482" + ], + "last_state_change": 1680725223.2869363, + "state": 32, + "task_spec": "top_level_manual_task_two", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "893c7fbf-5e27-42ea-8c5b-8187bbd12482": { + "id": "893c7fbf-5e27-42ea-8c5b-8187bbd12482", + "parent": "63f3205f-726f-46e7-8e2f-e11c7f5038a1", + "children": [ + "43820fab-f4db-4b14-ae0c-b6117b61cecc" + ], + "last_state_change": 1680725223.458659, + "state": 32, + "task_spec": "top_level_subprocess", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "43820fab-f4db-4b14-ae0c-b6117b61cecc": { + "id": "43820fab-f4db-4b14-ae0c-b6117b61cecc", + "parent": "893c7fbf-5e27-42ea-8c5b-8187bbd12482", + "children": [ + "a00bfa97-7311-448a-8a28-25b3f487f553" + ], + "last_state_change": 1680725223.9229581, + "state": 32, + "task_spec": "top_level_call_activity", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "a00bfa97-7311-448a-8a28-25b3f487f553": { + "id": "a00bfa97-7311-448a-8a28-25b3f487f553", + "parent": "43820fab-f4db-4b14-ae0c-b6117b61cecc", + "children": [ + "2cc36b36-b942-4707-b1f2-4f5c5ab42561" + ], + "last_state_change": 1680725223.9272258, + "state": 32, + "task_spec": "Gateway_0p8naw0", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "2cc36b36-b942-4707-b1f2-4f5c5ab42561": { + "id": "2cc36b36-b942-4707-b1f2-4f5c5ab42561", + "parent": "a00bfa97-7311-448a-8a28-25b3f487f553", + "children": [ + "56a23f54-eeda-401b-8246-4be62a59a39c" + ], + "last_state_change": 1680725223.9336784, + "state": 32, + "task_spec": "top_level_process_script_after_gate", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1, + "set_top_level_process_script_after_gate": 1 + } + }, + "56a23f54-eeda-401b-8246-4be62a59a39c": { + "id": "56a23f54-eeda-401b-8246-4be62a59a39c", + "parent": "2cc36b36-b942-4707-b1f2-4f5c5ab42561", + "children": [ + "19b758d6-20df-4df4-b932-a5ad63c30af8" + ], + "last_state_change": 1680725223.945653, + "state": 32, + "task_spec": "end_event_of_manual_task_model", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1, + "set_top_level_process_script_after_gate": 1 + } + }, + "19b758d6-20df-4df4-b932-a5ad63c30af8": { + "id": "19b758d6-20df-4df4-b932-a5ad63c30af8", + "parent": "56a23f54-eeda-401b-8246-4be62a59a39c", + "children": [ + "60263aec-e699-4c31-b138-1de108d178e3" + ], + "last_state_change": 1680725223.9513202, + "state": 32, + "task_spec": "top_level_process.EndJoin", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1, + "set_top_level_process_script_after_gate": 1 + } + }, + "60263aec-e699-4c31-b138-1de108d178e3": { + "id": "60263aec-e699-4c31-b138-1de108d178e3", + "parent": "19b758d6-20df-4df4-b932-a5ad63c30af8", + "children": [], + "last_state_change": 1680725223.9608927, + "state": 32, + "task_spec": "End", + "triggered": false, + "workflow_name": "top_level_process", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1, + "set_top_level_process_script_after_gate": 1 + } + } + }, + "root": "0513d774-56c2-49e3-a588-9942113dd216", + "spec": { + "name": "top_level_process", + "description": "Manual Task", + "file": "manual_task_with_subprocesses.bpmn", + "task_specs": { + "End": { + "id": "top_level_process_3", + "name": "End", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "top_level_process.EndJoin" + ], + "outputs": [], + "typename": "Simple" + }, + "end_event_of_manual_task_model": { + "id": "top_level_process_12", + "name": "end_event_of_manual_task_model", + "description": "End Event Of Manual Task Model", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "top_level_process_script_after_gate" + ], + "outputs": [ + "top_level_process.EndJoin" + ], + "lane": null, + "documentation": null, + "position": { + "x": 1212.0, + "y": 159.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "event_definition": { + "internal": false, + "external": false, + "typename": "NoneEventDefinition" + }, + "typename": "EndEvent", + "extensions": {} + }, + "Gateway_0p8naw0": { + "id": "top_level_process_10", + "name": "Gateway_0p8naw0", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "top_level_call_activity" + ], + "outputs": [ + "top_level_process_script_after_gate", + "top_level_manual_task_two" + ], + "lane": null, + "documentation": null, + "position": { + "x": 1005.0, + "y": 152.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "cond_task_specs": [ + { + "condition": "we_move_on == True", + "task_spec": "top_level_process_script_after_gate" + }, + { + "condition": null, + "task_spec": "top_level_manual_task_two" + } + ], + "choice": null, + "default_task_spec": "top_level_manual_task_two", + "typename": "ExclusiveGateway", + "extensions": {} + }, + "Root": { + "id": "top_level_process_13", + "name": "Root", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [], + "outputs": [], + "typename": "Simple" + }, + "Start": { + "id": "top_level_process_1", + "name": "Start", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [], + "outputs": [ + "StartEvent_1" + ], + "typename": "StartTask" + }, + "StartEvent_1": { + "id": "top_level_process_4", + "name": "StartEvent_1", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Start" + ], + "outputs": [ + "top_level_script" + ], + "lane": null, + "documentation": null, + "position": { + "x": 179.0, + "y": 159.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "event_definition": { + "internal": false, + "external": false, + "typename": "NoneEventDefinition" + }, + "typename": "StartEvent", + "extensions": {} + }, + "top_level_call_activity": { + "id": "top_level_process_9", + "name": "top_level_call_activity", + "description": "Top Level Call Activity", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "top_level_subprocess" + ], + "outputs": [ + "Gateway_0p8naw0" + ], + "lane": null, + "documentation": null, + "position": { + "x": 870.0, + "y": 137.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "spec": "test_process_to_call", + "typename": "CallActivity", + "extensions": {} + }, + "top_level_manual_task_one": { + "id": "top_level_process_6", + "name": "top_level_manual_task_one", + "description": "Top Level Manual Task One", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "top_level_script" + ], + "outputs": [ + "top_level_manual_task_two" + ], + "lane": null, + "documentation": null, + "position": { + "x": 450.0, + "y": 137.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "typename": "ManualTask", + "extensions": {} + }, + "top_level_manual_task_two": { + "id": "top_level_process_7", + "name": "top_level_manual_task_two", + "description": "Top Level Manual Task Two", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Gateway_0p8naw0", + "top_level_manual_task_one" + ], + "outputs": [ + "top_level_subprocess" + ], + "lane": null, + "documentation": null, + "position": { + "x": 610.0, + "y": 137.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "typename": "ManualTask", + "extensions": { + "instructionsForEndUser": "## Hello" + } + }, + "top_level_process_script_after_gate": { + "id": "top_level_process_11", + "name": "top_level_process_script_after_gate", + "description": "Top Level Process Script After Gate", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Gateway_0p8naw0" + ], + "outputs": [ + "end_event_of_manual_task_model" + ], + "lane": null, + "documentation": null, + "position": { + "x": 1080.0, + "y": 137.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "script": "set_top_level_process_script_after_gate = 1", + "typename": "ScriptTask", + "extensions": {} + }, + "top_level_process.EndJoin": { + "id": "top_level_process_2", + "name": "top_level_process.EndJoin", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "end_event_of_manual_task_model" + ], + "outputs": [ + "End" + ], + "typename": "_EndJoin" + }, + "top_level_script": { + "id": "top_level_process_5", + "name": "top_level_script", + "description": "Top Level Script", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "StartEvent_1" + ], + "outputs": [ + "top_level_manual_task_one" + ], + "lane": null, + "documentation": null, + "position": { + "x": 270.0, + "y": 137.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "script": "set_in_top_level_script = 1", + "typename": "ScriptTask", + "extensions": {} + }, + "top_level_subprocess": { + "id": "top_level_process_8", + "name": "top_level_subprocess", + "description": "Top Level Subprocess", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "top_level_manual_task_two" + ], + "outputs": [ + "top_level_call_activity" + ], + "lane": null, + "documentation": null, + "position": { + "x": 740.0, + "y": 137.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "spec": "top_level_subprocess", + "typename": "SubWorkflowTask", + "extensions": {} + } + }, + "io_specification": null, + "data_objects": {}, + "correlation_keys": {}, + "typename": "BpmnProcessSpec" + }, + "subprocess_specs": { + "top_level_subprocess": { + "name": "top_level_subprocess", + "description": "Top Level Subprocess", + "file": "manual_task_with_subprocesses.bpmn", + "task_specs": { + "Start": { + "id": "top_level_subprocess_1", + "name": "Start", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [], + "outputs": [ + "Event_0g7txdo" + ], + "typename": "StartTask" + }, + "top_level_subprocess.EndJoin": { + "id": "top_level_subprocess_2", + "name": "top_level_subprocess.EndJoin", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Event_0zi0szr" + ], + "outputs": [ + "End" + ], + "typename": "_EndJoin" + }, + "End": { + "id": "top_level_subprocess_3", + "name": "End", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "top_level_subprocess.EndJoin" + ], + "outputs": [], + "typename": "Simple" + }, + "Event_0g7txdo": { + "id": "top_level_subprocess_4", + "name": "Event_0g7txdo", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Start" + ], + "outputs": [ + "top_level_subprocess_script" + ], + "lane": null, + "documentation": null, + "position": { + "x": 362.0, + "y": 132.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "event_definition": { + "internal": false, + "external": false, + "typename": "NoneEventDefinition" + }, + "typename": "StartEvent", + "extensions": {} + }, + "top_level_subprocess_script": { + "id": "top_level_subprocess_5", + "name": "top_level_subprocess_script", + "description": "Top Level Subprocess Script", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Event_0g7txdo" + ], + "outputs": [ + "Event_0zi0szr" + ], + "lane": null, + "documentation": null, + "position": { + "x": 430.0, + "y": 110.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "script": "set_in_top_level_subprocess = 1\n\ntry:\n a = set_in_test_process_to_call_script\n we_move_on = True\nexcept:\n we_move_on = False", + "typename": "ScriptTask", + "extensions": {} + }, + "Event_0zi0szr": { + "id": "top_level_subprocess_6", + "name": "Event_0zi0szr", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "top_level_subprocess_script" + ], + "outputs": [ + "top_level_subprocess.EndJoin" + ], + "lane": null, + "documentation": null, + "position": { + "x": 562.0, + "y": 132.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "event_definition": { + "internal": false, + "external": false, + "typename": "NoneEventDefinition" + }, + "typename": "EndEvent", + "extensions": {} + }, + "Root": { + "id": "top_level_subprocess_7", + "name": "Root", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [], + "outputs": [], + "typename": "Simple" + } + }, + "io_specification": null, + "data_objects": {}, + "correlation_keys": {}, + "typename": "BpmnProcessSpec" + }, + "test_process_to_call": { + "name": "test_process_to_call", + "description": "Test Process To Call", + "file": "test_process_to_call.bpmn", + "task_specs": { + "Start": { + "id": "test_process_to_call_1", + "name": "Start", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [], + "outputs": [ + "Event_0pp84tn" + ], + "typename": "StartTask" + }, + "test_process_to_call.EndJoin": { + "id": "test_process_to_call_2", + "name": "test_process_to_call.EndJoin", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Event_03zsjvn" + ], + "outputs": [ + "End" + ], + "typename": "_EndJoin" + }, + "End": { + "id": "test_process_to_call_3", + "name": "End", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "test_process_to_call.EndJoin" + ], + "outputs": [], + "typename": "Simple" + }, + "Event_0pp84tn": { + "id": "test_process_to_call_4", + "name": "Event_0pp84tn", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Start" + ], + "outputs": [ + "test_process_to_call_subprocess" + ], + "lane": null, + "documentation": null, + "position": { + "x": 162.33333333333334, + "y": 132.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "event_definition": { + "internal": false, + "external": false, + "typename": "NoneEventDefinition" + }, + "typename": "StartEvent", + "extensions": {} + }, + "test_process_to_call_subprocess": { + "id": "test_process_to_call_5", + "name": "test_process_to_call_subprocess", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Event_0pp84tn" + ], + "outputs": [ + "test_process_to_call_script.BoundaryEventParent" + ], + "lane": null, + "documentation": null, + "position": { + "x": 270.0, + "y": 110.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "spec": "test_process_to_call_subprocess", + "typename": "SubWorkflowTask", + "extensions": {} + }, + "test_process_to_call_script": { + "id": "test_process_to_call_6", + "name": "test_process_to_call_script", + "description": "Test Process To Call Script", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "test_process_to_call_script.BoundaryEventParent" + ], + "outputs": [ + "Event_03zsjvn" + ], + "lane": null, + "documentation": null, + "position": { + "x": 450.0, + "y": 110.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "script": "set_in_test_process_to_call_script = 1", + "typename": "ScriptTask", + "extensions": {} + }, + "test_process_to_call_script.BoundaryEventParent": { + "id": "test_process_to_call_7", + "name": "test_process_to_call_script.BoundaryEventParent", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "test_process_to_call_subprocess" + ], + "outputs": [ + "test_process_to_call_script", + "our_boundary_event" + ], + "lane": null, + "documentation": null, + "position": { + "x": 0, + "y": 0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "main_child_task_spec": "test_process_to_call_script", + "typename": "_BoundaryEventParent" + }, + "our_boundary_event": { + "id": "test_process_to_call_8", + "name": "our_boundary_event", + "description": "our_boundary_event", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "test_process_to_call_script.BoundaryEventParent" + ], + "outputs": [], + "lane": null, + "documentation": null, + "position": { + "x": 492.0, + "y": 172.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "event_definition": { + "internal": true, + "external": true, + "name": "None Escalation Event", + "escalation_code": null, + "typename": "EscalationEventDefinition" + }, + "cancel_activity": true, + "typename": "BoundaryEvent", + "extensions": {} + }, + "Event_03zsjvn": { + "id": "test_process_to_call_9", + "name": "Event_03zsjvn", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "test_process_to_call_script" + ], + "outputs": [ + "test_process_to_call.EndJoin" + ], + "lane": null, + "documentation": null, + "position": { + "x": 612.0, + "y": 132.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "event_definition": { + "internal": false, + "external": false, + "typename": "NoneEventDefinition" + }, + "typename": "EndEvent", + "extensions": {} + }, + "Root": { + "id": "test_process_to_call_10", + "name": "Root", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [], + "outputs": [], + "typename": "Simple" + } + }, + "io_specification": null, + "data_objects": {}, + "correlation_keys": {}, + "typename": "BpmnProcessSpec" + }, + "test_process_to_call_subprocess": { + "name": "test_process_to_call_subprocess", + "description": "test_process_to_call_subprocess", + "file": "test_process_to_call.bpmn", + "task_specs": { + "Start": { + "id": "test_process_to_call_subprocess_1", + "name": "Start", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [], + "outputs": [ + "StartEvent_1" + ], + "typename": "StartTask" + }, + "test_process_to_call_subprocess.EndJoin": { + "id": "test_process_to_call_subprocess_2", + "name": "test_process_to_call_subprocess.EndJoin", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Event_1nn875f" + ], + "outputs": [ + "End" + ], + "typename": "_EndJoin" + }, + "End": { + "id": "test_process_to_call_subprocess_3", + "name": "End", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "test_process_to_call_subprocess.EndJoin" + ], + "outputs": [], + "typename": "Simple" + }, + "StartEvent_1": { + "id": "test_process_to_call_subprocess_4", + "name": "StartEvent_1", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Start" + ], + "outputs": [ + "test_process_to_call_subprocess_subprocess" + ], + "lane": null, + "documentation": null, + "position": { + "x": 180.0, + "y": 182.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "event_definition": { + "internal": false, + "external": false, + "typename": "NoneEventDefinition" + }, + "typename": "StartEvent", + "extensions": {} + }, + "test_process_to_call_subprocess_subprocess": { + "id": "test_process_to_call_subprocess_5", + "name": "test_process_to_call_subprocess_subprocess", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "StartEvent_1" + ], + "outputs": [ + "test_process_to_call_subprocess_script" + ], + "lane": null, + "documentation": null, + "position": { + "x": 270.0, + "y": 160.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "spec": "test_process_to_call_subprocess_subprocess", + "typename": "SubWorkflowTask", + "extensions": {} + }, + "test_process_to_call_subprocess_script": { + "id": "test_process_to_call_subprocess_6", + "name": "test_process_to_call_subprocess_script", + "description": "Test Process To Call Subprocess Script", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "test_process_to_call_subprocess_subprocess" + ], + "outputs": [ + "Event_1nn875f" + ], + "lane": null, + "documentation": null, + "position": { + "x": 420.0, + "y": 160.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "script": "set_in_test_process_to_call_subprocess_script = 1", + "typename": "ScriptTask", + "extensions": {} + }, + "Event_1nn875f": { + "id": "test_process_to_call_subprocess_7", + "name": "Event_1nn875f", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "test_process_to_call_subprocess_script" + ], + "outputs": [ + "test_process_to_call_subprocess.EndJoin" + ], + "lane": null, + "documentation": null, + "position": { + "x": 562.0, + "y": 182.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "event_definition": { + "internal": false, + "external": false, + "typename": "NoneEventDefinition" + }, + "typename": "EndEvent", + "extensions": {} + }, + "Root": { + "id": "test_process_to_call_subprocess_8", + "name": "Root", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [], + "outputs": [], + "typename": "Simple" + } + }, + "io_specification": null, + "data_objects": {}, + "correlation_keys": {}, + "typename": "BpmnProcessSpec" + }, + "test_process_to_call_subprocess_subprocess": { + "name": "test_process_to_call_subprocess_subprocess", + "description": "test_process_to_call_subprocess_subprocess", + "file": "test_process_to_call.bpmn", + "task_specs": { + "Start": { + "id": "test_process_to_call_subprocess_subprocess_1", + "name": "Start", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [], + "outputs": [ + "Event_17bk1sd" + ], + "typename": "StartTask" + }, + "test_process_to_call_subprocess_subprocess.EndJoin": { + "id": "test_process_to_call_subprocess_subprocess_2", + "name": "test_process_to_call_subprocess_subprocess.EndJoin", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Event_1sec2vg" + ], + "outputs": [ + "End" + ], + "typename": "_EndJoin" + }, + "End": { + "id": "test_process_to_call_subprocess_subprocess_3", + "name": "End", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "test_process_to_call_subprocess_subprocess.EndJoin" + ], + "outputs": [], + "typename": "Simple" + }, + "Event_17bk1sd": { + "id": "test_process_to_call_subprocess_subprocess_4", + "name": "Event_17bk1sd", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Start" + ], + "outputs": [ + "test_process_to_call_subprocess_subprocess_script" + ], + "lane": null, + "documentation": null, + "position": { + "x": 262.0, + "y": 172.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "event_definition": { + "internal": false, + "external": false, + "typename": "NoneEventDefinition" + }, + "typename": "StartEvent", + "extensions": {} + }, + "test_process_to_call_subprocess_subprocess_script": { + "id": "test_process_to_call_subprocess_subprocess_5", + "name": "test_process_to_call_subprocess_subprocess_script", + "description": "Test Process To Call Subprocess Subprocess Script", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "Event_17bk1sd" + ], + "outputs": [ + "Event_1sec2vg" + ], + "lane": null, + "documentation": null, + "position": { + "x": 350.0, + "y": 150.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "prescript": null, + "postscript": null, + "script": "set_in_test_process_to_call_subprocess_subprocess_script = 1", + "typename": "ScriptTask", + "extensions": {} + }, + "Event_1sec2vg": { + "id": "test_process_to_call_subprocess_subprocess_6", + "name": "Event_1sec2vg", + "description": null, + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [ + "test_process_to_call_subprocess_subprocess_script" + ], + "outputs": [ + "test_process_to_call_subprocess_subprocess.EndJoin" + ], + "lane": null, + "documentation": null, + "position": { + "x": 502.0, + "y": 172.0 + }, + "data_input_associations": [], + "data_output_associations": [], + "io_specification": null, + "event_definition": { + "internal": false, + "external": false, + "typename": "NoneEventDefinition" + }, + "typename": "EndEvent", + "extensions": {} + }, + "Root": { + "id": "test_process_to_call_subprocess_subprocess_7", + "name": "Root", + "description": "", + "manual": false, + "internal": false, + "lookahead": 2, + "inputs": [], + "outputs": [], + "typename": "Simple" + } + }, + "io_specification": null, + "data_objects": {}, + "correlation_keys": {}, + "typename": "BpmnProcessSpec" + } + }, + "subprocesses": { + "ff5b041e-48ae-4d8b-bfd1-baadffa36078": { + "data": { + "we_move_on": false, + "validate_only": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + }, + "last_task": "fc37e2c2-71f2-4e88-8d84-ec3e66b48035", + "success": true, + "tasks": { + "e9956369-7525-4987-adad-d66e7650536c": { + "id": "e9956369-7525-4987-adad-d66e7650536c", + "parent": null, + "children": [ + "882bd93b-1d6a-4e80-9d8a-f000f2a0f185" + ], + "last_state_change": 1680725221.0173197, + "state": 32, + "task_spec": "Start", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": {}, + "data": { + "set_in_top_level_script": 1 + } + }, + "882bd93b-1d6a-4e80-9d8a-f000f2a0f185": { + "id": "882bd93b-1d6a-4e80-9d8a-f000f2a0f185", + "parent": "e9956369-7525-4987-adad-d66e7650536c", + "children": [ + "5d39b31c-7622-4185-bc81-879f381b29d8" + ], + "last_state_change": 1680725221.0694563, + "state": 32, + "task_spec": "Event_0g7txdo", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": { + "event_fired": true + }, + "data": { + "set_in_top_level_script": 1 + } + }, + "5d39b31c-7622-4185-bc81-879f381b29d8": { + "id": "5d39b31c-7622-4185-bc81-879f381b29d8", + "parent": "882bd93b-1d6a-4e80-9d8a-f000f2a0f185", + "children": [ + "74968921-9553-4da9-b792-b9ca21d9c46d" + ], + "last_state_change": 1680725221.0805776, + "state": 32, + "task_spec": "top_level_subprocess_script", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + } + }, + "74968921-9553-4da9-b792-b9ca21d9c46d": { + "id": "74968921-9553-4da9-b792-b9ca21d9c46d", + "parent": "5d39b31c-7622-4185-bc81-879f381b29d8", + "children": [ + "964bfba1-0ff8-469f-89a4-c7e0bc6e45a5" + ], + "last_state_change": 1680725221.0946558, + "state": 32, + "task_spec": "Event_0zi0szr", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + } + }, + "964bfba1-0ff8-469f-89a4-c7e0bc6e45a5": { + "id": "964bfba1-0ff8-469f-89a4-c7e0bc6e45a5", + "parent": "74968921-9553-4da9-b792-b9ca21d9c46d", + "children": [ + "fc37e2c2-71f2-4e88-8d84-ec3e66b48035" + ], + "last_state_change": 1680725221.1036508, + "state": 32, + "task_spec": "top_level_subprocess.EndJoin", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + } + }, + "fc37e2c2-71f2-4e88-8d84-ec3e66b48035": { + "id": "fc37e2c2-71f2-4e88-8d84-ec3e66b48035", + "parent": "964bfba1-0ff8-469f-89a4-c7e0bc6e45a5", + "children": [], + "last_state_change": 1680725221.1228168, + "state": 32, + "task_spec": "End", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + } + } + }, + "root": "e9956369-7525-4987-adad-d66e7650536c" + }, + "9abbb3e2-8585-44ee-a58b-e6637938bf5d": { + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + }, + "last_task": "3ea14150-2fde-40ce-b329-36819b6b51f7", + "success": true, + "tasks": { + "b44f29ad-5105-49e2-aa4c-6fb26eab0d46": { + "id": "b44f29ad-5105-49e2-aa4c-6fb26eab0d46", + "parent": null, + "children": [ + "a6576dc5-48b6-4688-a7e2-b7665a822718" + ], + "last_state_change": 1680725221.3058736, + "state": 32, + "task_spec": "Start", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + } + }, + "a6576dc5-48b6-4688-a7e2-b7665a822718": { + "id": "a6576dc5-48b6-4688-a7e2-b7665a822718", + "parent": "b44f29ad-5105-49e2-aa4c-6fb26eab0d46", + "children": [ + "231a29cf-d59d-4d07-b394-854a89c35c07" + ], + "last_state_change": 1680725221.3470109, + "state": 32, + "task_spec": "Event_17bk1sd", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": { + "event_fired": true + }, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + } + }, + "231a29cf-d59d-4d07-b394-854a89c35c07": { + "id": "231a29cf-d59d-4d07-b394-854a89c35c07", + "parent": "a6576dc5-48b6-4688-a7e2-b7665a822718", + "children": [ + "6e9b5b85-8eb2-4dbd-a611-c6662d3a90e2" + ], + "last_state_change": 1680725221.3546972, + "state": 32, + "task_spec": "test_process_to_call_subprocess_subprocess_script", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "6e9b5b85-8eb2-4dbd-a611-c6662d3a90e2": { + "id": "6e9b5b85-8eb2-4dbd-a611-c6662d3a90e2", + "parent": "231a29cf-d59d-4d07-b394-854a89c35c07", + "children": [ + "801fc46e-13d6-44f0-9ebe-fe9ef50bebfc" + ], + "last_state_change": 1680725221.3709035, + "state": 32, + "task_spec": "Event_1sec2vg", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "801fc46e-13d6-44f0-9ebe-fe9ef50bebfc": { + "id": "801fc46e-13d6-44f0-9ebe-fe9ef50bebfc", + "parent": "6e9b5b85-8eb2-4dbd-a611-c6662d3a90e2", + "children": [ + "3ea14150-2fde-40ce-b329-36819b6b51f7" + ], + "last_state_change": 1680725221.3864837, + "state": 32, + "task_spec": "test_process_to_call_subprocess_subprocess.EndJoin", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "3ea14150-2fde-40ce-b329-36819b6b51f7": { + "id": "3ea14150-2fde-40ce-b329-36819b6b51f7", + "parent": "801fc46e-13d6-44f0-9ebe-fe9ef50bebfc", + "children": [], + "last_state_change": 1680725221.4072804, + "state": 32, + "task_spec": "End", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + } + }, + "root": "b44f29ad-5105-49e2-aa4c-6fb26eab0d46" + }, + "daa30ae6-e331-45ef-b11f-d79388ba6138": { + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + }, + "last_task": "d6855542-3983-4f86-8c66-28d47dede2e1", + "success": true, + "tasks": { + "4e6114a2-70a6-431d-b51a-ccdd27a86838": { + "id": "4e6114a2-70a6-431d-b51a-ccdd27a86838", + "parent": null, + "children": [ + "0234ac86-13fe-48b5-942f-e0d8cbdea4da" + ], + "last_state_change": 1680725221.238628, + "state": 32, + "task_spec": "Start", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + } + }, + "0234ac86-13fe-48b5-942f-e0d8cbdea4da": { + "id": "0234ac86-13fe-48b5-942f-e0d8cbdea4da", + "parent": "4e6114a2-70a6-431d-b51a-ccdd27a86838", + "children": [ + "9abbb3e2-8585-44ee-a58b-e6637938bf5d" + ], + "last_state_change": 1680725221.2885888, + "state": 32, + "task_spec": "StartEvent_1", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": { + "event_fired": true + }, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + } + }, + "9abbb3e2-8585-44ee-a58b-e6637938bf5d": { + "id": "9abbb3e2-8585-44ee-a58b-e6637938bf5d", + "parent": "0234ac86-13fe-48b5-942f-e0d8cbdea4da", + "children": [ + "e145b86b-12a9-472e-a599-63d0beeda8bd" + ], + "last_state_change": 1680725221.422291, + "state": 32, + "task_spec": "test_process_to_call_subprocess_subprocess", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "e145b86b-12a9-472e-a599-63d0beeda8bd": { + "id": "e145b86b-12a9-472e-a599-63d0beeda8bd", + "parent": "9abbb3e2-8585-44ee-a58b-e6637938bf5d", + "children": [ + "8052c09f-e908-4a06-8488-be65a9eecfc6" + ], + "last_state_change": 1680725221.439058, + "state": 32, + "task_spec": "test_process_to_call_subprocess_script", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "8052c09f-e908-4a06-8488-be65a9eecfc6": { + "id": "8052c09f-e908-4a06-8488-be65a9eecfc6", + "parent": "e145b86b-12a9-472e-a599-63d0beeda8bd", + "children": [ + "e5d01370-212e-4887-9581-e1149202ce6c" + ], + "last_state_change": 1680725221.4495392, + "state": 32, + "task_spec": "Event_1nn875f", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "e5d01370-212e-4887-9581-e1149202ce6c": { + "id": "e5d01370-212e-4887-9581-e1149202ce6c", + "parent": "8052c09f-e908-4a06-8488-be65a9eecfc6", + "children": [ + "d6855542-3983-4f86-8c66-28d47dede2e1" + ], + "last_state_change": 1680725221.4713638, + "state": 32, + "task_spec": "test_process_to_call_subprocess.EndJoin", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "d6855542-3983-4f86-8c66-28d47dede2e1": { + "id": "d6855542-3983-4f86-8c66-28d47dede2e1", + "parent": "e5d01370-212e-4887-9581-e1149202ce6c", + "children": [], + "last_state_change": 1680725221.490106, + "state": 32, + "task_spec": "End", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + } + }, + "root": "4e6114a2-70a6-431d-b51a-ccdd27a86838" + }, + "0367d28c-409e-410d-b21f-fcf497217b3f": { + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + }, + "last_task": "10b942d8-08c0-46c5-9577-d552dc907d78", + "success": true, + "tasks": { + "c22bf030-740c-4cbe-8fd9-e498d4a27bbe": { + "id": "c22bf030-740c-4cbe-8fd9-e498d4a27bbe", + "parent": null, + "children": [ + "ea4a300d-2aca-44e9-87d4-bffeb253a3f0" + ], + "last_state_change": 1680725221.145972, + "state": 32, + "task_spec": "Start", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + } + }, + "ea4a300d-2aca-44e9-87d4-bffeb253a3f0": { + "id": "ea4a300d-2aca-44e9-87d4-bffeb253a3f0", + "parent": "c22bf030-740c-4cbe-8fd9-e498d4a27bbe", + "children": [ + "daa30ae6-e331-45ef-b11f-d79388ba6138" + ], + "last_state_change": 1680725221.223216, + "state": 32, + "task_spec": "Event_0pp84tn", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": { + "event_fired": true + }, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1 + } + }, + "daa30ae6-e331-45ef-b11f-d79388ba6138": { + "id": "daa30ae6-e331-45ef-b11f-d79388ba6138", + "parent": "ea4a300d-2aca-44e9-87d4-bffeb253a3f0", + "children": [ + "7d23692c-59b7-46df-8a18-454abd65a118" + ], + "last_state_change": 1680725221.5097177, + "state": 32, + "task_spec": "test_process_to_call_subprocess", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "7d23692c-59b7-46df-8a18-454abd65a118": { + "id": "7d23692c-59b7-46df-8a18-454abd65a118", + "parent": "daa30ae6-e331-45ef-b11f-d79388ba6138", + "children": [ + "b715b7e6-7424-43a5-b26c-c531b2fc66ef", + "c84052b4-90e3-4a8b-921c-1689997e7055" + ], + "last_state_change": 1680725221.5245082, + "state": 32, + "task_spec": "test_process_to_call_script.BoundaryEventParent", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "b715b7e6-7424-43a5-b26c-c531b2fc66ef": { + "id": "b715b7e6-7424-43a5-b26c-c531b2fc66ef", + "parent": "7d23692c-59b7-46df-8a18-454abd65a118", + "children": [ + "eb4e31a0-83c7-44ba-bc86-a6685094c10d" + ], + "last_state_change": 1680725221.5364208, + "state": 32, + "task_spec": "test_process_to_call_script", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "eb4e31a0-83c7-44ba-bc86-a6685094c10d": { + "id": "eb4e31a0-83c7-44ba-bc86-a6685094c10d", + "parent": "b715b7e6-7424-43a5-b26c-c531b2fc66ef", + "children": [ + "c613fa2f-c3d4-4115-8c1d-9aab02e455d8" + ], + "last_state_change": 1680725221.5442004, + "state": 32, + "task_spec": "Event_03zsjvn", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "c613fa2f-c3d4-4115-8c1d-9aab02e455d8": { + "id": "c613fa2f-c3d4-4115-8c1d-9aab02e455d8", + "parent": "eb4e31a0-83c7-44ba-bc86-a6685094c10d", + "children": [ + "10b942d8-08c0-46c5-9577-d552dc907d78" + ], + "last_state_change": 1680725221.5613053, + "state": 32, + "task_spec": "test_process_to_call.EndJoin", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "10b942d8-08c0-46c5-9577-d552dc907d78": { + "id": "10b942d8-08c0-46c5-9577-d552dc907d78", + "parent": "c613fa2f-c3d4-4115-8c1d-9aab02e455d8", + "children": [], + "last_state_change": 1680725221.5779126, + "state": 32, + "task_spec": "End", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "c84052b4-90e3-4a8b-921c-1689997e7055": { + "id": "c84052b4-90e3-4a8b-921c-1689997e7055", + "parent": "7d23692c-59b7-46df-8a18-454abd65a118", + "children": [], + "last_state_change": 1680725221.536436, + "state": 64, + "task_spec": "our_boundary_event", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": { + "event_fired": false + }, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + } + }, + "root": "c22bf030-740c-4cbe-8fd9-e498d4a27bbe" + }, + "893c7fbf-5e27-42ea-8c5b-8187bbd12482": { + "data": { + "we_move_on": true, + "validate_only": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1, + "set_top_level_process_script_after_gate": 1 + }, + "last_task": "4e3406ec-8430-41a9-92ae-80b601e65d00", + "success": true, + "tasks": { + "4dac0fd8-d054-4ad9-9077-33199daa3205": { + "id": "4dac0fd8-d054-4ad9-9077-33199daa3205", + "parent": null, + "children": [ + "58f5a0b5-3ad7-4efc-9843-e9947d9ed0bb" + ], + "last_state_change": 1680725223.2870376, + "state": 32, + "task_spec": "Root", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": {}, + "data": {} + }, + "58f5a0b5-3ad7-4efc-9843-e9947d9ed0bb": { + "id": "58f5a0b5-3ad7-4efc-9843-e9947d9ed0bb", + "parent": "4dac0fd8-d054-4ad9-9077-33199daa3205", + "children": [ + "cda6d3a1-13f2-49b3-9e8b-b27754db175a" + ], + "last_state_change": 1680725223.3415432, + "state": 32, + "task_spec": "Start", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": {}, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "cda6d3a1-13f2-49b3-9e8b-b27754db175a": { + "id": "cda6d3a1-13f2-49b3-9e8b-b27754db175a", + "parent": "58f5a0b5-3ad7-4efc-9843-e9947d9ed0bb", + "children": [ + "335bf1e8-b819-4d2d-aaeb-1deecbcd7c20" + ], + "last_state_change": 1680725223.3948019, + "state": 32, + "task_spec": "Event_0g7txdo", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": { + "event_fired": true + }, + "data": { + "we_move_on": false, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1 + } + }, + "335bf1e8-b819-4d2d-aaeb-1deecbcd7c20": { + "id": "335bf1e8-b819-4d2d-aaeb-1deecbcd7c20", + "parent": "cda6d3a1-13f2-49b3-9e8b-b27754db175a", + "children": [ + "39981073-934d-4294-bf3e-4f7a1da57726" + ], + "last_state_change": 1680725223.4109006, + "state": 32, + "task_spec": "top_level_subprocess_script", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "39981073-934d-4294-bf3e-4f7a1da57726": { + "id": "39981073-934d-4294-bf3e-4f7a1da57726", + "parent": "335bf1e8-b819-4d2d-aaeb-1deecbcd7c20", + "children": [ + "8144ad4f-91ee-449a-b9a0-c88bab99e851" + ], + "last_state_change": 1680725223.4217215, + "state": 32, + "task_spec": "Event_0zi0szr", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "8144ad4f-91ee-449a-b9a0-c88bab99e851": { + "id": "8144ad4f-91ee-449a-b9a0-c88bab99e851", + "parent": "39981073-934d-4294-bf3e-4f7a1da57726", + "children": [ + "4e3406ec-8430-41a9-92ae-80b601e65d00" + ], + "last_state_change": 1680725223.4292355, + "state": 32, + "task_spec": "top_level_subprocess.EndJoin", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "4e3406ec-8430-41a9-92ae-80b601e65d00": { + "id": "4e3406ec-8430-41a9-92ae-80b601e65d00", + "parent": "8144ad4f-91ee-449a-b9a0-c88bab99e851", + "children": [], + "last_state_change": 1680725223.446617, + "state": 32, + "task_spec": "End", + "triggered": false, + "workflow_name": "top_level_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + } + }, + "root": "4dac0fd8-d054-4ad9-9077-33199daa3205" + }, + "43820fab-f4db-4b14-ae0c-b6117b61cecc": { + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + }, + "last_task": "d085fc74-0e1e-49fd-9ba8-73914b8ca19d", + "success": true, + "tasks": { + "2485411e-9a55-4d4c-93ac-8b96aaae33e3": { + "id": "2485411e-9a55-4d4c-93ac-8b96aaae33e3", + "parent": null, + "children": [ + "bd49648f-a3d0-4381-b284-101ea47d8735" + ], + "last_state_change": 1680725223.4587576, + "state": 32, + "task_spec": "Root", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": {} + }, + "bd49648f-a3d0-4381-b284-101ea47d8735": { + "id": "bd49648f-a3d0-4381-b284-101ea47d8735", + "parent": "2485411e-9a55-4d4c-93ac-8b96aaae33e3", + "children": [ + "ab5db58f-2fa4-46d7-a575-c42ce8f022d0" + ], + "last_state_change": 1680725223.4633226, + "state": 32, + "task_spec": "Start", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "ab5db58f-2fa4-46d7-a575-c42ce8f022d0": { + "id": "ab5db58f-2fa4-46d7-a575-c42ce8f022d0", + "parent": "bd49648f-a3d0-4381-b284-101ea47d8735", + "children": [ + "489d6106-9f04-48b3-9abe-50f4776c6997" + ], + "last_state_change": 1680725223.5168085, + "state": 32, + "task_spec": "Event_0pp84tn", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": { + "event_fired": true + }, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "489d6106-9f04-48b3-9abe-50f4776c6997": { + "id": "489d6106-9f04-48b3-9abe-50f4776c6997", + "parent": "ab5db58f-2fa4-46d7-a575-c42ce8f022d0", + "children": [ + "17182db3-a7f0-4e92-9908-04c045b1e053" + ], + "last_state_change": 1680725223.846498, + "state": 32, + "task_spec": "test_process_to_call_subprocess", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "17182db3-a7f0-4e92-9908-04c045b1e053": { + "id": "17182db3-a7f0-4e92-9908-04c045b1e053", + "parent": "489d6106-9f04-48b3-9abe-50f4776c6997", + "children": [ + "8ac48ae8-b1d1-4082-97ce-bb57ce2d2a52", + "5a074c9b-5861-4fb8-b6f2-c6e88ec8e962" + ], + "last_state_change": 1680725223.862151, + "state": 32, + "task_spec": "test_process_to_call_script.BoundaryEventParent", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "8ac48ae8-b1d1-4082-97ce-bb57ce2d2a52": { + "id": "8ac48ae8-b1d1-4082-97ce-bb57ce2d2a52", + "parent": "17182db3-a7f0-4e92-9908-04c045b1e053", + "children": [ + "5ec76e0a-419d-40f1-a552-4e6518bef8db" + ], + "last_state_change": 1680725223.8767848, + "state": 32, + "task_spec": "test_process_to_call_script", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "5ec76e0a-419d-40f1-a552-4e6518bef8db": { + "id": "5ec76e0a-419d-40f1-a552-4e6518bef8db", + "parent": "8ac48ae8-b1d1-4082-97ce-bb57ce2d2a52", + "children": [ + "d3764dcc-bc77-4f00-a509-f9566c72d8e1" + ], + "last_state_change": 1680725223.8915474, + "state": 32, + "task_spec": "Event_03zsjvn", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "d3764dcc-bc77-4f00-a509-f9566c72d8e1": { + "id": "d3764dcc-bc77-4f00-a509-f9566c72d8e1", + "parent": "5ec76e0a-419d-40f1-a552-4e6518bef8db", + "children": [ + "d085fc74-0e1e-49fd-9ba8-73914b8ca19d" + ], + "last_state_change": 1680725223.9007602, + "state": 32, + "task_spec": "test_process_to_call.EndJoin", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "d085fc74-0e1e-49fd-9ba8-73914b8ca19d": { + "id": "d085fc74-0e1e-49fd-9ba8-73914b8ca19d", + "parent": "d3764dcc-bc77-4f00-a509-f9566c72d8e1", + "children": [], + "last_state_change": 1680725223.911509, + "state": 32, + "task_spec": "End", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "5a074c9b-5861-4fb8-b6f2-c6e88ec8e962": { + "id": "5a074c9b-5861-4fb8-b6f2-c6e88ec8e962", + "parent": "17182db3-a7f0-4e92-9908-04c045b1e053", + "children": [], + "last_state_change": 1680725223.8768175, + "state": 64, + "task_spec": "our_boundary_event", + "triggered": false, + "workflow_name": "top_level_call_activity", + "internal_data": { + "event_fired": false + }, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + } + }, + "root": "2485411e-9a55-4d4c-93ac-8b96aaae33e3" + }, + "489d6106-9f04-48b3-9abe-50f4776c6997": { + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + }, + "last_task": "188dbe4e-f2c8-4a80-949d-666ef79a2db6", + "success": true, + "tasks": { + "5cf4d5df-f3e6-4c8c-afd6-8786066fd955": { + "id": "5cf4d5df-f3e6-4c8c-afd6-8786066fd955", + "parent": null, + "children": [ + "8fa5f0cb-6ae4-435b-9a9c-82f2983f9c3e" + ], + "last_state_change": 1680725223.516868, + "state": 32, + "task_spec": "Root", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": {} + }, + "8fa5f0cb-6ae4-435b-9a9c-82f2983f9c3e": { + "id": "8fa5f0cb-6ae4-435b-9a9c-82f2983f9c3e", + "parent": "5cf4d5df-f3e6-4c8c-afd6-8786066fd955", + "children": [ + "2c8f14c9-e13d-4f3a-a4f8-f4bb187a6167" + ], + "last_state_change": 1680725223.5336301, + "state": 32, + "task_spec": "Start", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "2c8f14c9-e13d-4f3a-a4f8-f4bb187a6167": { + "id": "2c8f14c9-e13d-4f3a-a4f8-f4bb187a6167", + "parent": "8fa5f0cb-6ae4-435b-9a9c-82f2983f9c3e", + "children": [ + "d217d40d-95e1-4765-b7f1-6c6b92a6b1ef" + ], + "last_state_change": 1680725223.587554, + "state": 32, + "task_spec": "StartEvent_1", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": { + "event_fired": true + }, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "d217d40d-95e1-4765-b7f1-6c6b92a6b1ef": { + "id": "d217d40d-95e1-4765-b7f1-6c6b92a6b1ef", + "parent": "2c8f14c9-e13d-4f3a-a4f8-f4bb187a6167", + "children": [ + "653d0e86-bb93-4db7-a924-0b3fd3c4aaf1" + ], + "last_state_change": 1680725223.7672215, + "state": 32, + "task_spec": "test_process_to_call_subprocess_subprocess", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "653d0e86-bb93-4db7-a924-0b3fd3c4aaf1": { + "id": "653d0e86-bb93-4db7-a924-0b3fd3c4aaf1", + "parent": "d217d40d-95e1-4765-b7f1-6c6b92a6b1ef", + "children": [ + "6b8352bd-2ba7-4744-84e7-abb08c8abf0b" + ], + "last_state_change": 1680725223.781668, + "state": 32, + "task_spec": "test_process_to_call_subprocess_script", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "6b8352bd-2ba7-4744-84e7-abb08c8abf0b": { + "id": "6b8352bd-2ba7-4744-84e7-abb08c8abf0b", + "parent": "653d0e86-bb93-4db7-a924-0b3fd3c4aaf1", + "children": [ + "ff7ef5b3-71c8-45d9-a747-7f1a4aa09412" + ], + "last_state_change": 1680725223.7983944, + "state": 32, + "task_spec": "Event_1nn875f", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "ff7ef5b3-71c8-45d9-a747-7f1a4aa09412": { + "id": "ff7ef5b3-71c8-45d9-a747-7f1a4aa09412", + "parent": "6b8352bd-2ba7-4744-84e7-abb08c8abf0b", + "children": [ + "188dbe4e-f2c8-4a80-949d-666ef79a2db6" + ], + "last_state_change": 1680725223.8143775, + "state": 32, + "task_spec": "test_process_to_call_subprocess.EndJoin", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "188dbe4e-f2c8-4a80-949d-666ef79a2db6": { + "id": "188dbe4e-f2c8-4a80-949d-666ef79a2db6", + "parent": "ff7ef5b3-71c8-45d9-a747-7f1a4aa09412", + "children": [], + "last_state_change": 1680725223.827516, + "state": 32, + "task_spec": "End", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + } + }, + "root": "5cf4d5df-f3e6-4c8c-afd6-8786066fd955" + }, + "d217d40d-95e1-4765-b7f1-6c6b92a6b1ef": { + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + }, + "last_task": "1a2606ba-c446-4c1c-95e2-e8f9fbb5aab4", + "success": true, + "tasks": { + "54b0871d-f961-49b9-af52-13ed15b4103e": { + "id": "54b0871d-f961-49b9-af52-13ed15b4103e", + "parent": null, + "children": [ + "41c1f2fd-c9f3-483f-aa47-e24e01c0b18e" + ], + "last_state_change": 1680725223.5876448, + "state": 32, + "task_spec": "Root", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": {}, + "data": {} + }, + "41c1f2fd-c9f3-483f-aa47-e24e01c0b18e": { + "id": "41c1f2fd-c9f3-483f-aa47-e24e01c0b18e", + "parent": "54b0871d-f961-49b9-af52-13ed15b4103e", + "children": [ + "8ce0502c-7a42-485f-b68f-2eb8036239e7" + ], + "last_state_change": 1680725223.6022034, + "state": 32, + "task_spec": "Start", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "8ce0502c-7a42-485f-b68f-2eb8036239e7": { + "id": "8ce0502c-7a42-485f-b68f-2eb8036239e7", + "parent": "41c1f2fd-c9f3-483f-aa47-e24e01c0b18e", + "children": [ + "3eb0374f-1701-4161-b831-09df11b15994" + ], + "last_state_change": 1680725223.6618893, + "state": 32, + "task_spec": "Event_17bk1sd", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": { + "event_fired": true + }, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "3eb0374f-1701-4161-b831-09df11b15994": { + "id": "3eb0374f-1701-4161-b831-09df11b15994", + "parent": "8ce0502c-7a42-485f-b68f-2eb8036239e7", + "children": [ + "bca36b4f-a716-4542-ba62-a450688e2331" + ], + "last_state_change": 1680725223.6811438, + "state": 32, + "task_spec": "test_process_to_call_subprocess_subprocess_script", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "bca36b4f-a716-4542-ba62-a450688e2331": { + "id": "bca36b4f-a716-4542-ba62-a450688e2331", + "parent": "3eb0374f-1701-4161-b831-09df11b15994", + "children": [ + "b4cf731c-bc30-4eb2-8c26-e98ca271f162" + ], + "last_state_change": 1680725223.7052524, + "state": 32, + "task_spec": "Event_1sec2vg", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "b4cf731c-bc30-4eb2-8c26-e98ca271f162": { + "id": "b4cf731c-bc30-4eb2-8c26-e98ca271f162", + "parent": "bca36b4f-a716-4542-ba62-a450688e2331", + "children": [ + "1a2606ba-c446-4c1c-95e2-e8f9fbb5aab4" + ], + "last_state_change": 1680725223.727434, + "state": 32, + "task_spec": "test_process_to_call_subprocess_subprocess.EndJoin", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + }, + "1a2606ba-c446-4c1c-95e2-e8f9fbb5aab4": { + "id": "1a2606ba-c446-4c1c-95e2-e8f9fbb5aab4", + "parent": "b4cf731c-bc30-4eb2-8c26-e98ca271f162", + "children": [], + "last_state_change": 1680725223.7490516, + "state": 32, + "task_spec": "End", + "triggered": false, + "workflow_name": "test_process_to_call_subprocess_subprocess", + "internal_data": {}, + "data": { + "we_move_on": true, + "set_in_top_level_script": 1, + "set_in_top_level_subprocess": 1, + "set_in_test_process_to_call_script": 1, + "set_in_test_process_to_call_subprocess_script": 1, + "set_in_test_process_to_call_subprocess_subprocess_script": 1, + "a": 1 + } + } + }, + "root": "54b0871d-f961-49b9-af52-13ed15b4103e" + } + }, + "bpmn_messages": [], + "correlations": {} +} \ No newline at end of file diff --git a/spiffworkflow-backend/poetry.lock b/spiffworkflow-backend/poetry.lock index 0d2b81e1..9986c314 100644 --- a/spiffworkflow-backend/poetry.lock +++ b/spiffworkflow-backend/poetry.lock @@ -1875,11 +1875,11 @@ test = ["pytest"] [[package]] name = "SpiffWorkflow" version = "1.2.1" -description = "" +description = "A workflow framework and BPMN/DMN Processor" category = "main" optional = false python-versions = "*" -develop = false +develop = true [package.dependencies] celery = "*" @@ -1887,10 +1887,8 @@ configparser = "*" lxml = "*" [package.source] -type = "git" -url = "https://github.com/sartography/SpiffWorkflow" -reference = "main" -resolved_reference = "e1add839ddf2512f27cd0afe681ff3e0460d6f7a" +type = "directory" +url = "../../SpiffWorkflow" [[package]] name = "sqlalchemy" @@ -2273,7 +2271,7 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "1.1" python-versions = ">=3.9,<3.12" -content-hash = "9fea44386fbab29102a051a254058909568c4ee3dbd6a402fb91aacbcf1f7fd2" +content-hash = "c4bb5e0ce1ad140b0e5b109ab3f9f136844815bd6db8200e546d44d533050612" [metadata.files] alabaster = [ diff --git a/spiffworkflow-backend/pyproject.toml b/spiffworkflow-backend/pyproject.toml index df2495e0..9fb90b20 100644 --- a/spiffworkflow-backend/pyproject.toml +++ b/spiffworkflow-backend/pyproject.toml @@ -27,9 +27,9 @@ flask-marshmallow = "*" flask-migrate = "*" flask-restful = "*" werkzeug = "*" -SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "main"} +# SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "main"} # SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "6cad2981712bb61eca23af1adfafce02d3277cb9"} -# SpiffWorkflow = {develop = true, path = "../SpiffWorkflow" } +SpiffWorkflow = {develop = true, path = "../../SpiffWorkflow" } sentry-sdk = "^1.10" sphinx-autoapi = "^2.0" flask-bpmn = {git = "https://github.com/sartography/flask-bpmn", rev = "main"} diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py index 432bd9c4..1f647dff 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py @@ -136,15 +136,17 @@ def process_instance_run( ErrorHandlingService().handle_error(processor, e) raise e except Exception as e: - ErrorHandlingService().handle_error(processor, e) - # fixme: this is going to point someone to the wrong task - it's misinformation for errors in sub-processes - task = processor.bpmn_process_instance.last_task - raise ApiError.from_task( - error_code="unknown_exception", - message=f"An unknown error occurred. Original error: {e}", - status_code=400, - task=task, - ) from e + raise e + # import pdb; pdb.set_trace() + # ErrorHandlingService().handle_error(processor, e) + # # fixme: this is going to point someone to the wrong task - it's misinformation for errors in sub-processes + # task = processor.bpmn_process_instance.last_task + # raise ApiError.from_task( + # error_code="unknown_exception", + # message=f"An unknown error occurred. Original error: {e}", + # status_code=400, + # task=task, + # ) from e if not current_app.config["SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER"]: MessageService.correlate_all_message_instances() 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 e645a51b..7d5caabc 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py @@ -1,11 +1,13 @@ import time from typing import Callable +from typing import Set import json from typing import Optional +from uuid import UUID from SpiffWorkflow.bpmn.serializer.workflow import BpmnWorkflowSerializer # type: ignore from SpiffWorkflow.bpmn.workflow import BpmnWorkflow # type: ignore -from SpiffWorkflow.exceptions import SpiffWorkflowException # type: ignore +from SpiffWorkflow.exceptions import SpiffWorkflowException, TaskNotFoundException # type: ignore from SpiffWorkflow.task import Task as SpiffTask # type: ignore from SpiffWorkflow.task import TaskState @@ -63,6 +65,7 @@ class TaskModelSavingDelegate(EngineStepDelegate): self.current_task_start_in_seconds: Optional[float] = None self.last_completed_spiff_task: Optional[SpiffTask] = None + self.spiff_tasks_to_process: Set[UUID] = set() self.task_service = TaskService( process_instance=self.process_instance, @@ -91,6 +94,10 @@ class TaskModelSavingDelegate(EngineStepDelegate): task_model.start_in_seconds = self.current_task_start_in_seconds task_model.end_in_seconds = time.time() self.last_completed_spiff_task = spiff_task + self.spiff_tasks_to_process.add(spiff_task.id) + self._add_children(spiff_task) + self._add_parents(spiff_task) + # self.task_service.process_spiff_task_parent_subprocess_tasks(spiff_task) # self.task_service.process_spiff_task_children(spiff_task) if self.secondary_engine_step_delegate: @@ -110,18 +117,47 @@ class TaskModelSavingDelegate(EngineStepDelegate): self.secondary_engine_step_delegate.save(bpmn_process_instance, commit=False) db.session.commit() + def _add_children(self, spiff_task: SpiffTask) -> None: + for child_spiff_task in spiff_task.children: + self.spiff_tasks_to_process.add(child_spiff_task.id) + self._add_children(child_spiff_task) + + def _add_parents(self, spiff_task: SpiffTask) -> None: + if spiff_task.parent and spiff_task.parent.task_spec.name != "Root": + self.spiff_tasks_to_process.add(spiff_task.parent.id) + self._add_parents(spiff_task.parent) + def after_engine_steps(self, bpmn_process_instance: BpmnWorkflow) -> None: if self._should_update_task_model(): # excludes COMPLETED. the others were required to get PP1 to go to completion. # process FUTURE tasks because Boundary events are not processed otherwise. - for waiting_spiff_task in bpmn_process_instance.get_tasks( - TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.MAYBE | TaskState.LIKELY | TaskState.FUTURE - ): + # for waiting_spiff_task in bpmn_process_instance.get_tasks( + # TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.MAYBE | TaskState.LIKELY | TaskState.FUTURE + # ): + for spiff_task_guid in self.spiff_tasks_to_process: + if spiff_task_guid is None: + continue + try: + print(f"spiff_task_guid: {spiff_task_guid}") + waiting_spiff_task = bpmn_process_instance.get_task_from_id(spiff_task_guid) + except TaskNotFoundException: + continue + # if waiting_spiff_task.task_spec.name == 'top_level_manual_task_two': + # import pdb; pdb.set_trace() + # print("HEY42") # include PREDICTED_MASK tasks in list so we can remove them from the parent if waiting_spiff_task._has_state(TaskState.PREDICTED_MASK): TaskService.remove_spiff_task_from_parent(waiting_spiff_task, self.task_service.task_models) + for cpt in waiting_spiff_task.parent.children: + if cpt.id == waiting_spiff_task.id: + waiting_spiff_task.parent.children.remove(cpt) continue - self.task_service.update_task_model_with_spiff_task(waiting_spiff_task) + try: + self.task_service.update_task_model_with_spiff_task(waiting_spiff_task) + except Exception as ex: + import pdb; pdb.set_trace() + print("HEY16") + # self.task_service.process_spiff_task_parent_subprocess_tasks(waiting_spiff_task) # if self.last_completed_spiff_task is not None: # self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task) @@ -250,6 +286,7 @@ class WorkflowExecutionService: self.process_bpmn_messages() self.queue_waiting_receive_messages() except SpiffWorkflowException as swe: + raise swe raise ApiError.from_workflow_exception("task_error", str(swe), swe) from swe finally: From fa7c4b81e6e9ba66a8c656a75ce790e9d8b3ae0a Mon Sep 17 00:00:00 2001 From: jasquat Date: Wed, 5 Apr 2023 17:23:07 -0400 Subject: [PATCH 3/8] WIP - some tests are now passing and some are failing w/ burnettk --- spiffworkflow-backend/do_engine_steps.json | 2713 ----------------- .../services/message_service.py | 1 + .../services/process_instance_processor.py | 2 +- .../services/task_service.py | 55 +- .../services/workflow_execution_service.py | 46 +- .../integration/test_logging_service.py | 1 + 6 files changed, 63 insertions(+), 2755 deletions(-) delete mode 100644 spiffworkflow-backend/do_engine_steps.json diff --git a/spiffworkflow-backend/do_engine_steps.json b/spiffworkflow-backend/do_engine_steps.json deleted file mode 100644 index 0a98a048..00000000 --- a/spiffworkflow-backend/do_engine_steps.json +++ /dev/null @@ -1,2713 +0,0 @@ -{ - "data": { - "we_move_on": true, - "validate_only": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1, - "set_top_level_process_script_after_gate": 1 - }, - "last_task": "60263aec-e699-4c31-b138-1de108d178e3", - "success": true, - "tasks": { - "0513d774-56c2-49e3-a588-9942113dd216": { - "id": "0513d774-56c2-49e3-a588-9942113dd216", - "parent": null, - "children": [ - "e8304619-6932-48f9-8ba6-224de48fd0d7" - ], - "last_state_change": 1680725218.4451263, - "state": 32, - "task_spec": "Start", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": {} - }, - "e8304619-6932-48f9-8ba6-224de48fd0d7": { - "id": "e8304619-6932-48f9-8ba6-224de48fd0d7", - "parent": "0513d774-56c2-49e3-a588-9942113dd216", - "children": [ - "a3e7c140-23b1-45cd-892b-9bc250c004a5" - ], - "last_state_change": 1680725218.4841814, - "state": 32, - "task_spec": "StartEvent_1", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": { - "event_fired": true - }, - "data": {} - }, - "a3e7c140-23b1-45cd-892b-9bc250c004a5": { - "id": "a3e7c140-23b1-45cd-892b-9bc250c004a5", - "parent": "e8304619-6932-48f9-8ba6-224de48fd0d7", - "children": [ - "5e68cc7c-7ac0-47fa-ab00-a986b59906b0" - ], - "last_state_change": 1680725218.5034194, - "state": 32, - "task_spec": "top_level_script", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "set_in_top_level_script": 1 - } - }, - "5e68cc7c-7ac0-47fa-ab00-a986b59906b0": { - "id": "5e68cc7c-7ac0-47fa-ab00-a986b59906b0", - "parent": "a3e7c140-23b1-45cd-892b-9bc250c004a5", - "children": [ - "9e9f3fa4-796c-4900-8874-16450c11d934" - ], - "last_state_change": 1680725219.68113, - "state": 32, - "task_spec": "top_level_manual_task_one", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "set_in_top_level_script": 1 - } - }, - "9e9f3fa4-796c-4900-8874-16450c11d934": { - "id": "9e9f3fa4-796c-4900-8874-16450c11d934", - "parent": "5e68cc7c-7ac0-47fa-ab00-a986b59906b0", - "children": [ - "ff5b041e-48ae-4d8b-bfd1-baadffa36078" - ], - "last_state_change": 1680725220.9605448, - "state": 32, - "task_spec": "top_level_manual_task_two", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "set_in_top_level_script": 1 - } - }, - "ff5b041e-48ae-4d8b-bfd1-baadffa36078": { - "id": "ff5b041e-48ae-4d8b-bfd1-baadffa36078", - "parent": "9e9f3fa4-796c-4900-8874-16450c11d934", - "children": [ - "0367d28c-409e-410d-b21f-fcf497217b3f" - ], - "last_state_change": 1680725221.1420493, - "state": 32, - "task_spec": "top_level_subprocess", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - } - }, - "0367d28c-409e-410d-b21f-fcf497217b3f": { - "id": "0367d28c-409e-410d-b21f-fcf497217b3f", - "parent": "ff5b041e-48ae-4d8b-bfd1-baadffa36078", - "children": [ - "e404fe86-5a4a-4578-adf8-c9aa7c6f24c1" - ], - "last_state_change": 1680725221.593291, - "state": 32, - "task_spec": "top_level_call_activity", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "e404fe86-5a4a-4578-adf8-c9aa7c6f24c1": { - "id": "e404fe86-5a4a-4578-adf8-c9aa7c6f24c1", - "parent": "0367d28c-409e-410d-b21f-fcf497217b3f", - "children": [ - "63f3205f-726f-46e7-8e2f-e11c7f5038a1" - ], - "last_state_change": 1680725221.597673, - "state": 32, - "task_spec": "Gateway_0p8naw0", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "63f3205f-726f-46e7-8e2f-e11c7f5038a1": { - "id": "63f3205f-726f-46e7-8e2f-e11c7f5038a1", - "parent": "e404fe86-5a4a-4578-adf8-c9aa7c6f24c1", - "children": [ - "893c7fbf-5e27-42ea-8c5b-8187bbd12482" - ], - "last_state_change": 1680725223.2869363, - "state": 32, - "task_spec": "top_level_manual_task_two", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "893c7fbf-5e27-42ea-8c5b-8187bbd12482": { - "id": "893c7fbf-5e27-42ea-8c5b-8187bbd12482", - "parent": "63f3205f-726f-46e7-8e2f-e11c7f5038a1", - "children": [ - "43820fab-f4db-4b14-ae0c-b6117b61cecc" - ], - "last_state_change": 1680725223.458659, - "state": 32, - "task_spec": "top_level_subprocess", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "43820fab-f4db-4b14-ae0c-b6117b61cecc": { - "id": "43820fab-f4db-4b14-ae0c-b6117b61cecc", - "parent": "893c7fbf-5e27-42ea-8c5b-8187bbd12482", - "children": [ - "a00bfa97-7311-448a-8a28-25b3f487f553" - ], - "last_state_change": 1680725223.9229581, - "state": 32, - "task_spec": "top_level_call_activity", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "a00bfa97-7311-448a-8a28-25b3f487f553": { - "id": "a00bfa97-7311-448a-8a28-25b3f487f553", - "parent": "43820fab-f4db-4b14-ae0c-b6117b61cecc", - "children": [ - "2cc36b36-b942-4707-b1f2-4f5c5ab42561" - ], - "last_state_change": 1680725223.9272258, - "state": 32, - "task_spec": "Gateway_0p8naw0", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "2cc36b36-b942-4707-b1f2-4f5c5ab42561": { - "id": "2cc36b36-b942-4707-b1f2-4f5c5ab42561", - "parent": "a00bfa97-7311-448a-8a28-25b3f487f553", - "children": [ - "56a23f54-eeda-401b-8246-4be62a59a39c" - ], - "last_state_change": 1680725223.9336784, - "state": 32, - "task_spec": "top_level_process_script_after_gate", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1, - "set_top_level_process_script_after_gate": 1 - } - }, - "56a23f54-eeda-401b-8246-4be62a59a39c": { - "id": "56a23f54-eeda-401b-8246-4be62a59a39c", - "parent": "2cc36b36-b942-4707-b1f2-4f5c5ab42561", - "children": [ - "19b758d6-20df-4df4-b932-a5ad63c30af8" - ], - "last_state_change": 1680725223.945653, - "state": 32, - "task_spec": "end_event_of_manual_task_model", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1, - "set_top_level_process_script_after_gate": 1 - } - }, - "19b758d6-20df-4df4-b932-a5ad63c30af8": { - "id": "19b758d6-20df-4df4-b932-a5ad63c30af8", - "parent": "56a23f54-eeda-401b-8246-4be62a59a39c", - "children": [ - "60263aec-e699-4c31-b138-1de108d178e3" - ], - "last_state_change": 1680725223.9513202, - "state": 32, - "task_spec": "top_level_process.EndJoin", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1, - "set_top_level_process_script_after_gate": 1 - } - }, - "60263aec-e699-4c31-b138-1de108d178e3": { - "id": "60263aec-e699-4c31-b138-1de108d178e3", - "parent": "19b758d6-20df-4df4-b932-a5ad63c30af8", - "children": [], - "last_state_change": 1680725223.9608927, - "state": 32, - "task_spec": "End", - "triggered": false, - "workflow_name": "top_level_process", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1, - "set_top_level_process_script_after_gate": 1 - } - } - }, - "root": "0513d774-56c2-49e3-a588-9942113dd216", - "spec": { - "name": "top_level_process", - "description": "Manual Task", - "file": "manual_task_with_subprocesses.bpmn", - "task_specs": { - "End": { - "id": "top_level_process_3", - "name": "End", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "top_level_process.EndJoin" - ], - "outputs": [], - "typename": "Simple" - }, - "end_event_of_manual_task_model": { - "id": "top_level_process_12", - "name": "end_event_of_manual_task_model", - "description": "End Event Of Manual Task Model", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "top_level_process_script_after_gate" - ], - "outputs": [ - "top_level_process.EndJoin" - ], - "lane": null, - "documentation": null, - "position": { - "x": 1212.0, - "y": 159.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "event_definition": { - "internal": false, - "external": false, - "typename": "NoneEventDefinition" - }, - "typename": "EndEvent", - "extensions": {} - }, - "Gateway_0p8naw0": { - "id": "top_level_process_10", - "name": "Gateway_0p8naw0", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "top_level_call_activity" - ], - "outputs": [ - "top_level_process_script_after_gate", - "top_level_manual_task_two" - ], - "lane": null, - "documentation": null, - "position": { - "x": 1005.0, - "y": 152.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "cond_task_specs": [ - { - "condition": "we_move_on == True", - "task_spec": "top_level_process_script_after_gate" - }, - { - "condition": null, - "task_spec": "top_level_manual_task_two" - } - ], - "choice": null, - "default_task_spec": "top_level_manual_task_two", - "typename": "ExclusiveGateway", - "extensions": {} - }, - "Root": { - "id": "top_level_process_13", - "name": "Root", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [], - "outputs": [], - "typename": "Simple" - }, - "Start": { - "id": "top_level_process_1", - "name": "Start", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [], - "outputs": [ - "StartEvent_1" - ], - "typename": "StartTask" - }, - "StartEvent_1": { - "id": "top_level_process_4", - "name": "StartEvent_1", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Start" - ], - "outputs": [ - "top_level_script" - ], - "lane": null, - "documentation": null, - "position": { - "x": 179.0, - "y": 159.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "event_definition": { - "internal": false, - "external": false, - "typename": "NoneEventDefinition" - }, - "typename": "StartEvent", - "extensions": {} - }, - "top_level_call_activity": { - "id": "top_level_process_9", - "name": "top_level_call_activity", - "description": "Top Level Call Activity", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "top_level_subprocess" - ], - "outputs": [ - "Gateway_0p8naw0" - ], - "lane": null, - "documentation": null, - "position": { - "x": 870.0, - "y": 137.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "spec": "test_process_to_call", - "typename": "CallActivity", - "extensions": {} - }, - "top_level_manual_task_one": { - "id": "top_level_process_6", - "name": "top_level_manual_task_one", - "description": "Top Level Manual Task One", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "top_level_script" - ], - "outputs": [ - "top_level_manual_task_two" - ], - "lane": null, - "documentation": null, - "position": { - "x": 450.0, - "y": 137.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "typename": "ManualTask", - "extensions": {} - }, - "top_level_manual_task_two": { - "id": "top_level_process_7", - "name": "top_level_manual_task_two", - "description": "Top Level Manual Task Two", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Gateway_0p8naw0", - "top_level_manual_task_one" - ], - "outputs": [ - "top_level_subprocess" - ], - "lane": null, - "documentation": null, - "position": { - "x": 610.0, - "y": 137.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "typename": "ManualTask", - "extensions": { - "instructionsForEndUser": "## Hello" - } - }, - "top_level_process_script_after_gate": { - "id": "top_level_process_11", - "name": "top_level_process_script_after_gate", - "description": "Top Level Process Script After Gate", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Gateway_0p8naw0" - ], - "outputs": [ - "end_event_of_manual_task_model" - ], - "lane": null, - "documentation": null, - "position": { - "x": 1080.0, - "y": 137.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "script": "set_top_level_process_script_after_gate = 1", - "typename": "ScriptTask", - "extensions": {} - }, - "top_level_process.EndJoin": { - "id": "top_level_process_2", - "name": "top_level_process.EndJoin", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "end_event_of_manual_task_model" - ], - "outputs": [ - "End" - ], - "typename": "_EndJoin" - }, - "top_level_script": { - "id": "top_level_process_5", - "name": "top_level_script", - "description": "Top Level Script", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "StartEvent_1" - ], - "outputs": [ - "top_level_manual_task_one" - ], - "lane": null, - "documentation": null, - "position": { - "x": 270.0, - "y": 137.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "script": "set_in_top_level_script = 1", - "typename": "ScriptTask", - "extensions": {} - }, - "top_level_subprocess": { - "id": "top_level_process_8", - "name": "top_level_subprocess", - "description": "Top Level Subprocess", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "top_level_manual_task_two" - ], - "outputs": [ - "top_level_call_activity" - ], - "lane": null, - "documentation": null, - "position": { - "x": 740.0, - "y": 137.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "spec": "top_level_subprocess", - "typename": "SubWorkflowTask", - "extensions": {} - } - }, - "io_specification": null, - "data_objects": {}, - "correlation_keys": {}, - "typename": "BpmnProcessSpec" - }, - "subprocess_specs": { - "top_level_subprocess": { - "name": "top_level_subprocess", - "description": "Top Level Subprocess", - "file": "manual_task_with_subprocesses.bpmn", - "task_specs": { - "Start": { - "id": "top_level_subprocess_1", - "name": "Start", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [], - "outputs": [ - "Event_0g7txdo" - ], - "typename": "StartTask" - }, - "top_level_subprocess.EndJoin": { - "id": "top_level_subprocess_2", - "name": "top_level_subprocess.EndJoin", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Event_0zi0szr" - ], - "outputs": [ - "End" - ], - "typename": "_EndJoin" - }, - "End": { - "id": "top_level_subprocess_3", - "name": "End", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "top_level_subprocess.EndJoin" - ], - "outputs": [], - "typename": "Simple" - }, - "Event_0g7txdo": { - "id": "top_level_subprocess_4", - "name": "Event_0g7txdo", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Start" - ], - "outputs": [ - "top_level_subprocess_script" - ], - "lane": null, - "documentation": null, - "position": { - "x": 362.0, - "y": 132.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "event_definition": { - "internal": false, - "external": false, - "typename": "NoneEventDefinition" - }, - "typename": "StartEvent", - "extensions": {} - }, - "top_level_subprocess_script": { - "id": "top_level_subprocess_5", - "name": "top_level_subprocess_script", - "description": "Top Level Subprocess Script", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Event_0g7txdo" - ], - "outputs": [ - "Event_0zi0szr" - ], - "lane": null, - "documentation": null, - "position": { - "x": 430.0, - "y": 110.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "script": "set_in_top_level_subprocess = 1\n\ntry:\n a = set_in_test_process_to_call_script\n we_move_on = True\nexcept:\n we_move_on = False", - "typename": "ScriptTask", - "extensions": {} - }, - "Event_0zi0szr": { - "id": "top_level_subprocess_6", - "name": "Event_0zi0szr", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "top_level_subprocess_script" - ], - "outputs": [ - "top_level_subprocess.EndJoin" - ], - "lane": null, - "documentation": null, - "position": { - "x": 562.0, - "y": 132.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "event_definition": { - "internal": false, - "external": false, - "typename": "NoneEventDefinition" - }, - "typename": "EndEvent", - "extensions": {} - }, - "Root": { - "id": "top_level_subprocess_7", - "name": "Root", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [], - "outputs": [], - "typename": "Simple" - } - }, - "io_specification": null, - "data_objects": {}, - "correlation_keys": {}, - "typename": "BpmnProcessSpec" - }, - "test_process_to_call": { - "name": "test_process_to_call", - "description": "Test Process To Call", - "file": "test_process_to_call.bpmn", - "task_specs": { - "Start": { - "id": "test_process_to_call_1", - "name": "Start", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [], - "outputs": [ - "Event_0pp84tn" - ], - "typename": "StartTask" - }, - "test_process_to_call.EndJoin": { - "id": "test_process_to_call_2", - "name": "test_process_to_call.EndJoin", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Event_03zsjvn" - ], - "outputs": [ - "End" - ], - "typename": "_EndJoin" - }, - "End": { - "id": "test_process_to_call_3", - "name": "End", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "test_process_to_call.EndJoin" - ], - "outputs": [], - "typename": "Simple" - }, - "Event_0pp84tn": { - "id": "test_process_to_call_4", - "name": "Event_0pp84tn", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Start" - ], - "outputs": [ - "test_process_to_call_subprocess" - ], - "lane": null, - "documentation": null, - "position": { - "x": 162.33333333333334, - "y": 132.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "event_definition": { - "internal": false, - "external": false, - "typename": "NoneEventDefinition" - }, - "typename": "StartEvent", - "extensions": {} - }, - "test_process_to_call_subprocess": { - "id": "test_process_to_call_5", - "name": "test_process_to_call_subprocess", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Event_0pp84tn" - ], - "outputs": [ - "test_process_to_call_script.BoundaryEventParent" - ], - "lane": null, - "documentation": null, - "position": { - "x": 270.0, - "y": 110.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "spec": "test_process_to_call_subprocess", - "typename": "SubWorkflowTask", - "extensions": {} - }, - "test_process_to_call_script": { - "id": "test_process_to_call_6", - "name": "test_process_to_call_script", - "description": "Test Process To Call Script", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "test_process_to_call_script.BoundaryEventParent" - ], - "outputs": [ - "Event_03zsjvn" - ], - "lane": null, - "documentation": null, - "position": { - "x": 450.0, - "y": 110.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "script": "set_in_test_process_to_call_script = 1", - "typename": "ScriptTask", - "extensions": {} - }, - "test_process_to_call_script.BoundaryEventParent": { - "id": "test_process_to_call_7", - "name": "test_process_to_call_script.BoundaryEventParent", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "test_process_to_call_subprocess" - ], - "outputs": [ - "test_process_to_call_script", - "our_boundary_event" - ], - "lane": null, - "documentation": null, - "position": { - "x": 0, - "y": 0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "main_child_task_spec": "test_process_to_call_script", - "typename": "_BoundaryEventParent" - }, - "our_boundary_event": { - "id": "test_process_to_call_8", - "name": "our_boundary_event", - "description": "our_boundary_event", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "test_process_to_call_script.BoundaryEventParent" - ], - "outputs": [], - "lane": null, - "documentation": null, - "position": { - "x": 492.0, - "y": 172.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "event_definition": { - "internal": true, - "external": true, - "name": "None Escalation Event", - "escalation_code": null, - "typename": "EscalationEventDefinition" - }, - "cancel_activity": true, - "typename": "BoundaryEvent", - "extensions": {} - }, - "Event_03zsjvn": { - "id": "test_process_to_call_9", - "name": "Event_03zsjvn", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "test_process_to_call_script" - ], - "outputs": [ - "test_process_to_call.EndJoin" - ], - "lane": null, - "documentation": null, - "position": { - "x": 612.0, - "y": 132.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "event_definition": { - "internal": false, - "external": false, - "typename": "NoneEventDefinition" - }, - "typename": "EndEvent", - "extensions": {} - }, - "Root": { - "id": "test_process_to_call_10", - "name": "Root", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [], - "outputs": [], - "typename": "Simple" - } - }, - "io_specification": null, - "data_objects": {}, - "correlation_keys": {}, - "typename": "BpmnProcessSpec" - }, - "test_process_to_call_subprocess": { - "name": "test_process_to_call_subprocess", - "description": "test_process_to_call_subprocess", - "file": "test_process_to_call.bpmn", - "task_specs": { - "Start": { - "id": "test_process_to_call_subprocess_1", - "name": "Start", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [], - "outputs": [ - "StartEvent_1" - ], - "typename": "StartTask" - }, - "test_process_to_call_subprocess.EndJoin": { - "id": "test_process_to_call_subprocess_2", - "name": "test_process_to_call_subprocess.EndJoin", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Event_1nn875f" - ], - "outputs": [ - "End" - ], - "typename": "_EndJoin" - }, - "End": { - "id": "test_process_to_call_subprocess_3", - "name": "End", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "test_process_to_call_subprocess.EndJoin" - ], - "outputs": [], - "typename": "Simple" - }, - "StartEvent_1": { - "id": "test_process_to_call_subprocess_4", - "name": "StartEvent_1", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Start" - ], - "outputs": [ - "test_process_to_call_subprocess_subprocess" - ], - "lane": null, - "documentation": null, - "position": { - "x": 180.0, - "y": 182.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "event_definition": { - "internal": false, - "external": false, - "typename": "NoneEventDefinition" - }, - "typename": "StartEvent", - "extensions": {} - }, - "test_process_to_call_subprocess_subprocess": { - "id": "test_process_to_call_subprocess_5", - "name": "test_process_to_call_subprocess_subprocess", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "StartEvent_1" - ], - "outputs": [ - "test_process_to_call_subprocess_script" - ], - "lane": null, - "documentation": null, - "position": { - "x": 270.0, - "y": 160.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "spec": "test_process_to_call_subprocess_subprocess", - "typename": "SubWorkflowTask", - "extensions": {} - }, - "test_process_to_call_subprocess_script": { - "id": "test_process_to_call_subprocess_6", - "name": "test_process_to_call_subprocess_script", - "description": "Test Process To Call Subprocess Script", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "test_process_to_call_subprocess_subprocess" - ], - "outputs": [ - "Event_1nn875f" - ], - "lane": null, - "documentation": null, - "position": { - "x": 420.0, - "y": 160.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "script": "set_in_test_process_to_call_subprocess_script = 1", - "typename": "ScriptTask", - "extensions": {} - }, - "Event_1nn875f": { - "id": "test_process_to_call_subprocess_7", - "name": "Event_1nn875f", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "test_process_to_call_subprocess_script" - ], - "outputs": [ - "test_process_to_call_subprocess.EndJoin" - ], - "lane": null, - "documentation": null, - "position": { - "x": 562.0, - "y": 182.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "event_definition": { - "internal": false, - "external": false, - "typename": "NoneEventDefinition" - }, - "typename": "EndEvent", - "extensions": {} - }, - "Root": { - "id": "test_process_to_call_subprocess_8", - "name": "Root", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [], - "outputs": [], - "typename": "Simple" - } - }, - "io_specification": null, - "data_objects": {}, - "correlation_keys": {}, - "typename": "BpmnProcessSpec" - }, - "test_process_to_call_subprocess_subprocess": { - "name": "test_process_to_call_subprocess_subprocess", - "description": "test_process_to_call_subprocess_subprocess", - "file": "test_process_to_call.bpmn", - "task_specs": { - "Start": { - "id": "test_process_to_call_subprocess_subprocess_1", - "name": "Start", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [], - "outputs": [ - "Event_17bk1sd" - ], - "typename": "StartTask" - }, - "test_process_to_call_subprocess_subprocess.EndJoin": { - "id": "test_process_to_call_subprocess_subprocess_2", - "name": "test_process_to_call_subprocess_subprocess.EndJoin", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Event_1sec2vg" - ], - "outputs": [ - "End" - ], - "typename": "_EndJoin" - }, - "End": { - "id": "test_process_to_call_subprocess_subprocess_3", - "name": "End", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "test_process_to_call_subprocess_subprocess.EndJoin" - ], - "outputs": [], - "typename": "Simple" - }, - "Event_17bk1sd": { - "id": "test_process_to_call_subprocess_subprocess_4", - "name": "Event_17bk1sd", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Start" - ], - "outputs": [ - "test_process_to_call_subprocess_subprocess_script" - ], - "lane": null, - "documentation": null, - "position": { - "x": 262.0, - "y": 172.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "event_definition": { - "internal": false, - "external": false, - "typename": "NoneEventDefinition" - }, - "typename": "StartEvent", - "extensions": {} - }, - "test_process_to_call_subprocess_subprocess_script": { - "id": "test_process_to_call_subprocess_subprocess_5", - "name": "test_process_to_call_subprocess_subprocess_script", - "description": "Test Process To Call Subprocess Subprocess Script", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "Event_17bk1sd" - ], - "outputs": [ - "Event_1sec2vg" - ], - "lane": null, - "documentation": null, - "position": { - "x": 350.0, - "y": 150.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "prescript": null, - "postscript": null, - "script": "set_in_test_process_to_call_subprocess_subprocess_script = 1", - "typename": "ScriptTask", - "extensions": {} - }, - "Event_1sec2vg": { - "id": "test_process_to_call_subprocess_subprocess_6", - "name": "Event_1sec2vg", - "description": null, - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [ - "test_process_to_call_subprocess_subprocess_script" - ], - "outputs": [ - "test_process_to_call_subprocess_subprocess.EndJoin" - ], - "lane": null, - "documentation": null, - "position": { - "x": 502.0, - "y": 172.0 - }, - "data_input_associations": [], - "data_output_associations": [], - "io_specification": null, - "event_definition": { - "internal": false, - "external": false, - "typename": "NoneEventDefinition" - }, - "typename": "EndEvent", - "extensions": {} - }, - "Root": { - "id": "test_process_to_call_subprocess_subprocess_7", - "name": "Root", - "description": "", - "manual": false, - "internal": false, - "lookahead": 2, - "inputs": [], - "outputs": [], - "typename": "Simple" - } - }, - "io_specification": null, - "data_objects": {}, - "correlation_keys": {}, - "typename": "BpmnProcessSpec" - } - }, - "subprocesses": { - "ff5b041e-48ae-4d8b-bfd1-baadffa36078": { - "data": { - "we_move_on": false, - "validate_only": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - }, - "last_task": "fc37e2c2-71f2-4e88-8d84-ec3e66b48035", - "success": true, - "tasks": { - "e9956369-7525-4987-adad-d66e7650536c": { - "id": "e9956369-7525-4987-adad-d66e7650536c", - "parent": null, - "children": [ - "882bd93b-1d6a-4e80-9d8a-f000f2a0f185" - ], - "last_state_change": 1680725221.0173197, - "state": 32, - "task_spec": "Start", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": {}, - "data": { - "set_in_top_level_script": 1 - } - }, - "882bd93b-1d6a-4e80-9d8a-f000f2a0f185": { - "id": "882bd93b-1d6a-4e80-9d8a-f000f2a0f185", - "parent": "e9956369-7525-4987-adad-d66e7650536c", - "children": [ - "5d39b31c-7622-4185-bc81-879f381b29d8" - ], - "last_state_change": 1680725221.0694563, - "state": 32, - "task_spec": "Event_0g7txdo", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": { - "event_fired": true - }, - "data": { - "set_in_top_level_script": 1 - } - }, - "5d39b31c-7622-4185-bc81-879f381b29d8": { - "id": "5d39b31c-7622-4185-bc81-879f381b29d8", - "parent": "882bd93b-1d6a-4e80-9d8a-f000f2a0f185", - "children": [ - "74968921-9553-4da9-b792-b9ca21d9c46d" - ], - "last_state_change": 1680725221.0805776, - "state": 32, - "task_spec": "top_level_subprocess_script", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - } - }, - "74968921-9553-4da9-b792-b9ca21d9c46d": { - "id": "74968921-9553-4da9-b792-b9ca21d9c46d", - "parent": "5d39b31c-7622-4185-bc81-879f381b29d8", - "children": [ - "964bfba1-0ff8-469f-89a4-c7e0bc6e45a5" - ], - "last_state_change": 1680725221.0946558, - "state": 32, - "task_spec": "Event_0zi0szr", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - } - }, - "964bfba1-0ff8-469f-89a4-c7e0bc6e45a5": { - "id": "964bfba1-0ff8-469f-89a4-c7e0bc6e45a5", - "parent": "74968921-9553-4da9-b792-b9ca21d9c46d", - "children": [ - "fc37e2c2-71f2-4e88-8d84-ec3e66b48035" - ], - "last_state_change": 1680725221.1036508, - "state": 32, - "task_spec": "top_level_subprocess.EndJoin", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - } - }, - "fc37e2c2-71f2-4e88-8d84-ec3e66b48035": { - "id": "fc37e2c2-71f2-4e88-8d84-ec3e66b48035", - "parent": "964bfba1-0ff8-469f-89a4-c7e0bc6e45a5", - "children": [], - "last_state_change": 1680725221.1228168, - "state": 32, - "task_spec": "End", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - } - } - }, - "root": "e9956369-7525-4987-adad-d66e7650536c" - }, - "9abbb3e2-8585-44ee-a58b-e6637938bf5d": { - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - }, - "last_task": "3ea14150-2fde-40ce-b329-36819b6b51f7", - "success": true, - "tasks": { - "b44f29ad-5105-49e2-aa4c-6fb26eab0d46": { - "id": "b44f29ad-5105-49e2-aa4c-6fb26eab0d46", - "parent": null, - "children": [ - "a6576dc5-48b6-4688-a7e2-b7665a822718" - ], - "last_state_change": 1680725221.3058736, - "state": 32, - "task_spec": "Start", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - } - }, - "a6576dc5-48b6-4688-a7e2-b7665a822718": { - "id": "a6576dc5-48b6-4688-a7e2-b7665a822718", - "parent": "b44f29ad-5105-49e2-aa4c-6fb26eab0d46", - "children": [ - "231a29cf-d59d-4d07-b394-854a89c35c07" - ], - "last_state_change": 1680725221.3470109, - "state": 32, - "task_spec": "Event_17bk1sd", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": { - "event_fired": true - }, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - } - }, - "231a29cf-d59d-4d07-b394-854a89c35c07": { - "id": "231a29cf-d59d-4d07-b394-854a89c35c07", - "parent": "a6576dc5-48b6-4688-a7e2-b7665a822718", - "children": [ - "6e9b5b85-8eb2-4dbd-a611-c6662d3a90e2" - ], - "last_state_change": 1680725221.3546972, - "state": 32, - "task_spec": "test_process_to_call_subprocess_subprocess_script", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "6e9b5b85-8eb2-4dbd-a611-c6662d3a90e2": { - "id": "6e9b5b85-8eb2-4dbd-a611-c6662d3a90e2", - "parent": "231a29cf-d59d-4d07-b394-854a89c35c07", - "children": [ - "801fc46e-13d6-44f0-9ebe-fe9ef50bebfc" - ], - "last_state_change": 1680725221.3709035, - "state": 32, - "task_spec": "Event_1sec2vg", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "801fc46e-13d6-44f0-9ebe-fe9ef50bebfc": { - "id": "801fc46e-13d6-44f0-9ebe-fe9ef50bebfc", - "parent": "6e9b5b85-8eb2-4dbd-a611-c6662d3a90e2", - "children": [ - "3ea14150-2fde-40ce-b329-36819b6b51f7" - ], - "last_state_change": 1680725221.3864837, - "state": 32, - "task_spec": "test_process_to_call_subprocess_subprocess.EndJoin", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "3ea14150-2fde-40ce-b329-36819b6b51f7": { - "id": "3ea14150-2fde-40ce-b329-36819b6b51f7", - "parent": "801fc46e-13d6-44f0-9ebe-fe9ef50bebfc", - "children": [], - "last_state_change": 1680725221.4072804, - "state": 32, - "task_spec": "End", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - } - }, - "root": "b44f29ad-5105-49e2-aa4c-6fb26eab0d46" - }, - "daa30ae6-e331-45ef-b11f-d79388ba6138": { - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - }, - "last_task": "d6855542-3983-4f86-8c66-28d47dede2e1", - "success": true, - "tasks": { - "4e6114a2-70a6-431d-b51a-ccdd27a86838": { - "id": "4e6114a2-70a6-431d-b51a-ccdd27a86838", - "parent": null, - "children": [ - "0234ac86-13fe-48b5-942f-e0d8cbdea4da" - ], - "last_state_change": 1680725221.238628, - "state": 32, - "task_spec": "Start", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - } - }, - "0234ac86-13fe-48b5-942f-e0d8cbdea4da": { - "id": "0234ac86-13fe-48b5-942f-e0d8cbdea4da", - "parent": "4e6114a2-70a6-431d-b51a-ccdd27a86838", - "children": [ - "9abbb3e2-8585-44ee-a58b-e6637938bf5d" - ], - "last_state_change": 1680725221.2885888, - "state": 32, - "task_spec": "StartEvent_1", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": { - "event_fired": true - }, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - } - }, - "9abbb3e2-8585-44ee-a58b-e6637938bf5d": { - "id": "9abbb3e2-8585-44ee-a58b-e6637938bf5d", - "parent": "0234ac86-13fe-48b5-942f-e0d8cbdea4da", - "children": [ - "e145b86b-12a9-472e-a599-63d0beeda8bd" - ], - "last_state_change": 1680725221.422291, - "state": 32, - "task_spec": "test_process_to_call_subprocess_subprocess", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "e145b86b-12a9-472e-a599-63d0beeda8bd": { - "id": "e145b86b-12a9-472e-a599-63d0beeda8bd", - "parent": "9abbb3e2-8585-44ee-a58b-e6637938bf5d", - "children": [ - "8052c09f-e908-4a06-8488-be65a9eecfc6" - ], - "last_state_change": 1680725221.439058, - "state": 32, - "task_spec": "test_process_to_call_subprocess_script", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "8052c09f-e908-4a06-8488-be65a9eecfc6": { - "id": "8052c09f-e908-4a06-8488-be65a9eecfc6", - "parent": "e145b86b-12a9-472e-a599-63d0beeda8bd", - "children": [ - "e5d01370-212e-4887-9581-e1149202ce6c" - ], - "last_state_change": 1680725221.4495392, - "state": 32, - "task_spec": "Event_1nn875f", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "e5d01370-212e-4887-9581-e1149202ce6c": { - "id": "e5d01370-212e-4887-9581-e1149202ce6c", - "parent": "8052c09f-e908-4a06-8488-be65a9eecfc6", - "children": [ - "d6855542-3983-4f86-8c66-28d47dede2e1" - ], - "last_state_change": 1680725221.4713638, - "state": 32, - "task_spec": "test_process_to_call_subprocess.EndJoin", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "d6855542-3983-4f86-8c66-28d47dede2e1": { - "id": "d6855542-3983-4f86-8c66-28d47dede2e1", - "parent": "e5d01370-212e-4887-9581-e1149202ce6c", - "children": [], - "last_state_change": 1680725221.490106, - "state": 32, - "task_spec": "End", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - } - }, - "root": "4e6114a2-70a6-431d-b51a-ccdd27a86838" - }, - "0367d28c-409e-410d-b21f-fcf497217b3f": { - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - }, - "last_task": "10b942d8-08c0-46c5-9577-d552dc907d78", - "success": true, - "tasks": { - "c22bf030-740c-4cbe-8fd9-e498d4a27bbe": { - "id": "c22bf030-740c-4cbe-8fd9-e498d4a27bbe", - "parent": null, - "children": [ - "ea4a300d-2aca-44e9-87d4-bffeb253a3f0" - ], - "last_state_change": 1680725221.145972, - "state": 32, - "task_spec": "Start", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - } - }, - "ea4a300d-2aca-44e9-87d4-bffeb253a3f0": { - "id": "ea4a300d-2aca-44e9-87d4-bffeb253a3f0", - "parent": "c22bf030-740c-4cbe-8fd9-e498d4a27bbe", - "children": [ - "daa30ae6-e331-45ef-b11f-d79388ba6138" - ], - "last_state_change": 1680725221.223216, - "state": 32, - "task_spec": "Event_0pp84tn", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": { - "event_fired": true - }, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1 - } - }, - "daa30ae6-e331-45ef-b11f-d79388ba6138": { - "id": "daa30ae6-e331-45ef-b11f-d79388ba6138", - "parent": "ea4a300d-2aca-44e9-87d4-bffeb253a3f0", - "children": [ - "7d23692c-59b7-46df-8a18-454abd65a118" - ], - "last_state_change": 1680725221.5097177, - "state": 32, - "task_spec": "test_process_to_call_subprocess", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "7d23692c-59b7-46df-8a18-454abd65a118": { - "id": "7d23692c-59b7-46df-8a18-454abd65a118", - "parent": "daa30ae6-e331-45ef-b11f-d79388ba6138", - "children": [ - "b715b7e6-7424-43a5-b26c-c531b2fc66ef", - "c84052b4-90e3-4a8b-921c-1689997e7055" - ], - "last_state_change": 1680725221.5245082, - "state": 32, - "task_spec": "test_process_to_call_script.BoundaryEventParent", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "b715b7e6-7424-43a5-b26c-c531b2fc66ef": { - "id": "b715b7e6-7424-43a5-b26c-c531b2fc66ef", - "parent": "7d23692c-59b7-46df-8a18-454abd65a118", - "children": [ - "eb4e31a0-83c7-44ba-bc86-a6685094c10d" - ], - "last_state_change": 1680725221.5364208, - "state": 32, - "task_spec": "test_process_to_call_script", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "eb4e31a0-83c7-44ba-bc86-a6685094c10d": { - "id": "eb4e31a0-83c7-44ba-bc86-a6685094c10d", - "parent": "b715b7e6-7424-43a5-b26c-c531b2fc66ef", - "children": [ - "c613fa2f-c3d4-4115-8c1d-9aab02e455d8" - ], - "last_state_change": 1680725221.5442004, - "state": 32, - "task_spec": "Event_03zsjvn", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "c613fa2f-c3d4-4115-8c1d-9aab02e455d8": { - "id": "c613fa2f-c3d4-4115-8c1d-9aab02e455d8", - "parent": "eb4e31a0-83c7-44ba-bc86-a6685094c10d", - "children": [ - "10b942d8-08c0-46c5-9577-d552dc907d78" - ], - "last_state_change": 1680725221.5613053, - "state": 32, - "task_spec": "test_process_to_call.EndJoin", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "10b942d8-08c0-46c5-9577-d552dc907d78": { - "id": "10b942d8-08c0-46c5-9577-d552dc907d78", - "parent": "c613fa2f-c3d4-4115-8c1d-9aab02e455d8", - "children": [], - "last_state_change": 1680725221.5779126, - "state": 32, - "task_spec": "End", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "c84052b4-90e3-4a8b-921c-1689997e7055": { - "id": "c84052b4-90e3-4a8b-921c-1689997e7055", - "parent": "7d23692c-59b7-46df-8a18-454abd65a118", - "children": [], - "last_state_change": 1680725221.536436, - "state": 64, - "task_spec": "our_boundary_event", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": { - "event_fired": false - }, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - } - }, - "root": "c22bf030-740c-4cbe-8fd9-e498d4a27bbe" - }, - "893c7fbf-5e27-42ea-8c5b-8187bbd12482": { - "data": { - "we_move_on": true, - "validate_only": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1, - "set_top_level_process_script_after_gate": 1 - }, - "last_task": "4e3406ec-8430-41a9-92ae-80b601e65d00", - "success": true, - "tasks": { - "4dac0fd8-d054-4ad9-9077-33199daa3205": { - "id": "4dac0fd8-d054-4ad9-9077-33199daa3205", - "parent": null, - "children": [ - "58f5a0b5-3ad7-4efc-9843-e9947d9ed0bb" - ], - "last_state_change": 1680725223.2870376, - "state": 32, - "task_spec": "Root", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": {}, - "data": {} - }, - "58f5a0b5-3ad7-4efc-9843-e9947d9ed0bb": { - "id": "58f5a0b5-3ad7-4efc-9843-e9947d9ed0bb", - "parent": "4dac0fd8-d054-4ad9-9077-33199daa3205", - "children": [ - "cda6d3a1-13f2-49b3-9e8b-b27754db175a" - ], - "last_state_change": 1680725223.3415432, - "state": 32, - "task_spec": "Start", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": {}, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "cda6d3a1-13f2-49b3-9e8b-b27754db175a": { - "id": "cda6d3a1-13f2-49b3-9e8b-b27754db175a", - "parent": "58f5a0b5-3ad7-4efc-9843-e9947d9ed0bb", - "children": [ - "335bf1e8-b819-4d2d-aaeb-1deecbcd7c20" - ], - "last_state_change": 1680725223.3948019, - "state": 32, - "task_spec": "Event_0g7txdo", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": { - "event_fired": true - }, - "data": { - "we_move_on": false, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1 - } - }, - "335bf1e8-b819-4d2d-aaeb-1deecbcd7c20": { - "id": "335bf1e8-b819-4d2d-aaeb-1deecbcd7c20", - "parent": "cda6d3a1-13f2-49b3-9e8b-b27754db175a", - "children": [ - "39981073-934d-4294-bf3e-4f7a1da57726" - ], - "last_state_change": 1680725223.4109006, - "state": 32, - "task_spec": "top_level_subprocess_script", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "39981073-934d-4294-bf3e-4f7a1da57726": { - "id": "39981073-934d-4294-bf3e-4f7a1da57726", - "parent": "335bf1e8-b819-4d2d-aaeb-1deecbcd7c20", - "children": [ - "8144ad4f-91ee-449a-b9a0-c88bab99e851" - ], - "last_state_change": 1680725223.4217215, - "state": 32, - "task_spec": "Event_0zi0szr", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "8144ad4f-91ee-449a-b9a0-c88bab99e851": { - "id": "8144ad4f-91ee-449a-b9a0-c88bab99e851", - "parent": "39981073-934d-4294-bf3e-4f7a1da57726", - "children": [ - "4e3406ec-8430-41a9-92ae-80b601e65d00" - ], - "last_state_change": 1680725223.4292355, - "state": 32, - "task_spec": "top_level_subprocess.EndJoin", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "4e3406ec-8430-41a9-92ae-80b601e65d00": { - "id": "4e3406ec-8430-41a9-92ae-80b601e65d00", - "parent": "8144ad4f-91ee-449a-b9a0-c88bab99e851", - "children": [], - "last_state_change": 1680725223.446617, - "state": 32, - "task_spec": "End", - "triggered": false, - "workflow_name": "top_level_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - } - }, - "root": "4dac0fd8-d054-4ad9-9077-33199daa3205" - }, - "43820fab-f4db-4b14-ae0c-b6117b61cecc": { - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - }, - "last_task": "d085fc74-0e1e-49fd-9ba8-73914b8ca19d", - "success": true, - "tasks": { - "2485411e-9a55-4d4c-93ac-8b96aaae33e3": { - "id": "2485411e-9a55-4d4c-93ac-8b96aaae33e3", - "parent": null, - "children": [ - "bd49648f-a3d0-4381-b284-101ea47d8735" - ], - "last_state_change": 1680725223.4587576, - "state": 32, - "task_spec": "Root", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": {} - }, - "bd49648f-a3d0-4381-b284-101ea47d8735": { - "id": "bd49648f-a3d0-4381-b284-101ea47d8735", - "parent": "2485411e-9a55-4d4c-93ac-8b96aaae33e3", - "children": [ - "ab5db58f-2fa4-46d7-a575-c42ce8f022d0" - ], - "last_state_change": 1680725223.4633226, - "state": 32, - "task_spec": "Start", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "ab5db58f-2fa4-46d7-a575-c42ce8f022d0": { - "id": "ab5db58f-2fa4-46d7-a575-c42ce8f022d0", - "parent": "bd49648f-a3d0-4381-b284-101ea47d8735", - "children": [ - "489d6106-9f04-48b3-9abe-50f4776c6997" - ], - "last_state_change": 1680725223.5168085, - "state": 32, - "task_spec": "Event_0pp84tn", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": { - "event_fired": true - }, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "489d6106-9f04-48b3-9abe-50f4776c6997": { - "id": "489d6106-9f04-48b3-9abe-50f4776c6997", - "parent": "ab5db58f-2fa4-46d7-a575-c42ce8f022d0", - "children": [ - "17182db3-a7f0-4e92-9908-04c045b1e053" - ], - "last_state_change": 1680725223.846498, - "state": 32, - "task_spec": "test_process_to_call_subprocess", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "17182db3-a7f0-4e92-9908-04c045b1e053": { - "id": "17182db3-a7f0-4e92-9908-04c045b1e053", - "parent": "489d6106-9f04-48b3-9abe-50f4776c6997", - "children": [ - "8ac48ae8-b1d1-4082-97ce-bb57ce2d2a52", - "5a074c9b-5861-4fb8-b6f2-c6e88ec8e962" - ], - "last_state_change": 1680725223.862151, - "state": 32, - "task_spec": "test_process_to_call_script.BoundaryEventParent", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "8ac48ae8-b1d1-4082-97ce-bb57ce2d2a52": { - "id": "8ac48ae8-b1d1-4082-97ce-bb57ce2d2a52", - "parent": "17182db3-a7f0-4e92-9908-04c045b1e053", - "children": [ - "5ec76e0a-419d-40f1-a552-4e6518bef8db" - ], - "last_state_change": 1680725223.8767848, - "state": 32, - "task_spec": "test_process_to_call_script", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "5ec76e0a-419d-40f1-a552-4e6518bef8db": { - "id": "5ec76e0a-419d-40f1-a552-4e6518bef8db", - "parent": "8ac48ae8-b1d1-4082-97ce-bb57ce2d2a52", - "children": [ - "d3764dcc-bc77-4f00-a509-f9566c72d8e1" - ], - "last_state_change": 1680725223.8915474, - "state": 32, - "task_spec": "Event_03zsjvn", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "d3764dcc-bc77-4f00-a509-f9566c72d8e1": { - "id": "d3764dcc-bc77-4f00-a509-f9566c72d8e1", - "parent": "5ec76e0a-419d-40f1-a552-4e6518bef8db", - "children": [ - "d085fc74-0e1e-49fd-9ba8-73914b8ca19d" - ], - "last_state_change": 1680725223.9007602, - "state": 32, - "task_spec": "test_process_to_call.EndJoin", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "d085fc74-0e1e-49fd-9ba8-73914b8ca19d": { - "id": "d085fc74-0e1e-49fd-9ba8-73914b8ca19d", - "parent": "d3764dcc-bc77-4f00-a509-f9566c72d8e1", - "children": [], - "last_state_change": 1680725223.911509, - "state": 32, - "task_spec": "End", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "5a074c9b-5861-4fb8-b6f2-c6e88ec8e962": { - "id": "5a074c9b-5861-4fb8-b6f2-c6e88ec8e962", - "parent": "17182db3-a7f0-4e92-9908-04c045b1e053", - "children": [], - "last_state_change": 1680725223.8768175, - "state": 64, - "task_spec": "our_boundary_event", - "triggered": false, - "workflow_name": "top_level_call_activity", - "internal_data": { - "event_fired": false - }, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - } - }, - "root": "2485411e-9a55-4d4c-93ac-8b96aaae33e3" - }, - "489d6106-9f04-48b3-9abe-50f4776c6997": { - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - }, - "last_task": "188dbe4e-f2c8-4a80-949d-666ef79a2db6", - "success": true, - "tasks": { - "5cf4d5df-f3e6-4c8c-afd6-8786066fd955": { - "id": "5cf4d5df-f3e6-4c8c-afd6-8786066fd955", - "parent": null, - "children": [ - "8fa5f0cb-6ae4-435b-9a9c-82f2983f9c3e" - ], - "last_state_change": 1680725223.516868, - "state": 32, - "task_spec": "Root", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": {} - }, - "8fa5f0cb-6ae4-435b-9a9c-82f2983f9c3e": { - "id": "8fa5f0cb-6ae4-435b-9a9c-82f2983f9c3e", - "parent": "5cf4d5df-f3e6-4c8c-afd6-8786066fd955", - "children": [ - "2c8f14c9-e13d-4f3a-a4f8-f4bb187a6167" - ], - "last_state_change": 1680725223.5336301, - "state": 32, - "task_spec": "Start", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "2c8f14c9-e13d-4f3a-a4f8-f4bb187a6167": { - "id": "2c8f14c9-e13d-4f3a-a4f8-f4bb187a6167", - "parent": "8fa5f0cb-6ae4-435b-9a9c-82f2983f9c3e", - "children": [ - "d217d40d-95e1-4765-b7f1-6c6b92a6b1ef" - ], - "last_state_change": 1680725223.587554, - "state": 32, - "task_spec": "StartEvent_1", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": { - "event_fired": true - }, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "d217d40d-95e1-4765-b7f1-6c6b92a6b1ef": { - "id": "d217d40d-95e1-4765-b7f1-6c6b92a6b1ef", - "parent": "2c8f14c9-e13d-4f3a-a4f8-f4bb187a6167", - "children": [ - "653d0e86-bb93-4db7-a924-0b3fd3c4aaf1" - ], - "last_state_change": 1680725223.7672215, - "state": 32, - "task_spec": "test_process_to_call_subprocess_subprocess", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "653d0e86-bb93-4db7-a924-0b3fd3c4aaf1": { - "id": "653d0e86-bb93-4db7-a924-0b3fd3c4aaf1", - "parent": "d217d40d-95e1-4765-b7f1-6c6b92a6b1ef", - "children": [ - "6b8352bd-2ba7-4744-84e7-abb08c8abf0b" - ], - "last_state_change": 1680725223.781668, - "state": 32, - "task_spec": "test_process_to_call_subprocess_script", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "6b8352bd-2ba7-4744-84e7-abb08c8abf0b": { - "id": "6b8352bd-2ba7-4744-84e7-abb08c8abf0b", - "parent": "653d0e86-bb93-4db7-a924-0b3fd3c4aaf1", - "children": [ - "ff7ef5b3-71c8-45d9-a747-7f1a4aa09412" - ], - "last_state_change": 1680725223.7983944, - "state": 32, - "task_spec": "Event_1nn875f", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "ff7ef5b3-71c8-45d9-a747-7f1a4aa09412": { - "id": "ff7ef5b3-71c8-45d9-a747-7f1a4aa09412", - "parent": "6b8352bd-2ba7-4744-84e7-abb08c8abf0b", - "children": [ - "188dbe4e-f2c8-4a80-949d-666ef79a2db6" - ], - "last_state_change": 1680725223.8143775, - "state": 32, - "task_spec": "test_process_to_call_subprocess.EndJoin", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "188dbe4e-f2c8-4a80-949d-666ef79a2db6": { - "id": "188dbe4e-f2c8-4a80-949d-666ef79a2db6", - "parent": "ff7ef5b3-71c8-45d9-a747-7f1a4aa09412", - "children": [], - "last_state_change": 1680725223.827516, - "state": 32, - "task_spec": "End", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - } - }, - "root": "5cf4d5df-f3e6-4c8c-afd6-8786066fd955" - }, - "d217d40d-95e1-4765-b7f1-6c6b92a6b1ef": { - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - }, - "last_task": "1a2606ba-c446-4c1c-95e2-e8f9fbb5aab4", - "success": true, - "tasks": { - "54b0871d-f961-49b9-af52-13ed15b4103e": { - "id": "54b0871d-f961-49b9-af52-13ed15b4103e", - "parent": null, - "children": [ - "41c1f2fd-c9f3-483f-aa47-e24e01c0b18e" - ], - "last_state_change": 1680725223.5876448, - "state": 32, - "task_spec": "Root", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": {}, - "data": {} - }, - "41c1f2fd-c9f3-483f-aa47-e24e01c0b18e": { - "id": "41c1f2fd-c9f3-483f-aa47-e24e01c0b18e", - "parent": "54b0871d-f961-49b9-af52-13ed15b4103e", - "children": [ - "8ce0502c-7a42-485f-b68f-2eb8036239e7" - ], - "last_state_change": 1680725223.6022034, - "state": 32, - "task_spec": "Start", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "8ce0502c-7a42-485f-b68f-2eb8036239e7": { - "id": "8ce0502c-7a42-485f-b68f-2eb8036239e7", - "parent": "41c1f2fd-c9f3-483f-aa47-e24e01c0b18e", - "children": [ - "3eb0374f-1701-4161-b831-09df11b15994" - ], - "last_state_change": 1680725223.6618893, - "state": 32, - "task_spec": "Event_17bk1sd", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": { - "event_fired": true - }, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "3eb0374f-1701-4161-b831-09df11b15994": { - "id": "3eb0374f-1701-4161-b831-09df11b15994", - "parent": "8ce0502c-7a42-485f-b68f-2eb8036239e7", - "children": [ - "bca36b4f-a716-4542-ba62-a450688e2331" - ], - "last_state_change": 1680725223.6811438, - "state": 32, - "task_spec": "test_process_to_call_subprocess_subprocess_script", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "bca36b4f-a716-4542-ba62-a450688e2331": { - "id": "bca36b4f-a716-4542-ba62-a450688e2331", - "parent": "3eb0374f-1701-4161-b831-09df11b15994", - "children": [ - "b4cf731c-bc30-4eb2-8c26-e98ca271f162" - ], - "last_state_change": 1680725223.7052524, - "state": 32, - "task_spec": "Event_1sec2vg", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "b4cf731c-bc30-4eb2-8c26-e98ca271f162": { - "id": "b4cf731c-bc30-4eb2-8c26-e98ca271f162", - "parent": "bca36b4f-a716-4542-ba62-a450688e2331", - "children": [ - "1a2606ba-c446-4c1c-95e2-e8f9fbb5aab4" - ], - "last_state_change": 1680725223.727434, - "state": 32, - "task_spec": "test_process_to_call_subprocess_subprocess.EndJoin", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - }, - "1a2606ba-c446-4c1c-95e2-e8f9fbb5aab4": { - "id": "1a2606ba-c446-4c1c-95e2-e8f9fbb5aab4", - "parent": "b4cf731c-bc30-4eb2-8c26-e98ca271f162", - "children": [], - "last_state_change": 1680725223.7490516, - "state": 32, - "task_spec": "End", - "triggered": false, - "workflow_name": "test_process_to_call_subprocess_subprocess", - "internal_data": {}, - "data": { - "we_move_on": true, - "set_in_top_level_script": 1, - "set_in_top_level_subprocess": 1, - "set_in_test_process_to_call_script": 1, - "set_in_test_process_to_call_subprocess_script": 1, - "set_in_test_process_to_call_subprocess_subprocess_script": 1, - "a": 1 - } - } - }, - "root": "54b0871d-f961-49b9-af52-13ed15b4103e" - } - }, - "bpmn_messages": [], - "correlations": {} -} \ No newline at end of file diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py index 7e52561e..c560b284 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py @@ -159,6 +159,7 @@ class MessageService: ) -> None: """process_message_receive.""" processor_receive = ProcessInstanceProcessor(process_instance_receive) + # import pdb; pdb.set_trace() processor_receive.bpmn_process_instance.catch_bpmn_message(message_model_name, message_payload) processor_receive.do_engine_steps(save=True) message_instance_receive.status = MessageStatuses.completed.value diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py index 3b66818a..766e7d50 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -1650,7 +1650,7 @@ class ProcessInstanceProcessor: and self._script_engine.failing_spiff_task is not None ): self._script_engine.failing_spiff_task = None - with open("do_engine_steps.json", 'w') as f: f.write(json.dumps(self.serialize(), indent=2)) + # with open("do_engine_steps.json", 'w') as f: f.write(json.dumps(self.serialize(), indent=2)) @classmethod def get_tasks_with_data(cls, bpmn_process_instance: BpmnWorkflow) -> List[SpiffTask]: diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py index cd0191ac..0a15ba4b 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py @@ -26,6 +26,11 @@ from spiffworkflow_backend.models.process_instance_event import ProcessInstanceE from spiffworkflow_backend.models.task import TaskModel # noqa: F401 +class StartAndEndTimes(TypedDict): + start_in_seconds: Optional[float] + end_in_seconds: Optional[float] + + class JsonDataDict(TypedDict): hash: str data: dict @@ -108,30 +113,46 @@ class TaskService: self, spiff_task: SpiffTask, task_failed: bool = False, + start_and_end_times: Optional[StartAndEndTimes] = None, ) -> TaskModel: - ( - new_bpmn_process, - task_model, - new_task_models, - new_json_data_dicts, - ) = self.__class__.find_or_create_task_model_from_spiff_task( - spiff_task, - self.process_instance, - self.serializer, - bpmn_definition_to_task_definitions_mappings=self.bpmn_definition_to_task_definitions_mappings, - ) - bpmn_process = new_bpmn_process or task_model.bpmn_process - bpmn_process_json_data = self.__class__.update_task_data_on_bpmn_process( - bpmn_process, spiff_task.workflow.data - ) - self.task_models.update(new_task_models) - self.json_data_dicts.update(new_json_data_dicts) + new_bpmn_process = None + if str(spiff_task.id) in self.task_models: + task_model = self.task_models[str(spiff_task.id)] + else: + ( + new_bpmn_process, + task_model, + new_task_models, + new_json_data_dicts, + ) = self.__class__.find_or_create_task_model_from_spiff_task( + spiff_task, + self.process_instance, + self.serializer, + bpmn_definition_to_task_definitions_mappings=self.bpmn_definition_to_task_definitions_mappings, + ) + self.task_models.update(new_task_models) + self.json_data_dicts.update(new_json_data_dicts) + + # we are not sure why task_model.bpmn_process can be None while task_model.bpmn_process_id actually has a valid value + bpmn_process = new_bpmn_process or task_model.bpmn_process or BpmnProcessModel.query.filter_by(id=task_model.bpmn_process_id).first() + + try: + bpmn_process_json_data = self.__class__.update_task_data_on_bpmn_process( + bpmn_process, spiff_task.workflow.data + ) + except Exception as ex: + import pdb; pdb.set_trace() + print("HEY90823") json_data_dict_list = self.__class__.update_task_model(task_model, spiff_task, self.serializer) self.task_models[task_model.guid] = task_model if bpmn_process_json_data is not None: json_data_dict_list.append(bpmn_process_json_data) self.update_json_data_dicts_using_list(json_data_dict_list, self.json_data_dicts) + if start_and_end_times: + task_model.start_in_seconds = start_and_end_times['start_in_seconds'] + task_model.end_in_seconds = start_and_end_times['end_in_seconds'] + if task_model.state == "COMPLETED" or task_failed: event_type = ProcessInstanceEventType.task_completed.value if task_failed: 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 7d5caabc..242cc9a3 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py @@ -24,7 +24,7 @@ from spiffworkflow_backend.services.assertion_service import safe_assertion from spiffworkflow_backend.services.process_instance_lock_service import ( ProcessInstanceLockService, ) -from spiffworkflow_backend.services.task_service import TaskService +from spiffworkflow_backend.services.task_service import StartAndEndTimes, TaskService class EngineStepDelegate: @@ -62,10 +62,11 @@ class TaskModelSavingDelegate(EngineStepDelegate): self.serializer = serializer self.current_task_model: Optional[TaskModel] = None - self.current_task_start_in_seconds: Optional[float] = None + # self.current_task_start_in_seconds: Optional[float] = None self.last_completed_spiff_task: Optional[SpiffTask] = None self.spiff_tasks_to_process: Set[UUID] = set() + self.spiff_task_timestamps: dict[UUID, StartAndEndTimes] = {} self.task_service = TaskService( process_instance=self.process_instance, @@ -75,10 +76,7 @@ class TaskModelSavingDelegate(EngineStepDelegate): def will_complete_task(self, spiff_task: SpiffTask) -> None: if self._should_update_task_model(): - # if spiff_task.task_spec.name == 'passing_script_task': - # import pdb; pdb.set_trace() - # print("HEY1") - self.current_task_start_in_seconds = time.time() + self.spiff_task_timestamps[spiff_task.id] = {'start_in_seconds': time.time(), 'end_in_seconds': None} spiff_task.task_spec._predict(spiff_task, mask=TaskState.NOT_FINISHED_MASK) if self.secondary_engine_step_delegate: self.secondary_engine_step_delegate.will_complete_task(spiff_task) @@ -88,15 +86,16 @@ class TaskModelSavingDelegate(EngineStepDelegate): # if spiff_task.task_spec.name == 'test_process_to_call_script.BoundaryEventParent': # import pdb; pdb.set_trace() # print("HEY") - task_model = self.task_service.update_task_model_with_spiff_task(spiff_task) - if self.current_task_start_in_seconds is None: - raise Exception("Could not find cached current_task_start_in_seconds. This should never have happend") - task_model.start_in_seconds = self.current_task_start_in_seconds - task_model.end_in_seconds = time.time() + # task_model = self.task_service.update_task_model_with_spiff_task(spiff_task) + # if self.current_task_start_in_seconds is None: + # raise Exception("Could not find cached current_task_start_in_seconds. This should never have happend") + # task_model.start_in_seconds = self.current_task_start_in_seconds + # task_model.end_in_seconds = time.time() + self.spiff_task_timestamps[spiff_task.id]['end_in_seconds'] = time.time() self.last_completed_spiff_task = spiff_task self.spiff_tasks_to_process.add(spiff_task.id) self._add_children(spiff_task) - self._add_parents(spiff_task) + # self._add_parents(spiff_task) # self.task_service.process_spiff_task_parent_subprocess_tasks(spiff_task) # self.task_service.process_spiff_task_children(spiff_task) @@ -134,12 +133,13 @@ class TaskModelSavingDelegate(EngineStepDelegate): # for waiting_spiff_task in bpmn_process_instance.get_tasks( # TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.MAYBE | TaskState.LIKELY | TaskState.FUTURE # ): - for spiff_task_guid in self.spiff_tasks_to_process: - if spiff_task_guid is None: + # self.task_service.update_task_model_with_spiff_task(waiting_spiff_task) + for spiff_task_uuid in self.spiff_tasks_to_process: + if spiff_task_uuid is None: # or str(spiff_task_uuid) in self.task_service.task_models: continue try: - print(f"spiff_task_guid: {spiff_task_guid}") - waiting_spiff_task = bpmn_process_instance.get_task_from_id(spiff_task_guid) + # print(f"spiff_task_uuid: {spiff_task_uuid}") + waiting_spiff_task = bpmn_process_instance.get_task_from_id(spiff_task_uuid) except TaskNotFoundException: continue # if waiting_spiff_task.task_spec.name == 'top_level_manual_task_two': @@ -152,15 +152,14 @@ class TaskModelSavingDelegate(EngineStepDelegate): if cpt.id == waiting_spiff_task.id: waiting_spiff_task.parent.children.remove(cpt) continue - try: - self.task_service.update_task_model_with_spiff_task(waiting_spiff_task) - except Exception as ex: - import pdb; pdb.set_trace() - print("HEY16") + start_and_end_times = None + if waiting_spiff_task.id in self.spiff_task_timestamps: + start_and_end_times = self.spiff_task_timestamps[waiting_spiff_task.id] + self.task_service.update_task_model_with_spiff_task(waiting_spiff_task, start_and_end_times=start_and_end_times) # self.task_service.process_spiff_task_parent_subprocess_tasks(waiting_spiff_task) - # if self.last_completed_spiff_task is not None: - # self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task) + if self.last_completed_spiff_task is not None: + self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task) # self.task_service.process_spiff_task_children(self.last_completed_spiff_task) def _should_update_task_model(self) -> bool: @@ -286,7 +285,6 @@ class WorkflowExecutionService: self.process_bpmn_messages() self.queue_waiting_receive_messages() except SpiffWorkflowException as swe: - raise swe raise ApiError.from_workflow_exception("task_error", str(swe), swe) from swe finally: diff --git a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_logging_service.py b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_logging_service.py index 7890e156..78f3fe1e 100644 --- a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_logging_service.py +++ b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_logging_service.py @@ -59,6 +59,7 @@ class TestLoggingService(BaseTest): assert log_response.status_code == 200 assert log_response.json logs: list = log_response.json["results"] + import pdb; pdb.set_trace() assert len(logs) == 4 for log in logs: From 0a972390798e4edff5dd32834fe258745a329e9a Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 6 Apr 2023 10:30:18 -0400 Subject: [PATCH 4/8] backend tests are passing with less optimized way --- .../services/task_service.py | 21 +++-- .../services/workflow_execution_service.py | 84 +++++++++++-------- .../test_process_to_call.bpmn | 9 ++ .../integration/test_logging_service.py | 1 - .../unit/test_process_instance_processor.py | 3 +- 5 files changed, 73 insertions(+), 45 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py index 0a15ba4b..d53cbcb6 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py @@ -135,14 +135,13 @@ class TaskService: # we are not sure why task_model.bpmn_process can be None while task_model.bpmn_process_id actually has a valid value bpmn_process = new_bpmn_process or task_model.bpmn_process or BpmnProcessModel.query.filter_by(id=task_model.bpmn_process_id).first() + # if bpmn_process is None: + # import pdb; pdb.set_trace() + # print("HEY") - try: - bpmn_process_json_data = self.__class__.update_task_data_on_bpmn_process( - bpmn_process, spiff_task.workflow.data - ) - except Exception as ex: - import pdb; pdb.set_trace() - print("HEY90823") + bpmn_process_json_data = self.__class__.update_task_data_on_bpmn_process( + bpmn_process, spiff_task.workflow.data + ) json_data_dict_list = self.__class__.update_task_model(task_model, spiff_task, self.serializer) self.task_models[task_model.guid] = task_model if bpmn_process_json_data is not None: @@ -177,9 +176,14 @@ class TaskService: spiff_workflow: BpmnWorkflow, bpmn_process: BpmnProcessModel, ) -> None: + # bpmn_process_dict = self.serializer.workflow_to_dict(spiff_workflow) new_properties_json = copy.copy(bpmn_process.properties_json) new_properties_json["last_task"] = str(spiff_workflow.last_task.id) if spiff_workflow.last_task else None new_properties_json["success"] = spiff_workflow.success + + # # update correlations correctly but always null out bpmn_messages since they get cleared out later + # new_properties_json['correlations'] = bpmn_process_dict['correlations'] + # new_properties_json['bpmn_messages'] = [] bpmn_process.properties_json = new_properties_json bpmn_process_json_data = self.__class__.update_task_data_on_bpmn_process(bpmn_process, spiff_workflow.data) @@ -192,6 +196,9 @@ class TaskService: direct_parent_bpmn_process = BpmnProcessModel.query.filter_by( id=bpmn_process.direct_parent_process_id ).first() + # if direct_parent_bpmn_process is None: + # import pdb; pdb.set_trace() + # print("HEY22") self.update_bpmn_process(spiff_workflow.outer_workflow, direct_parent_bpmn_process) @classmethod 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 242cc9a3..78412288 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py @@ -61,8 +61,7 @@ class TaskModelSavingDelegate(EngineStepDelegate): self.bpmn_definition_to_task_definitions_mappings = bpmn_definition_to_task_definitions_mappings self.serializer = serializer - self.current_task_model: Optional[TaskModel] = None - # self.current_task_start_in_seconds: Optional[float] = None + self.current_task_start_in_seconds: Optional[float] = None self.last_completed_spiff_task: Optional[SpiffTask] = None self.spiff_tasks_to_process: Set[UUID] = set() @@ -78,27 +77,27 @@ class TaskModelSavingDelegate(EngineStepDelegate): if self._should_update_task_model(): self.spiff_task_timestamps[spiff_task.id] = {'start_in_seconds': time.time(), 'end_in_seconds': None} spiff_task.task_spec._predict(spiff_task, mask=TaskState.NOT_FINISHED_MASK) + + self.current_task_start_in_seconds = time.time() + if self.secondary_engine_step_delegate: self.secondary_engine_step_delegate.will_complete_task(spiff_task) def did_complete_task(self, spiff_task: SpiffTask) -> None: if self._should_update_task_model(): - # if spiff_task.task_spec.name == 'test_process_to_call_script.BoundaryEventParent': - # import pdb; pdb.set_trace() - # print("HEY") - # task_model = self.task_service.update_task_model_with_spiff_task(spiff_task) - # if self.current_task_start_in_seconds is None: - # raise Exception("Could not find cached current_task_start_in_seconds. This should never have happend") - # task_model.start_in_seconds = self.current_task_start_in_seconds - # task_model.end_in_seconds = time.time() + + task_model = self.task_service.update_task_model_with_spiff_task(spiff_task) + if self.current_task_start_in_seconds is None: + raise Exception("Could not find cached current_task_start_in_seconds. This should never have happend") + task_model.start_in_seconds = self.current_task_start_in_seconds + task_model.end_in_seconds = time.time() + self.spiff_task_timestamps[spiff_task.id]['end_in_seconds'] = time.time() - self.last_completed_spiff_task = spiff_task self.spiff_tasks_to_process.add(spiff_task.id) self._add_children(spiff_task) # self._add_parents(spiff_task) - # self.task_service.process_spiff_task_parent_subprocess_tasks(spiff_task) - # self.task_service.process_spiff_task_children(spiff_task) + self.last_completed_spiff_task = spiff_task if self.secondary_engine_step_delegate: self.secondary_engine_step_delegate.did_complete_task(spiff_task) @@ -128,39 +127,50 @@ class TaskModelSavingDelegate(EngineStepDelegate): def after_engine_steps(self, bpmn_process_instance: BpmnWorkflow) -> None: if self._should_update_task_model(): + # excludes COMPLETED. the others were required to get PP1 to go to completion. # process FUTURE tasks because Boundary events are not processed otherwise. - # for waiting_spiff_task in bpmn_process_instance.get_tasks( - # TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.MAYBE | TaskState.LIKELY | TaskState.FUTURE - # ): - # self.task_service.update_task_model_with_spiff_task(waiting_spiff_task) - for spiff_task_uuid in self.spiff_tasks_to_process: - if spiff_task_uuid is None: # or str(spiff_task_uuid) in self.task_service.task_models: - continue - try: - # print(f"spiff_task_uuid: {spiff_task_uuid}") - waiting_spiff_task = bpmn_process_instance.get_task_from_id(spiff_task_uuid) - except TaskNotFoundException: - continue - # if waiting_spiff_task.task_spec.name == 'top_level_manual_task_two': - # import pdb; pdb.set_trace() - # print("HEY42") - # include PREDICTED_MASK tasks in list so we can remove them from the parent + for waiting_spiff_task in bpmn_process_instance.get_tasks( + TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.MAYBE | TaskState.LIKELY | TaskState.FUTURE + # TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.MAYBE | TaskState.LIKELY + # TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.FUTURE + ): if waiting_spiff_task._has_state(TaskState.PREDICTED_MASK): TaskService.remove_spiff_task_from_parent(waiting_spiff_task, self.task_service.task_models) for cpt in waiting_spiff_task.parent.children: if cpt.id == waiting_spiff_task.id: - waiting_spiff_task.parent.children.remove(cpt) + waiting_spiff_task.parent.children.remove(cpt) continue - start_and_end_times = None - if waiting_spiff_task.id in self.spiff_task_timestamps: - start_and_end_times = self.spiff_task_timestamps[waiting_spiff_task.id] - self.task_service.update_task_model_with_spiff_task(waiting_spiff_task, start_and_end_times=start_and_end_times) - # self.task_service.process_spiff_task_parent_subprocess_tasks(waiting_spiff_task) - + self.task_service.update_task_model_with_spiff_task(waiting_spiff_task) if self.last_completed_spiff_task is not None: self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task) + + # for spiff_task_uuid in self.spiff_tasks_to_process: + # try: + # waiting_spiff_task = bpmn_process_instance.get_task_from_id(spiff_task_uuid) + # except TaskNotFoundException: + # continue + # + # # include PREDICTED_MASK tasks in list so we can remove them from the parent + # if waiting_spiff_task._has_state(TaskState.PREDICTED_MASK): + # TaskService.remove_spiff_task_from_parent(waiting_spiff_task, self.task_service.task_models) + # for cpt in waiting_spiff_task.parent.children: + # if cpt.id == waiting_spiff_task.id: + # waiting_spiff_task.parent.children.remove(cpt) + # continue + # # if waiting_spiff_task.state == TaskState.FUTURE: + # # continue + # start_and_end_times = None + # if waiting_spiff_task.id in self.spiff_task_timestamps: + # start_and_end_times = self.spiff_task_timestamps[waiting_spiff_task.id] + # self.task_service.update_task_model_with_spiff_task(waiting_spiff_task, start_and_end_times=start_and_end_times) + # + # if self.last_completed_spiff_task is not None: + # self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task) + + # if self.last_completed_spiff_task is not None: # self.task_service.process_spiff_task_children(self.last_completed_spiff_task) + # self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task) def _should_update_task_model(self) -> bool: """We need to figure out if we have previously save task info on this process intance. @@ -312,6 +322,8 @@ class WorkflowExecutionService: if bpmn_process is not None: bpmn_process_correlations = self.bpmn_process_instance.correlations bpmn_process.properties_json["correlations"] = bpmn_process_correlations + # update correlations correctly but always null out bpmn_messages since they get cleared out later + bpmn_process.properties_json["bpmn_messages"] = [] db.session.add(bpmn_process) db.session.commit() diff --git a/spiffworkflow-backend/tests/data/manual_task_with_subprocesses/test_process_to_call.bpmn b/spiffworkflow-backend/tests/data/manual_task_with_subprocesses/test_process_to_call.bpmn index 2bdce678..064365d8 100644 --- a/spiffworkflow-backend/tests/data/manual_task_with_subprocesses/test_process_to_call.bpmn +++ b/spiffworkflow-backend/tests/data/manual_task_with_subprocesses/test_process_to_call.bpmn @@ -50,6 +50,9 @@ Flow_089aeua set_in_test_process_to_call_script = 1 + + + @@ -66,6 +69,12 @@ + + + + + + diff --git a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_logging_service.py b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_logging_service.py index 78f3fe1e..7890e156 100644 --- a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_logging_service.py +++ b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_logging_service.py @@ -59,7 +59,6 @@ class TestLoggingService(BaseTest): assert log_response.status_code == 200 assert log_response.json logs: list = log_response.json["results"] - import pdb; pdb.set_trace() assert len(logs) == 4 for log in logs: 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 70978a97..23f4748d 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 @@ -346,6 +346,7 @@ class TestProcessInstanceProcessor(BaseTest): ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one) 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)) + # import pdb; pdb.set_trace() ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one) processor.suspend() @@ -547,7 +548,7 @@ class TestProcessInstanceProcessor(BaseTest): all_spiff_tasks = processor_final.bpmn_process_instance.get_tasks() assert len(all_spiff_tasks) > 1 for spiff_task in all_spiff_tasks: - assert spiff_task.state == TaskState.COMPLETED + assert spiff_task.state == TaskState.COMPLETED or TaskState.CANCELLED assert_spiff_task_is_in_process(spiff_task) if spiff_task.task_spec.name == "top_level_call_activity": From e16f40d13e65cdfa4c3aea523accb9b292682d40 Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 6 Apr 2023 10:36:34 -0400 Subject: [PATCH 5/8] updated common task save test to check for boundary event explicitly --- .../unit/test_process_instance_processor.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 23f4748d..61c8f54b 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 @@ -548,7 +548,12 @@ class TestProcessInstanceProcessor(BaseTest): all_spiff_tasks = processor_final.bpmn_process_instance.get_tasks() assert len(all_spiff_tasks) > 1 for spiff_task in all_spiff_tasks: - assert spiff_task.state == TaskState.COMPLETED or TaskState.CANCELLED + if spiff_task.task_spec.name == "our_boundary_event": + assert spiff_task.state == TaskState.CANCELLED + spiff_tasks_checked.append(spiff_task.task_spec.name) + continue + + assert spiff_task.state == TaskState.COMPLETED assert_spiff_task_is_in_process(spiff_task) if spiff_task.task_spec.name == "top_level_call_activity": @@ -559,6 +564,7 @@ class TestProcessInstanceProcessor(BaseTest): assert bpmn_process_definition is not None assert bpmn_process_definition.bpmn_identifier == "test_process_to_call" assert bpmn_process_definition.bpmn_name == "Test Process To Call" + spiff_tasks_checked.append(spiff_task.task_spec.name) # Check that the direct parent of the called activity subprocess task is the # name of the process that was called from the activity. @@ -576,8 +582,10 @@ class TestProcessInstanceProcessor(BaseTest): ).first() assert direct_parent_process is not None assert direct_parent_process.bpmn_process_definition.bpmn_identifier == "test_process_to_call" + spiff_tasks_checked.append(spiff_task.task_spec.name) - for task_bpmn_identifier in expected_task_data.keys(): + expected_task_identifiers = list(expected_task_data.keys()) + ['our_boundary_event', 'test_process_to_call_subprocess_script', 'top_level_call_activity'] + for task_bpmn_identifier in expected_task_identifiers: message = ( f"Expected to have seen a task with a bpmn_identifier of {task_bpmn_identifier} but did not. " f"Only saw {sorted(spiff_tasks_checked)}" From d6067d701f9bfd7f95e9eb331bbda8a281a59f04 Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 6 Apr 2023 10:57:52 -0400 Subject: [PATCH 6/8] some cleanup, updated SpiffWorkflow, and added some notes to pick back up where we left off with the more efficient method w/ burnettk --- spiffworkflow-backend/poetry.lock | 10 +++-- spiffworkflow-backend/pyproject.toml | 4 +- .../routes/process_instances_controller.py | 21 +++++---- .../services/message_service.py | 1 - .../services/process_instance_processor.py | 6 --- .../services/task_service.py | 18 ++++---- .../services/workflow_execution_service.py | 44 ++++++++++--------- .../unit/test_process_instance_processor.py | 7 ++- 8 files changed, 55 insertions(+), 56 deletions(-) diff --git a/spiffworkflow-backend/poetry.lock b/spiffworkflow-backend/poetry.lock index 9986c314..f97d0c3a 100644 --- a/spiffworkflow-backend/poetry.lock +++ b/spiffworkflow-backend/poetry.lock @@ -1879,7 +1879,7 @@ description = "A workflow framework and BPMN/DMN Processor" category = "main" optional = false python-versions = "*" -develop = true +develop = false [package.dependencies] celery = "*" @@ -1887,8 +1887,10 @@ configparser = "*" lxml = "*" [package.source] -type = "directory" -url = "../../SpiffWorkflow" +type = "git" +url = "https://github.com/sartography/SpiffWorkflow" +reference = "main" +resolved_reference = "96ad2a2b060deb445c39374f065690023351de19" [[package]] name = "sqlalchemy" @@ -2271,7 +2273,7 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "1.1" python-versions = ">=3.9,<3.12" -content-hash = "c4bb5e0ce1ad140b0e5b109ab3f9f136844815bd6db8200e546d44d533050612" +content-hash = "9fea44386fbab29102a051a254058909568c4ee3dbd6a402fb91aacbcf1f7fd2" [metadata.files] alabaster = [ diff --git a/spiffworkflow-backend/pyproject.toml b/spiffworkflow-backend/pyproject.toml index 9fb90b20..f182c193 100644 --- a/spiffworkflow-backend/pyproject.toml +++ b/spiffworkflow-backend/pyproject.toml @@ -27,9 +27,9 @@ flask-marshmallow = "*" flask-migrate = "*" flask-restful = "*" werkzeug = "*" -# SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "main"} +SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "main"} # SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "6cad2981712bb61eca23af1adfafce02d3277cb9"} -SpiffWorkflow = {develop = true, path = "../../SpiffWorkflow" } +# SpiffWorkflow = {develop = true, path = "../../SpiffWorkflow" } sentry-sdk = "^1.10" sphinx-autoapi = "^2.0" flask-bpmn = {git = "https://github.com/sartography/flask-bpmn", rev = "main"} diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py index 1f647dff..c6a8ddcd 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py @@ -136,17 +136,16 @@ def process_instance_run( ErrorHandlingService().handle_error(processor, e) raise e except Exception as e: - raise e - # import pdb; pdb.set_trace() - # ErrorHandlingService().handle_error(processor, e) - # # fixme: this is going to point someone to the wrong task - it's misinformation for errors in sub-processes - # task = processor.bpmn_process_instance.last_task - # raise ApiError.from_task( - # error_code="unknown_exception", - # message=f"An unknown error occurred. Original error: {e}", - # status_code=400, - # task=task, - # ) from e + ErrorHandlingService().handle_error(processor, e) + # FIXME: this is going to point someone to the wrong task - it's misinformation for errors in sub-processes. + # we need to recurse through all last tasks if the last task is a call activity or subprocess. + task = processor.bpmn_process_instance.last_task + raise ApiError.from_task( + error_code="unknown_exception", + message=f"An unknown error occurred. Original error: {e}", + status_code=400, + task=task, + ) from e if not current_app.config["SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER"]: MessageService.correlate_all_message_instances() diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py index c560b284..7e52561e 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/message_service.py @@ -159,7 +159,6 @@ class MessageService: ) -> None: """process_message_receive.""" processor_receive = ProcessInstanceProcessor(process_instance_receive) - # import pdb; pdb.set_trace() processor_receive.bpmn_process_instance.catch_bpmn_message(message_model_name, message_payload) processor_receive.do_engine_steps(save=True) message_instance_receive.status = MessageStatuses.completed.value diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py index 766e7d50..458d60fd 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -354,9 +354,6 @@ class CustomBpmnScriptEngine(PythonScriptEngine): # type: ignore external_methods: Optional[Dict[str, Any]] = None, ) -> Any: """_evaluate.""" - # if task.task_spec.name == 'passing_script_task': - # import pdb; pdb.set_trace() - # print("HEY2") methods = self.__get_augment_methods(task) if external_methods: methods.update(external_methods) @@ -378,9 +375,6 @@ class CustomBpmnScriptEngine(PythonScriptEngine): # type: ignore def execute(self, task: SpiffTask, script: str, external_methods: Any = None) -> None: """Execute.""" - # if task.task_spec.name == 'passing_script_task': - # import pdb; pdb.set_trace() - # print("HEY3") try: # reset failing task just in case self.failing_spiff_task = None diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py index d53cbcb6..ac1f9c02 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py @@ -134,10 +134,11 @@ class TaskService: self.json_data_dicts.update(new_json_data_dicts) # we are not sure why task_model.bpmn_process can be None while task_model.bpmn_process_id actually has a valid value - bpmn_process = new_bpmn_process or task_model.bpmn_process or BpmnProcessModel.query.filter_by(id=task_model.bpmn_process_id).first() - # if bpmn_process is None: - # import pdb; pdb.set_trace() - # print("HEY") + bpmn_process = ( + new_bpmn_process + or task_model.bpmn_process + or BpmnProcessModel.query.filter_by(id=task_model.bpmn_process_id).first() + ) bpmn_process_json_data = self.__class__.update_task_data_on_bpmn_process( bpmn_process, spiff_task.workflow.data @@ -149,8 +150,8 @@ class TaskService: self.update_json_data_dicts_using_list(json_data_dict_list, self.json_data_dicts) if start_and_end_times: - task_model.start_in_seconds = start_and_end_times['start_in_seconds'] - task_model.end_in_seconds = start_and_end_times['end_in_seconds'] + task_model.start_in_seconds = start_and_end_times["start_in_seconds"] + task_model.end_in_seconds = start_and_end_times["end_in_seconds"] if task_model.state == "COMPLETED" or task_failed: event_type = ProcessInstanceEventType.task_completed.value @@ -196,9 +197,6 @@ class TaskService: direct_parent_bpmn_process = BpmnProcessModel.query.filter_by( id=bpmn_process.direct_parent_process_id ).first() - # if direct_parent_bpmn_process is None: - # import pdb; pdb.set_trace() - # print("HEY22") self.update_bpmn_process(spiff_workflow.outer_workflow, direct_parent_bpmn_process) @classmethod @@ -460,7 +458,7 @@ class TaskService: spiff_task_guid = str(spiff_task.id) if spiff_task_parent_guid in task_models: parent_task_model = task_models[spiff_task_parent_guid] - if spiff_task_guid in parent_task_model.properties_json['children']: + if spiff_task_guid in parent_task_model.properties_json["children"]: new_parent_properties_json = copy.copy(parent_task_model.properties_json) new_parent_properties_json["children"].remove(spiff_task_guid) parent_task_model.properties_json = new_parent_properties_json 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 78412288..e578cc13 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/workflow_execution_service.py @@ -1,13 +1,12 @@ import time from typing import Callable -from typing import Set -import json from typing import Optional +from typing import Set from uuid import UUID from SpiffWorkflow.bpmn.serializer.workflow import BpmnWorkflowSerializer # type: ignore from SpiffWorkflow.bpmn.workflow import BpmnWorkflow # type: ignore -from SpiffWorkflow.exceptions import SpiffWorkflowException, TaskNotFoundException # type: ignore +from SpiffWorkflow.exceptions import SpiffWorkflowException # type: ignore from SpiffWorkflow.task import Task as SpiffTask # type: ignore from SpiffWorkflow.task import TaskState @@ -18,13 +17,13 @@ from spiffworkflow_backend.models.message_instance_correlation import ( MessageInstanceCorrelationRuleModel, ) from spiffworkflow_backend.models.process_instance import ProcessInstanceModel -from spiffworkflow_backend.models.task import TaskModel from spiffworkflow_backend.models.task_definition import TaskDefinitionModel # noqa: F401 from spiffworkflow_backend.services.assertion_service import safe_assertion from spiffworkflow_backend.services.process_instance_lock_service import ( ProcessInstanceLockService, ) -from spiffworkflow_backend.services.task_service import StartAndEndTimes, TaskService +from spiffworkflow_backend.services.task_service import StartAndEndTimes +from spiffworkflow_backend.services.task_service import TaskService class EngineStepDelegate: @@ -75,7 +74,7 @@ class TaskModelSavingDelegate(EngineStepDelegate): def will_complete_task(self, spiff_task: SpiffTask) -> None: if self._should_update_task_model(): - self.spiff_task_timestamps[spiff_task.id] = {'start_in_seconds': time.time(), 'end_in_seconds': None} + self.spiff_task_timestamps[spiff_task.id] = {"start_in_seconds": time.time(), "end_in_seconds": None} spiff_task.task_spec._predict(spiff_task, mask=TaskState.NOT_FINISHED_MASK) self.current_task_start_in_seconds = time.time() @@ -85,17 +84,18 @@ class TaskModelSavingDelegate(EngineStepDelegate): def did_complete_task(self, spiff_task: SpiffTask) -> None: if self._should_update_task_model(): - + # NOTE: used with process-all-tasks and process-children-of-last-task task_model = self.task_service.update_task_model_with_spiff_task(spiff_task) if self.current_task_start_in_seconds is None: raise Exception("Could not find cached current_task_start_in_seconds. This should never have happend") task_model.start_in_seconds = self.current_task_start_in_seconds task_model.end_in_seconds = time.time() - self.spiff_task_timestamps[spiff_task.id]['end_in_seconds'] = time.time() - self.spiff_tasks_to_process.add(spiff_task.id) - self._add_children(spiff_task) - # self._add_parents(spiff_task) + # # NOTE: used with process-spiff-tasks-list + # self.spiff_task_timestamps[spiff_task.id]['end_in_seconds'] = time.time() + # self.spiff_tasks_to_process.add(spiff_task.id) + # self._add_children(spiff_task) + # # self._add_parents(spiff_task) self.last_completed_spiff_task = spiff_task if self.secondary_engine_step_delegate: @@ -127,24 +127,27 @@ class TaskModelSavingDelegate(EngineStepDelegate): def after_engine_steps(self, bpmn_process_instance: BpmnWorkflow) -> None: if self._should_update_task_model(): - + # NOTE: process-all-tasks: All tests pass with this but it's less efficient and would be nice to replace # excludes COMPLETED. the others were required to get PP1 to go to completion. # process FUTURE tasks because Boundary events are not processed otherwise. for waiting_spiff_task in bpmn_process_instance.get_tasks( - TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.MAYBE | TaskState.LIKELY | TaskState.FUTURE - # TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.MAYBE | TaskState.LIKELY - # TaskState.WAITING | TaskState.CANCELLED | TaskState.READY | TaskState.FUTURE + TaskState.WAITING + | TaskState.CANCELLED + | TaskState.READY + | TaskState.MAYBE + | TaskState.LIKELY + | TaskState.FUTURE ): if waiting_spiff_task._has_state(TaskState.PREDICTED_MASK): TaskService.remove_spiff_task_from_parent(waiting_spiff_task, self.task_service.task_models) - for cpt in waiting_spiff_task.parent.children: - if cpt.id == waiting_spiff_task.id: - waiting_spiff_task.parent.children.remove(cpt) continue self.task_service.update_task_model_with_spiff_task(waiting_spiff_task) - if self.last_completed_spiff_task is not None: - self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task) + # # NOTE: process-spiff-tasks-list: this would be the ideal way to handle all tasks + # # but we're missing something with it yet + # # + # # adding from line here until we are ready to go with this + # from SpiffWorkflow.exceptions import TaskNotFoundException # for spiff_task_uuid in self.spiff_tasks_to_process: # try: # waiting_spiff_task = bpmn_process_instance.get_task_from_id(spiff_task_uuid) @@ -168,6 +171,7 @@ class TaskModelSavingDelegate(EngineStepDelegate): # if self.last_completed_spiff_task is not None: # self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task) + # # NOTE: process-children-of-last-task: this does not work with escalation boundary events # if self.last_completed_spiff_task is not None: # self.task_service.process_spiff_task_children(self.last_completed_spiff_task) # self.task_service.process_spiff_task_parent_subprocess_tasks(self.last_completed_spiff_task) 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 61c8f54b..d0d4eb73 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 @@ -346,7 +346,6 @@ class TestProcessInstanceProcessor(BaseTest): ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one) 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)) - # import pdb; pdb.set_trace() ProcessInstanceService.complete_form_task(processor, spiff_manual_task, {}, initiator_user, human_task_one) processor.suspend() @@ -584,7 +583,11 @@ class TestProcessInstanceProcessor(BaseTest): assert direct_parent_process.bpmn_process_definition.bpmn_identifier == "test_process_to_call" spiff_tasks_checked.append(spiff_task.task_spec.name) - expected_task_identifiers = list(expected_task_data.keys()) + ['our_boundary_event', 'test_process_to_call_subprocess_script', 'top_level_call_activity'] + expected_task_identifiers = list(expected_task_data.keys()) + [ + "our_boundary_event", + "test_process_to_call_subprocess_script", + "top_level_call_activity", + ] for task_bpmn_identifier in expected_task_identifiers: message = ( f"Expected to have seen a task with a bpmn_identifier of {task_bpmn_identifier} but did not. " From 5468193a41352286cea82ff1b00ef24f9285d8fe Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 6 Apr 2023 11:03:45 -0400 Subject: [PATCH 7/8] removed unnecessary comments w/ burnettk --- .../services/process_instance_processor.py | 1 - .../src/spiffworkflow_backend/services/task_service.py | 5 ----- 2 files changed, 6 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py index 458d60fd..864ab2d1 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -1644,7 +1644,6 @@ class ProcessInstanceProcessor: and self._script_engine.failing_spiff_task is not None ): self._script_engine.failing_spiff_task = None - # with open("do_engine_steps.json", 'w') as f: f.write(json.dumps(self.serialize(), indent=2)) @classmethod def get_tasks_with_data(cls, bpmn_process_instance: BpmnWorkflow) -> List[SpiffTask]: diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py index ac1f9c02..2e904a07 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/task_service.py @@ -177,14 +177,9 @@ class TaskService: spiff_workflow: BpmnWorkflow, bpmn_process: BpmnProcessModel, ) -> None: - # bpmn_process_dict = self.serializer.workflow_to_dict(spiff_workflow) new_properties_json = copy.copy(bpmn_process.properties_json) new_properties_json["last_task"] = str(spiff_workflow.last_task.id) if spiff_workflow.last_task else None new_properties_json["success"] = spiff_workflow.success - - # # update correlations correctly but always null out bpmn_messages since they get cleared out later - # new_properties_json['correlations'] = bpmn_process_dict['correlations'] - # new_properties_json['bpmn_messages'] = [] bpmn_process.properties_json = new_properties_json bpmn_process_json_data = self.__class__.update_task_data_on_bpmn_process(bpmn_process, spiff_workflow.data) From dc0428cf9ab76474e5175150e53975908facc276 Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 6 Apr 2023 11:42:24 -0400 Subject: [PATCH 8/8] moved NDR_PP1 tests to pilot dir and default configs back to what they were w/ burnettk --- spiffworkflow-frontend/cypress.env.json | 5 +---- .../cypress/{e2e => pilot}/NDR_PP1/consultingfees.cy.js | 0 .../cypress/{e2e => pilot}/NDR_PP1/equipment.cy.js | 0 .../cypress/{e2e => pilot}/NDR_PP1/learninganddev.cy.js | 0 .../cypress/{e2e => pilot}/NDR_PP1/otherfees.cy.js | 0 .../cypress/{e2e => pilot}/NDR_PP1/softwarelicense.cy.js | 0 spiffworkflow-frontend/cypress/support/commands.js | 5 ++--- 7 files changed, 3 insertions(+), 7 deletions(-) rename spiffworkflow-frontend/cypress/{e2e => pilot}/NDR_PP1/consultingfees.cy.js (100%) rename spiffworkflow-frontend/cypress/{e2e => pilot}/NDR_PP1/equipment.cy.js (100%) rename spiffworkflow-frontend/cypress/{e2e => pilot}/NDR_PP1/learninganddev.cy.js (100%) rename spiffworkflow-frontend/cypress/{e2e => pilot}/NDR_PP1/otherfees.cy.js (100%) rename spiffworkflow-frontend/cypress/{e2e => pilot}/NDR_PP1/softwarelicense.cy.js (100%) diff --git a/spiffworkflow-frontend/cypress.env.json b/spiffworkflow-frontend/cypress.env.json index a7a77bd5..6a14dd82 100644 --- a/spiffworkflow-frontend/cypress.env.json +++ b/spiffworkflow-frontend/cypress.env.json @@ -1,7 +1,5 @@ { "project_id": "18606", - "SPIFFWORKFLOW_FRONTEND_USERNAME": "core-a1.contributor", - "SPIFFWORKFLOW_FRONTEND_PASSWORD": "core-a1.contributor", "requestor_username": "core-a1.contributor", "requestor_password": "core-a1.contributor", "budgetowner_username": "fluffy.project-lead", @@ -15,6 +13,5 @@ "infrasme_username": "infra-a1.sme", "infrasme_password": "infra-a1.sme", "legalsme_username": "legal-a1.sme", - "legalsme_password": "legal-a1.sme", - "SPIFFWORKFLOW_FRONTEND_AUTH_WITH_KEYCLOAK": true + "legalsme_password": "legal-a1.sme" } diff --git a/spiffworkflow-frontend/cypress/e2e/NDR_PP1/consultingfees.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/consultingfees.cy.js similarity index 100% rename from spiffworkflow-frontend/cypress/e2e/NDR_PP1/consultingfees.cy.js rename to spiffworkflow-frontend/cypress/pilot/NDR_PP1/consultingfees.cy.js diff --git a/spiffworkflow-frontend/cypress/e2e/NDR_PP1/equipment.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/equipment.cy.js similarity index 100% rename from spiffworkflow-frontend/cypress/e2e/NDR_PP1/equipment.cy.js rename to spiffworkflow-frontend/cypress/pilot/NDR_PP1/equipment.cy.js diff --git a/spiffworkflow-frontend/cypress/e2e/NDR_PP1/learninganddev.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/learninganddev.cy.js similarity index 100% rename from spiffworkflow-frontend/cypress/e2e/NDR_PP1/learninganddev.cy.js rename to spiffworkflow-frontend/cypress/pilot/NDR_PP1/learninganddev.cy.js diff --git a/spiffworkflow-frontend/cypress/e2e/NDR_PP1/otherfees.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/otherfees.cy.js similarity index 100% rename from spiffworkflow-frontend/cypress/e2e/NDR_PP1/otherfees.cy.js rename to spiffworkflow-frontend/cypress/pilot/NDR_PP1/otherfees.cy.js diff --git a/spiffworkflow-frontend/cypress/e2e/NDR_PP1/softwarelicense.cy.js b/spiffworkflow-frontend/cypress/pilot/NDR_PP1/softwarelicense.cy.js similarity index 100% rename from spiffworkflow-frontend/cypress/e2e/NDR_PP1/softwarelicense.cy.js rename to spiffworkflow-frontend/cypress/pilot/NDR_PP1/softwarelicense.cy.js diff --git a/spiffworkflow-frontend/cypress/support/commands.js b/spiffworkflow-frontend/cypress/support/commands.js index 206ffa2d..6f3c9157 100644 --- a/spiffworkflow-frontend/cypress/support/commands.js +++ b/spiffworkflow-frontend/cypress/support/commands.js @@ -98,14 +98,13 @@ Cypress.Commands.add('createModel', (groupId, modelId, modelDisplayName) => { cy.contains(`Process Model: ${modelDisplayName}`); }); +// Intended to be run from the process model show page Cypress.Commands.add( 'runPrimaryBpmnFile', (expectAutoRedirectToHumanTask = false) => { // cy.getBySel('start-process-instance').click(); // click on button with text Start - //cy.get('button') - // cy.get('#process-model-tile-manage-procurement\\/procurement\\/requisition-order-management\\/new-demand-request-procurement > div > button') - cy.get('#process-model-tile-manage-procurement\\/procurement\\/requisition-order-management\\/raise-new-demand-request > div > button') + cy.get('button') .contains(/^Start$/) .click(); if (expectAutoRedirectToHumanTask) {