How does Parallel branch work? Does it run each step on the left side and the right side in parallel?
Like, the 2nd action on the right side is completed but won't move on until the 2nd action on the right side is also completed?
HI @lavint yes you've pretty much got the grasp of it. It's effectively two parts of the process which can be run at the same time, so if they don't have a dependency on each other, then you can run them in parralel. You can then bring the two parallel legs back together to continue the process in serial.
The main advantage of doing this are that you can make your Flow uber efficient if you can get elements working in parallel. Just bare in mind that if you call a Terminate on either side of parallel runs, then it will terminate the entire Flow.
I tend to use parallel legs for when I'm initialising all my variables at the start. Rather than having 4 variables running in serial, I'll do them in parallel so that it makes my Flow look tidier, but also I'm sure it'll shave a few millionths of a second off the run time too 🙂
so my question is,
If there is 10 activities on the left side and 2 activities on the right side.
Timing wise, how does it work? Can the left side finished 10 activities while the right side still in 1?
Yes, the left side can still be processing while the right side is waiting, and the Flow won't continue until both legs have fully executed.
The timing of the two threads (left and right) are completely independent of each other. It processes each set in whatever time it takes. The second step in the right path doesn't wait for the first step in the left path to complete. It only waits for the step above it. so which one finishes first depends on how long the steps take, not on how many steps there are.
I may have caused some confusion with the way I explain it so I've created a Flow to demo
Delay 1 takes 1 minute
Delay 2 takes 2 minnutes
Initialize variable will not run until both Delay 1 and Delay 2 have completed
It wasn't so much your explanation as something that @lavint said in his question where he implied that the two sides took turns running actions. I wanted to make sure he understood that they were completely independent of each other until they were both finished.
Fill out a quick form to claim your user group badge now!
We've given our badges an overhaul and also added some brand new ones!
Learn how to build the business apps that you need.
Find out where you can attend!
Watch & learn from the Power Automate Community Video Gallery!