Take a look at the 5 screenshots here on imgur: https://imgur.com/a/l3tepMU because the picture attachment on this forum does not allow more than 3 files and compresses the screenshots so much you won't be able to read anything if I just insert them here.
Please pay attention to the red rectangles. All the Wait for approval actions have a timeout setting so that when the last action in the chain times out, everything after it should be skipped. The Scope action block CATCH00::time out has its Run After configured to run only if the previous Scope block times out.
Problem:
But that is not what happens. Instead, it is the CATCH01::failure Scope action block that runs as if the TRY Scope action block had failed, but it hasn't--it only has timed out.
Now, the APPROVAL SEQUENCE Scope block gets an error message that an action failed. This action comes after the last Wait for an approval, which in this run has timed out. Correctly, all the actions in this Scope that follow have status Skipped, but the first action outside the APPROVAL SEQUENCE Scope has status Failed. This action is inside Scope TRY and this Scope TRY has status failed as well and thus the wrong CATCH Scope gets executed.
Question:
Why is the status of action SETVAR004 set to Failed instead of Skipped??? In other words, why is the status of the previous block, namely Scope APPROVAL SEQUENCE set to failed when all we got is a time out and everything after that is status == Skipped?
Technically speaking, action SETVAR004 status should equal Skipped instead of Failed even though Scope APPROVAL SEQUENCE has not fully completed. The reason it has not fully completed was because of a time-out, not an ActionFailed. Therefore the Scope APPROVAL SEQUENCE should not be attributed status Failed, but its status should reflect the status of the last action that prevented it from running completely. In this case, one action times out, so the time out status should propagate up to the enclosing Scope block whose status should show Timed out instead of Failed.
Of course, the ugly workaround, and I stress the word 'ugly' here as this is not elegant at all, is to move the time-out CATCH00 Scope into the APPROVAL SEQUENCE Scope. But doing so, makes it less obvious what the termination conditions are when opening the flow for editing since by default the enclosing blocks will be collapsed. It is much clearer what the intent of the code is if all the CATCH blocks are located outside the main TRY block, thus after it and at the end of the workflow where at a glance you can immediately see what all the different terminal conditions are.
This is just getting better and better! Can't have a Terminate action inside a FOREACH loop and the reason there is a loop there is because Power Automate does not let me delete it, that is it does not let me move the Switch action block out of the loop without generating an error which then prevents me from deleting the loop and saving the flow! As a result, I had to create a dummy array with 1 element just so that the loop would run once and this way the Switch gets executed. Talk about an inelegant mess!
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2