cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rajesh
Advocate II
Advocate II

Flow Approval - Dynamic parallel approval, end when anyone rejects

Hi

 

I've a requirement to send approval requests to multiple teams at once in parallel. User fills the data in a SharePoint list, selects the different teams(choice column that allows multiple selection) and other metadata and submits.  Each team has a set of approvers. Once the form is submitted then the flow sends approval requests to approvers of all selected teams in parallel. I've managed to get the dynamic parallel approval process working using the foreach action and setting the concurrency control for the foreach loop of teams. (https://flow.microsoft.com/en-us/blog/advanced-flow-of-the-week-send-parallel-approval-requests-to-a...

 

Within the forach loop of team, I get all the approvers for the respective team which looks like approver1;approver2;approver 3 etc., start an approval process with approval type set to anyone from the assigned list which means any approver from the team can complete the approval process. I'm able to collate the approvals from all the teams and decide whether the request is approved by all or rejected by one or more teams. What  I would like to do is, when any approver from a team rejects the request then terminate the approval process completely and send a mail to requestor without other teams approvers having to complete their approval process. Also remove the pending approvals from the approvers of those teams that have not yet reviewed. Is there a way to achieve this?

 

Thanks

 

 

5 REPLIES 5
v-yamao-msft
Community Support
Community Support

Hi @Rajesh,

 

Do you want to terminate the flow when any approver Reject the request?

Do you want to stop other parallel approvals when a team rejects the request?

Please check the following flow for a reference.

Under the action Start an approval, add a Condition to check if Responses contains Reject, if yes, terminate the flow and set the variable to Failed.

1.PNG

Besides, it is not possible to remove pending approvals from the approvers that have not yet reviewed, if you need this feature, please submit a request on Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The start approval process is within the foreach loop as the number of teams is dynamic as shown below. I've turned on the concurrency control on the foreach control so that all teams are notified at once and approvers from the respective teams can start reviewing the request in parallel.  I would like to terminate when any approver from a team rejects the request. Requestor is notified that request is request is rejected and needs to amend and resubmit

 

approval.png

lakeside
Regular Visitor

Hi @Rajesh ,

 

I know it's being awhile now that you had to work on this but I have exactly the same task to work on where if anyone rejects, it stops the parallel approvals and goes to next step or terminate the approvals. Were you able to resolve this?

 

Thanks in advance.

wolfy_
Frequent Visitor

Hi,

Is there a solution?

Before the Loop Initialize a string variable called Approval and set the default value to Approved...

Inside the loop for the very first step add a condition that states if the variable [Approval] is equal to Approved...  

Move the approval process and your append variable step under the Yes section of that condition...  

Add another condition after the Approval process that checks the outcome of the Approval process...  If it was approved then set the [Approval] variable to Approved...  If it was rejected then set the Variable to something else...  

 

MrCokeMan_0-1628608790757.png

 

 

MrCokeMan_1-1628608846489.png

 

When the flow is processed, it will still run through the entire loop, but if any team rejects the approval along the way then the loop will not process any additional approval requests...  

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,689)