i want to have an approval on a report where the manager 3 approval is needed. So, the loop has to continue until the approval from the relevant manager is received.
I tried to run it using a Do-Until loop, but something seems to be missing.
3. If Response from manager 1 equals
3a. Approve then go to step 4
3b. Reject then go to step 2
4 send to manager 2 approval
5 If Response from manager 2 equals
5a. Approve then go to step 6
5b. Reject then go to step 3
6.For Approval Manager 3...
6a. Approve then terminate and send an email
6b. Reject then go to step 5
This should loop until approval from Manager 3
I'm just looking at the logic and wonder if it's overly complicated.
What happens if Manager 3 rejects the report? Does the report then need to be modified? If so, then I would expect Manager 1 to have to re-approve the report since it's different to what they originally approved.
I would actually suggest (just my opinion) you simplify it, so it starts with Manager 1, and at any time it's rejected (by any of the managers during the process) it goes back to you to modify the report and re-kick off the approval starting from Manager 1. This will always ensure your managers are approving the final report.
You
Manager 1
Manager 2
Manager 3
In my mind this is better in the sense that your managers are always approving the final report, and very simple logic/flow.
I would have achieved this state machine workflow using an HTTP-triggered flow.
Something on these lines: