when getting most recent tasks make sure to group by bpmn process guid as well w/ burnettk

This commit is contained in:
jasquat 2023-04-03 13:46:33 -04:00
parent 9655aa8a94
commit dba897f3bd
No known key found for this signature in database
1 changed files with 4 additions and 2 deletions

View File

@ -672,8 +672,10 @@ def process_instance_task_list(
task_model_list = {} task_model_list = {}
if most_recent_tasks_only: if most_recent_tasks_only:
for task_model in task_models: for task_model in task_models:
if task_model.bpmn_identifier not in task_model_list: bpmn_process_guid = task_model.bpmn_process_direct_parent_guid or "TOP"
task_model_list[task_model.bpmn_identifier] = task_model row_key = f"{bpmn_process_guid}:::{task_model.bpmn_identifier}"
if row_key not in task_model_list:
task_model_list[row_key] = task_model
task_models = list(task_model_list.values()) task_models = list(task_model_list.values())
if to_task_model is not None: if to_task_model is not None: