Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Dynamic creation of branches in flow designer

MKrishnaCB
Tera Contributor

Using the Do the following in Parallel in flow designer, we have the option to manually add the number of branches for parallel execution. I would like to know if we also have an option to create the number of branches dynamically.

3 REPLIES 3

JenniferRah
Mega Sage

Technically, no. But it depends on what you want to do. If you are wanting to create a dynamic number of tasks, for example, based on a variable or condition, then you can just create all of them and don't click the "Wait for completion" checkbox. Then after you have created all the tasks, wait for them all to complete. It's not technically a Do the following in Parallel, but it accomplishes the same thing.

ur42
Tera Contributor

How would you implement the "Wait For" condition?
I mean, lets say having created 3  (non-wait) "parallel" catalog tasks. (or 4 or 5) - and you have registered the task numbers in a flow variable (or so).
How would you define the Wait For condition (which takes typically one table record + field values to trigger on) - is there a trigger based solution?
(or is your proposal to write a polling loop , checking every x minutes all task closure states to decide on wether go sleep again or continue?)

 

It's a Wait for Condition activity that I was referring to. 

 

I believe when I implemented this, I had a business rule that ran when the specific tasks were closed. When the parent RITM had no remaining open tasks, I set a variable. The Wait for Condition activity in the flow was waiting for that variable to have a specific value. Once it did, it would proceed in the flow.