Flow orchestrator pattern

I'd like to get feedback on this code where I'm defining a pattern.


I'm looking to get the best logic to manage the execution of groups of flows and tasks with recursion and without stack overflow.

Having nested functions would be a solution that generates a high consumption of the stack memory.

That's why I'm using a loop to organize the execution of flows and tasks.
Trying to optimize the code to be as fast as possible. At this point I would need your comments and alternatives.

Thank you!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.