I have a State Machine Flow on a SharePoint list which goes with 4 different approvers. Any time an approver rejects it, the flow goes back to requestor with custom approval actions "Submit for Approval" and "Withdraw". Here the requestor can make changes to the list item and "Submit for Approval" again. I dont want any flow to be triggered again here. I am already using a flag (StartWF text column) to decide whether to run the flow or not during the flow run. During this entire process, if my List item which is under approval process is modified, my flow is triggered again causing parallel runs which is a great confusion. How should I avoid this?
The solution below mentioned setting concurrency control value to 1 can avoid this situation, but it also mentions that the subsequent flows will be in queue and be triggered once the running flow is complete. I do not want that. As a record can undergo lot of changes during the state machine workflow, how can i one do this with single flow? Can someone help please
You will have to Implement State Machine Pattern using Switch and Do until. Your currently running flow should not end. If Approver Rejects, you can send it to Submitter with Custom outcomes. If Submitter Selects Resubmit, you can again change state to start of the flow. Refer to a great Video submitted by Rezza Durrani which can be a helpful resource.
I did exactly what the video was shown. It was my reference while creating the flow. But what if submitter changes the list item during the flow, will the flow be trigger again? Wouldnt it be duplicate on existing flow?
Hello @RameshMukka ,
reading your description, I'm wondering if you really need the flow to run 'When item is modified'? If it should loop until it's approved or withdrawn, wouldn't the trigger 'When item is created' be better, to start only once after item is created? Then you wouldn't care about any updates on the item.
I quickly checked the linked video and also Rezza is using the trigger 'When item is created', ignoring item updates.
Hi @tom_riha ,
I agree with you but am using other video of Reza where he covered flow with long running approvals. Here is the link https://www.youtube.com/watch?v=h6Eb-F0P6Hs&t=1802s. if you notice there is no loop here so we had to choose the trigger when the item is created or modified.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Explore the latest tools,training sessions,technical expertise, networking and more.