Skip to content

Commit 8e000c0

Browse files
committed
fix recursion error in inclusive gateway check
1 parent c62a76d commit 8e000c0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

SpiffWorkflow/bpmn/specs/mixins/inclusive_gateway.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,13 @@ def _check_threshold_unstructured(self, my_task):
9595
# Handle the case where there are paths from active tasks that must go through waiting inputs
9696
waiting_inputs = [i for i in self.inputs if i not in completed_inputs]
9797

98+
checked = []
9899
# This will go back through a task spec's ancestors and return the source, if applicable
99-
def check(spec):
100+
def check(spec):
101+
checked.append(spec)
100102
for parent in spec.inputs:
101-
return parent if parent in sources else check(parent)
103+
if parent not in checked:
104+
return parent if parent in sources else check(parent)
102105

103106
# Start with the completed inputs and recurse back through its ancestors, removing any waiting tasks that
104107
# could reach one of them.

0 commit comments

Comments
 (0)