cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AIUYM19
Helper V
Helper V

How to prevent one failed action from failing the whole flow

I've been experimenting with some error handling in my Power Automate flows, because much of the time, the errors that occur are ones that can be ignored, and I still want the rest of the flow to run. Typically, I've been using a model where after an action that has a non-negligible probability of failure, I have two parallel branches: one that runs if the action was successful and one that runs if the action failed. For simple cases, this has been working.

However, in flows where the failure can occur within a scope or other control block, the failure of any action within that block causes the entire block to fail, even with that error handling inside. Take this example...

PowerAutomate_FailedScope.png

The action outside of the block is configured to run if its "parent" branches are successful or skipped. But when anything inside that scope block fails, the whole scope is marked as failed, so that following action doesn't run. You can see in the image that the error handling itself actually worked; the "failed" branch ran, and the "successful" branch was skipped. So, how do I make this situation report the scope as a whole as successful?

1 ACCEPTED SOLUTION

Accepted Solutions
AIUYM19
Helper V
Helper V

The only solution I've found to this is to change how the error handling works. Instead of configuring the succeeding actions to run after "is successful" and "is skipped," I also needed to enable "has failed."

This has the effect of causing the error handling to work not as intended, however. I want the flow to continue if and only if the preceding actions in all relevant branches was successful or skipped, but I don't want the flow to continue if one of those actions failed. The problem lies in the behaviour of the scope container, which is reported as "failed" even if error handling within it has ensured a failed action is handled properly, and all subsequent actions in the container were successful or skipped.

Suggestion to Microsoft: re-tool the scope container to report a "successful" status if the final actions of each contained branch is either successful or skipped following an error handler. I will post an idea to this effect.

View solution in original post

3 REPLIES 3
CFernandes
Super User III
Super User III

Hey Mate,

 

You can add Error handling - https://flow.microsoft.com/en-us/blog/error-handling/

 

CFernandes_0-1618850203987.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi, @CFernandes. That's precisely what I've done (described in my original post), but the entire block is still marked as failed, when it should be marked as successful, because the error handling inside was successful.

AIUYM19
Helper V
Helper V

The only solution I've found to this is to change how the error handling works. Instead of configuring the succeeding actions to run after "is successful" and "is skipped," I also needed to enable "has failed."

This has the effect of causing the error handling to work not as intended, however. I want the flow to continue if and only if the preceding actions in all relevant branches was successful or skipped, but I don't want the flow to continue if one of those actions failed. The problem lies in the behaviour of the scope container, which is reported as "failed" even if error handling within it has ensured a failed action is handled properly, and all subsequent actions in the container were successful or skipped.

Suggestion to Microsoft: re-tool the scope container to report a "successful" status if the final actions of each contained branch is either successful or skipped following an error handler. I will post an idea to this effect.

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,285)