cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lucian
Advocate III
Advocate III

How to force exit or continue a parallel branch

Hello,

 

I have a situation where I need to close/exit from a parallel branch when the other branch is done.

For explaining my situation I have created a "smaller" flow which basically will have one or two approvers, depending on a condition, and because the approvers might forget to "action" there is a "reminder" that will be sent with the help of a parallel branch.

 

The "general view" is as follows:

1.png

The problem in inside the "condition" card where depending on some checks should be a "first approver" otherwise will go directly to the "main approver".

2.png

My issue is the fact that on the YES branch, even the logic is similar with the "main approver", because all is inside the "yes block", will not immediately continue to the "Initialize variable - boolApprover2Done" card, and will wait until the "reminder" parallel branch will finish. 

And these reminders are sent every couple of days, so the "yes branch" will not finish until at least one wait cycle has passed.

 

I have even tried to "rejoin" that parallel branches but still no luck to make it "ignore" the delay branch.

 

3.png

 

So, is there a way to exit that "yes branch" immediately as the "optional approver 1" will take any action?

 

Kind Regards,

Lucian

1 ACCEPTED SOLUTION

Accepted Solutions
Hardesh15
Super User
Super User

@Lucian  I haven’t tried this but your case forced me to think deep. So I have thought process.

add one more do until inside do until and place shorter delay inside second do until loop.

if you are using 24 hr delay then in second inside loop use delay of 5min with count 12x5x24. And use condition inside second do until so that every 5 min it will check variable if variable false it will come out of loop.

let me know it it works.

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

View solution in original post

2 REPLIES 2
Hardesh15
Super User
Super User

@Lucian  I haven’t tried this but your case forced me to think deep. So I have thought process.

add one more do until inside do until and place shorter delay inside second do until loop.

if you are using 24 hr delay then in second inside loop use delay of 5min with count 12x5x24. And use condition inside second do until so that every 5 min it will check variable if variable false it will come out of loop.

let me know it it works.

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

Lucian
Advocate III
Advocate III

Hi @Hardesh15 ,

 

Thank you for your message. Indeed having a second do  until loop will do the job. 👍

 

Even I have tried to avoid this kind of loops because are harder to debug (cannot see inside them when flow is running, and I will not "see" how many times that loop was executed) but it seems that at least for this moment, there is no better idea.

 

Kind Regards,

Lucian

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (2,922)