In Step 2, you can enable the Error Handling option on an Action’s pop up. Enabling error handling will allow you to continue executing workflow in a multistep workflow even if one of the steps or action failed (for any reasons).
If Error Handling is enabled, a workflow will continue executing and the status will always be Success even though one of the action failed.
If Error Handling is disabled, a workflow stops at the node or action that failed to execute and the workflow status will be shown as “failed.”
The Error Handling option is available only for actions and not for conditions.
As soon as you enable Error Handling for an action, you’ll see that all the action nodes below are moved under a new condition node called “Success” and a parallel “Failed” node will be created as well.
You’ll not be able to edit the Success and Failed condition nodes, but you’ll be able to view them. Also, you’ll be able to add more nodes under the Success and Failed condition nodes and not between the action node and its associated Success/Failed condition nodes.
The Success and Failed nodes ensure that when the respective action gets executed successfully, the nodes under the Success condition node get executed and when the respective action fails, the nodes under the Failed condition node get executed. Overall, the workflow automation status will be shown as “Success” even if the action for which error handling is enabled fails while all other nodes after that action get executed successfully.
When you enable error handling for an action, you can determine the nodes after that action that fail during execution. This will be represented by the total number of errors during the test-run of the workflow using the Run option.
You can disable error handling for an action node when the workflow isn’t linked with a dialog. However, disabling error handling does not delete the Success and Failed nodes associated with that action node. You’ll have to manually delete the Success and Failed condition nodes. Till you do this, the Success and Failed nodes as well as the nodes where the deleted action node’s context variables are used will display a warning sign on them. You’ll won’t be able to test or deploy the workflow untill the warning sign appears on the Success and Failed condition nodes.
Also, you won’t be able to add new nodes between an action and its associated Success and Failed condition nodes.
Whenever you enable Error Handling for an action, the workflow builder will check and create a new Success/Failed condition node depending on whichever node is absent.
- Outputs of previous nodes that got executed successfully will only be available as inputs for a node on the Automation Variable Picker pop up.
As you can see from the image, since the send email action was a success, the output variables from all the previous action nodes (Create Group and Send Email) will be available as input on the variable picker for the new action.
As you can see from the image, since the send email action failed, the output variables from the failed action nodes (Send Email) won’t be available as input on the variable picker for the new action.
- A word of caution: Before enabling error handling for an action node, determine whether that action has less impact on its related dialog.
For instance, let’s say there are two actions inside a workflow for creating a group in Office 365 — one for creating the group and the other for sending an email to the admin if the group gets created successfully. We can enable error handling for sending an email action since it has less impact on the overall workflow and we can ignore it when it fails to execute. The main action here is creating a group in Office 365.