cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lucaso1
Frequent Visitor

Do until approval timeouts

Hello,

I built a simple 2-step approval worflow, basically 2 approval action items nested inside a do until. I tinkered with Do untils and Approvals timeout actions so as to last the full 30 day period in which any flow timeouts (the count on the do until was left blank). The issue I encountered was, once the flow timed out the do until re excuted automatically thousands of times, sending countless approval requests to users; it makes sense, having never completed the exit condition the flow re-executed (however as I understand it if the action times out, it should not rexecute infinetly). My quick fix of this problem was setting the count to a low number (3) so it won't sell thousands of emails (just 3) and reducing the timeout on the approvals and loops to just under 30 days (to cause the do until to tiemout before the flow itself). Are these measures enough to stop this problem? Is there anyway for do until to exit the loop once it times out without the exit condition being met (so as no requests are sent instead of just 3)?

Second problem I encountered was, once I identified the issue I tried to get ahead of the problem and cancel any flows whose 30 day limit was approaching. I cancelled and resubmitted 3 flows before it got to that point, however, out of those 3 cancelled runs, 2 encountered the same issue (iterartive approval requests once the original register reached 30 days) despite my efforts to contain, but the other carried on without a hitch. Can anyone explain this weird timeout behaviour? Why would a cancelled flow run still execute any action?

9 REPLIES 9
v-alzhan-msft
Community Support
Community Support

Hi @Lucaso1 ,

 

Could you please share a screenshot of the configuration of your flow?

 

For your first problem, I think that your quick fix solution to prevent the email is feasible, you could also add a action to run after the Do until is run failed, so the flow would run with success result.

 

For the second problem, it is an expected behavior, for an example, if the flow will be triggered when an item is created, we disable the flow and create any items when the flow has disabled, when the flow is turn on again, the items (which was created when flow is turn off ) would also trigger the flow to run.

 

Best regards,

Alice   

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

Thanks for the answer. In regards to the first issue, I'll try adding a conditional option evaluating if do until failed, though today I noticed, Do until actually starts rexecuting before the actual Flow timeout, it's as if after a certain period it simply ignores the 'wait' part of the 'wait for all approvals' and it just runs again time after time; it's not that do until 'fails' it just ignores it's time sensitive conditions. 

 

In regards to the second issue, I'm not sure I understand what you mean; the Flow was triggered 30 days ago (as it should have been), cancelled 29-ish days later (as the 30 day timeout was approaching) and resubmitted (so as to trigger the subsequent actions in a new 30 day span) but Do until still behaved in this strange manner, rexecuting indefinetly without waiting for an answer. The approval requestes eventually stopped after the user rejected the approval and do until started working properly again. After looking over these 3 cases, the only difference I could find was how close the registers were to timeout. I had a register that timed out today and I cancelled without resubmitting.

I'm having trouble accesing my Flow, I Will post it as soon as I get the chance.

Hi @Lucaso1 ,

 

Sorry for I have misunderstand you on the second problem, do you mean the flow would still run when it is turned off?

And if the flow is running, the run would continue even though you have turned the flow off.

 

Best regards,

Alice   

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

Nope, the Flow was never turned off.  After a register is created a Flow Run is triggered, which shows up on the run history, that single run register can be active for 30 days, otherwise it times out. Since I was apporaching that 30 day run I manually cancelled that specific Flow Run/register but the Flow Run kept executing nonetheless, sending out absurd amounts of approval requests.

Hi @Lucaso1 ,

 

How do you manually cancelled the flow?

 

Best regards,

Alice   

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

I went into the Flow, checked its run history, selected the ongoing run and pressed cancel. 

 

Run history.png

Hi @Lucaso1 ,

 

What is the screenshot of the flow?

Are you cancel the flow before the flow run finished?

 

Best Regards,

Alice

 

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

The screenshot is me showing how I manually cancelled the Flow run, I did that on another register, the Flow run status changed from 'Running' to 'Cancelled' but it still caused the same issue...

PC31
Frequent Visitor

@Lucaso1 : what was the solution for first problem?
If I keep DoUntil count as 3 then it runs for 3 approvers aonly & flow exit successfully whereas I have more approvers. (do not wait for all responses)
If I keep count higher than number of approvers then approver get these many mails when approval Timeout. Please guide
Thanks in advance

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 (2,132)