Fixes #578 - issue with us displaying an incorrect end event in some cases.

This commit is contained in:
Dan 2021-12-22 16:27:52 -05:00
parent c83b047881
commit bd3176eea6
1 changed files with 2 additions and 1 deletions

View File

@ -387,7 +387,8 @@ class WorkflowProcessor(object):
endtasks = []
if self.bpmn_workflow.is_completed():
for task in SpiffTask.Iterator(self.bpmn_workflow.task_tree, SpiffTask.ANY_MASK):
if isinstance(task.task_spec, EndEvent):
# Assure that we find the end event for this workflow, and not for any sub-workflows.
if isinstance(task.task_spec, EndEvent) and task.workflow == self.bpmn_workflow:
endtasks.append(task)
return endtasks[-1]