Skip to content

Commit e6a5e5a

Browse files
committed
make sure subprocess tasks are always added
1 parent 1378127 commit e6a5e5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SpiffWorkflow/bpmn/workflow.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ def _next(self):
6868
self.task_list = []
6969
elif all([
7070
len(task._children) > 0 or subprocess is not None,
71-
task.state >= self.min_state,
71+
task.state >= self.min_state or subprocess is not None,
7272
self.depth < self.max_depth,
7373
]):
7474
if subprocess is None:
7575
next_tasks = task.children
7676
elif self.depth_first:
7777
next_tasks = [subprocess.task_tree] + task.children
7878
else:
79-
next_tasks = task.children = [subprocess.task_tree]
79+
next_tasks = task.children + [subprocess.task_tree]
8080

8181
if self.depth_first:
8282
self.task_list = next_tasks + self.task_list

0 commit comments

Comments
 (0)