Error Handling Category
The actions category enables you to add re-throw fault and throw new fault actions to an integration.
Catch Faults with a Re-throw Fault Action
You can send failed messages to the error hospital for further analysis with a re-throw fault action. If the integration contains a defined global fault, the error captured by the re-throw fault action is sent through the global fault and onto the error hospital for analysis. If no global fault is defined, the fault is sent directly to the error hospital for analysis. The re-throw fault action can only be placed inside the fault handler section of a scope action. The re-throw fault action operates as a catch all block and is processed if a fault is thrown by an invoke action in the scope. However, the re-throw fault action does not have a specific catch named for it. The following example describes how to define a re-throw fault action in a scope action.
-
Create an integration that includes a scope action. See Manage a Group of Actions and Fault Handlers with a Scope Action.
- Double-click the scope.
- Select Actions
, then Fault Handlers, and then Default Handler.
The scope action is now in fault design mode.
-
Add a re-throw fault action to an integration in either of the following ways:
- On the right side of the canvas, click
Actions
and drag the Re-throw Fault action to the + sign.
- Click
at the location where you want to add the re-throw fault action, then select Re-throw Fault.
This creates a re-throw fault action in the fault handling section of the scope action.
Any faults captured by this action are passed to the error hospital for analysis. Because of this fault, the integration flow is terminated.
- On the right side of the canvas, click
Actions
-
Double-click the scope action to return to design mode.
The Re-throw Fault action is hidden.
-
Design your scope action.
- To return to fault mode, double-click the scope.
- Select Actions
, then Fault Handlers, and then Default Handler.
Throw Faults with a Throw New Fault Action
You can create and throw your own faults in an integration with a throw new fault action. During configuration of this action, you define the condition under which to throw the fault and the point in the integration at which to throw the fault. You can add this action at the end of a block (for example, a for-each action, switch action, and so on). Nothing can be dropped after this action in the block.