cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lavint
Level: Powered On

Can someone please explain Parallel branch?

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? 

 

Thanks

6 REPLIES 6
Super User
Super User

Re: Can someone please explain Parallel branch?

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 Smiley Happy





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





lavint
Level: Powered On

Re: Can someone please explain Parallel branch?

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?

Super User
Super User

Re: Can someone please explain Parallel branch?

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.





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





Highlighted
Super User
Super User

Re: Can someone please explain Parallel branch?

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Super User
Super User

Re: Can someone please explain Parallel branch?

I may have caused some confusion with the way I explain it so I've created a Flow to demo

 

Parallel.PNG

 

Delay 1 takes 1 minute

Delay 2 takes 2 minnutes

 

Initialize variable will not run until both Delay 1 and Delay 2 have completed





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





Super User
Super User

Re: Can someone please explain Parallel branch?

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 36 members 4,374 guests
Please welcome our newest community members: