prevent index out of bounds when there is no next task

This commit is contained in:
burnettk 2022-08-19 17:46:38 -04:00
parent 48a4e5229a
commit 30279c9f93

View File

@ -506,7 +506,8 @@ class ProcessInstanceProcessor:
and task.workflow == self.bpmn_process_instance
):
endtasks.append(task)
return endtasks[-1]
if len(endtasks) > 0:
return endtasks[-1]
# If there are ready tasks to complete, return the next ready task, but return the one
# in the active parallel path if possible. In some cases the active parallel path may itself be