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 55c8e63b..5d596020 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py @@ -573,7 +573,7 @@ def process_instance_task_list( steps_by_id = {step_detail.task_id: step_detail for step_detail in step_details} - subprocesses_to_set_to_waiting = [] + subprocess_state_overrides = {} for step_detail in step_details: if step_detail.task_id in tasks: # task_ids_in_use.append(step_detail.task_id) @@ -594,20 +594,17 @@ def process_instance_task_list( task_data = {} subprocess_info['tasks'][step_detail.task_id]["data"] = task_data subprocess_info['tasks'][step_detail.task_id]['state'] = Task.task_state_name_to_int(step_detail.task_state) - subprocesses_to_set_to_waiting.append(subprocess_id) + subprocess_state_overrides[subprocess_id] = TaskState.WAITING for subprocess_info in subprocesses.values(): for spiff_task_id in subprocess_info['tasks']: if spiff_task_id not in steps_by_id: subprocess_info['tasks'][spiff_task_id]['data'] = {} - subprocess_info['tasks'][spiff_task_id]['state'] = TaskState.FUTURE + subprocess_info['tasks'][spiff_task_id]['state'] = subprocess_state_overrides.get(spiff_task_id, TaskState.FUTURE) for spiff_task_id in tasks: if spiff_task_id not in steps_by_id: tasks[spiff_task_id]['data'] = {} - if spiff_task_id in subprocesses_to_set_to_waiting: - tasks[spiff_task_id]['state'] = TaskState.WAITING - else: - tasks[spiff_task_id]['state'] = TaskState.FUTURE + tasks[spiff_task_id]['state'] = subprocess_state_overrides.get(spiff_task_id, TaskState.FUTURE) process_instance.bpmn_json = json.dumps(bpmn_json) 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 95093123..db6ae2ec 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -1527,10 +1527,12 @@ class ProcessInstanceProcessor: "Service Task", "Default Start Event", "Exclusive Gateway", + "Call Activity", # "End Join", "End Event", "Default Throwing Event", - "Subprocess" + "Subprocess", + "Transactional Subprocess", } # making a dictionary to ensure we are not shadowing variables in the other methods diff --git a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx index 5b8bb285..10be9ed5 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInstanceShow.tsx @@ -242,9 +242,17 @@ export default function ProcessInstanceShow({ variant }: OwnProps) { const spiffStepLink = (label: any, distance: number) => { const processIdentifier = searchParams.get('process_identifier'); - let queryParams = ''; + const callActivityTaskId = searchParams.get('call_activity_task_id'); + let queryParamArray = []; if (processIdentifier) { - queryParams = `?process_identifier=${processIdentifier}`; + queryParamArray.push(`process_identifier=${processIdentifier}`); + } + if (callActivityTaskId) { + queryParamArray.push(`call_activity_task_id=${callActivityTaskId}`); + } + let queryParams = ''; + if (queryParamArray.length > 0){ + queryParams = `?${queryParamArray.join('&')}`; } return (