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

Issue with Multi Step Approval Flow

Hi all, 

I want to create a Document Approval Workflow for Sharepoint. The requirement is, that when an approval instance has rejected, the approval request should go one step back to the approval instance before like approval instance 2 has rejected it should go back to instance 1.

It works for approval 3 to go back to 2 but it did not work for approval 2 to go back to approval 1. In this case the approval 2 instance got the request again.

I guess  the "Do until" is not place correct?

The outcome of "Do until 2" is based on approval 3 and the outcome of "Do until 1" is based on the outcome of approval 2.

grafik.png

 

Any suggestions?

3 REPLIES 3
Super User
Super User

Re: Issue with Multi Step Approval Flow

Could I suggest a slightly simpler design?  Create two variables. The first is an array of Approver emails that you want to use.  The second is an integer that records the Approval step to be processed and intialize it to 0. Then start a Do Until loop that will run until Approval step is greater than 3 or less than 0. In the Loop send an Approval to the approver in the array using the Approval step as an Index.  When the response is returned increment the the Approval step if it was approved and decrement the step if it was rejected.  Then loop.  The Loop will continue until either the first person in the Loop rejects the approval or the last person in the Loop approves.



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

Re: Issue with Multi Step Approval Flow

Hello @Pstork1,

 

thansk for your reply.

 

I´m not sure if I got this completely.

If I count the loop and have just one loop, how it is to suppose to just step one back?

E.g. if approval instance 3 has rejected it will not reach the value 3 and the loop will begin again at the top, or?

 

 

Super User
Super User

Re: Issue with Multi Step Approval Flow

Here's a table that tracks through what a potential set of Loop runs would look like for the following Array of Approvers.  "Approver1, Approver2, Approver3" with a starting value in Approval count of 0

 

Loop Number          Count        Is Count < 0 or >= 3         Approver         Result        Count after Response

1                                 0                            No                      Approver1    Approved                   1

2                                 1                            No                      Approver2     Reject                        0

3                                 0                            No                      Approver1    Approved                   1

4                                 1                            No                      Approver2    Approved                   2

5                                 2                            No                      Approver3    Approved                   3

6                                 3                            Yes                         *** Loop Exits ***

 



-------------------------------------------------------------------------
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 Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

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!

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: 330 members 5,204 guests
Please welcome our newest community members: