Open erwinvaneyk opened 7 years ago
What about Solution 2, but with a count instead of the actual list?
@soamvasani seems like a good trade-off indeed. Although in that case you the engine cannot provide feedback on where the (infinite) recursion/error actually took place/started. Not sure if that is a realistic use case though.
Given that a major emphasis is made on re-using workflows and recursion over iteration. It is vital for the workflow engine to have some sort of recursion detection.
Solution 1 A "parent" parameter could be added (as a header for example) that links a workflow to its parent workflow. From there the workflow engine can analyze the workflow dependency graph to determine whether a infinite recursion is occurring
Potential issues:
Solution 2 Add a stack parameter to the request, containing all preceding workflow invocation ids. The workflow engine can infer can simply call a stack overflow if the stack becomes to large.
Potential issues:
...