cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Parallel Branch not running parallel

I have a flow where I am using a "For each" loop to initiate an approval for multiple users, and (what I want) is in parallel, series of steps to send reminders after certain times pass. Credit @David Blyth for this blog post as the core of the flow. https://flow.microsoft.com/en-us/blog/approval-reminders-using-parallel-branches/ This worked fine when I tried it initially, but when I added the "Apply to Each" control and put the parallel steps within the loop, it stopped working. What happens now is the parallel branch that should send reminder emails just sits until the approvals are returned, then it fails. In this approach, the 'terminating' trick on the "Do Until" is a variable that is updated when the approval response is returned. I have tried both Boolean and String, "is equal to" and reversing to "is not equal to", and nothing changes. None of the approvers ever see a reminder email, even though we are waiting for it (delays set to minutes for testing). Any thoughts? Is the Parallel branch not functional within a "Apply to Each" loop? Also, not sure how to attach a screen print of my flow....
4 REPLIES 4
Highlighted
Helper I
Helper I

I so dislike responding to my own question, but Friday this was not working, today it is... go figure. However, in my parallel branch, I ALWAYS get at least one iteration, even if the "Do Until" is satisfied before the initial delay is expired. Again, apologies that I have not figured out how to attach a screen print, but the branch contains; A delay - A Do Until "ApprovalDone" variable is equal to "YES" - --within the Do Until --Send an email --Another delay so the loop waits a while before checking again. The variable "ApprovalDone" is set to "YES" in the other branch after the response is received. There is other processing, including a confirmation email in that branch, which all complete prior to the timer for the initial delay, so the variable should be set to "YES" on the first cycle of the Do Until, but I get one iteration of the contents of the Do Until anyway. Also, in the output of the test run, the Do Until runs "successfully", but the output indicates "There are no actions in this Do Until scope." ... and this is the result if I deliberately wait until it would be triggered, or if the response is provided before the first timer would go off. This seems weird to me.... Any idea how to prevent the run of the Do Until if the variable is set prior to it's execution?
Highlighted

I am having the same issue when using a for loop to create the parallel branches.  Are you still using a for loop?

Highlighted

I am not. Turns out that variables are "flow-wide", not contained within a For/Each loop. Meaning, if I have 3 approvers, and I increment the variable within the For/Each, a single pass gets 3 increments since there are 3 parallel branches. 

 

I have since moved my reminder bit to a separate flow. Much more cumbersome (had to create fields on the List to be able to match to the request and keep track of dates) but it's working for us.

Highlighted
New Member

I was having a similar issue but was able to figure it out with the following flow. The do until pieces for my first 3 approver wave is parallel but not in the wave of send and wait for approvers. Let me know if you need more detail. Screen Shot 2020-09-22 at 10.40.43 AM.pngScreen Shot 2020-09-22 at 10.39.06 AM.png

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (7,326)