call activities are also working w/ burnettk

This commit is contained in:
jasquat 2023-02-09 15:52:00 -05:00
parent 012d2bd367
commit 0c30751946
3 changed files with 17 additions and 10 deletions

View File

@ -573,7 +573,7 @@ def process_instance_task_list(
steps_by_id = {step_detail.task_id: step_detail for step_detail in step_details} 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: for step_detail in step_details:
if step_detail.task_id in tasks: if step_detail.task_id in tasks:
# task_ids_in_use.append(step_detail.task_id) # task_ids_in_use.append(step_detail.task_id)
@ -594,20 +594,17 @@ def process_instance_task_list(
task_data = {} task_data = {}
subprocess_info['tasks'][step_detail.task_id]["data"] = 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) 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 subprocess_info in subprocesses.values():
for spiff_task_id in subprocess_info['tasks']: for spiff_task_id in subprocess_info['tasks']:
if spiff_task_id not in steps_by_id: if spiff_task_id not in steps_by_id:
subprocess_info['tasks'][spiff_task_id]['data'] = {} 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: for spiff_task_id in tasks:
if spiff_task_id not in steps_by_id: if spiff_task_id not in steps_by_id:
tasks[spiff_task_id]['data'] = {} tasks[spiff_task_id]['data'] = {}
if spiff_task_id in subprocesses_to_set_to_waiting: tasks[spiff_task_id]['state'] = subprocess_state_overrides.get(spiff_task_id, TaskState.FUTURE)
tasks[spiff_task_id]['state'] = TaskState.WAITING
else:
tasks[spiff_task_id]['state'] = TaskState.FUTURE
process_instance.bpmn_json = json.dumps(bpmn_json) process_instance.bpmn_json = json.dumps(bpmn_json)

View File

@ -1527,10 +1527,12 @@ class ProcessInstanceProcessor:
"Service Task", "Service Task",
"Default Start Event", "Default Start Event",
"Exclusive Gateway", "Exclusive Gateway",
"Call Activity",
# "End Join", # "End Join",
"End Event", "End Event",
"Default Throwing Event", "Default Throwing Event",
"Subprocess" "Subprocess",
"Transactional Subprocess",
} }
# making a dictionary to ensure we are not shadowing variables in the other methods # making a dictionary to ensure we are not shadowing variables in the other methods

View File

@ -242,9 +242,17 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
const spiffStepLink = (label: any, distance: number) => { const spiffStepLink = (label: any, distance: number) => {
const processIdentifier = searchParams.get('process_identifier'); const processIdentifier = searchParams.get('process_identifier');
let queryParams = ''; const callActivityTaskId = searchParams.get('call_activity_task_id');
let queryParamArray = [];
if (processIdentifier) { 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 ( return (
<Link <Link