From e6a5e5a42ce2764e6de7c0c7f282d68e50e38cee Mon Sep 17 00:00:00 2001 From: Elizabeth Esswein Date: Mon, 6 Nov 2023 12:40:33 -0500 Subject: [PATCH] make sure subprocess tasks are always added --- SpiffWorkflow/bpmn/workflow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SpiffWorkflow/bpmn/workflow.py b/SpiffWorkflow/bpmn/workflow.py index 4b5f8479..0ccf3593 100644 --- a/SpiffWorkflow/bpmn/workflow.py +++ b/SpiffWorkflow/bpmn/workflow.py @@ -68,7 +68,7 @@ def _next(self): self.task_list = [] elif all([ len(task._children) > 0 or subprocess is not None, - task.state >= self.min_state, + task.state >= self.min_state or subprocess is not None, self.depth < self.max_depth, ]): if subprocess is None: @@ -76,7 +76,7 @@ def _next(self): elif self.depth_first: next_tasks = [subprocess.task_tree] + task.children else: - next_tasks = task.children = [subprocess.task_tree] + next_tasks = task.children + [subprocess.task_tree] if self.depth_first: self.task_list = next_tasks + self.task_list