Configure Exception Handling
First published on: 08/08/2023/10:38 pm
In some situations, the workflow can handle actions that fail due to business exceptions. Action failures stop the normal flow and enter into an alternative path defined by the branch’s exception block.
Exception blocks have additional variables that can be used by the actions and branches. Typically, a "switch branch" inspects the exception details, allowing issues to be handled appropriately.
Set "Exception Handling Mode" to one of the following options to enable the exception block:
-
No exception handling – Disable exception handling and remove the exception block from the branch. This is the default option for new branches.
-
Continue the workflow – When an action fails within the branch, the exception block will be executed; the workflow will continue normally after the failed branch.
-
Bubble up the exception – When an action fails within the branch, the exception block will be executed. Then, the branch will send a failure to the parent branch. If the branch is the top-most branch, the workflow will end in failure.
-
Retry – When an action fails within the branch, the exception block will be executed. Then, the workflow will end in failure and be set up for retry.
-
Fail without retries – When an action fails within the branch, the exception block will be executed. Then, the workflow will end in failure and won't be retried, even if retry settings are enabled.
You can configure the exception block for a branch as if it's a branch (i.e., actions and branches can be added to the exception block), with additional details available to those actions and branches.
Typically, a switch branch inspects the exception information, then handles certain exceptions.
Within the switch case’s condition:
- Press the + button to expand the "variables" menu (marker 1 below).
- Select the desired "Exception Variable" (marker 2 below), such as "ExceptionDetails" or "ErrorCode".
- Each vendor/action will generate different error messages, so you must configure this based on the vendor’s API documentation to identify expected error messages.
For example, you can configure it so that: ErrorSummary contains “Account is Locked”, which will match action failures that contain that phrase.
Last modified: 03/25/2025/12:53 pm |