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.

  1. Create an integration that includes a scope action. See Manage a Group of Actions and Fault Handlers with a Scope Action.

  2. Double-click the scope.
  3. Select Actions Actions icon, then Fault Handlers, and then Default Handler.

    The scope action is now in fault design mode.

  4. Add a re-throw fault action to an integration in either of the following ways:
    • On the right side of the canvas, click Actions Integration actions icon and drag the Re-throw Fault action to the + sign.
    • Click Add icon 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.


      The fault handler shows a re-throw fault action inside it.

    Any faults captured by this action are passed to the error hospital for analysis. Because of this fault, the integration flow is terminated.

  5. Double-click the scope action to return to design mode.

    The Re-throw Fault action is hidden.

  6. Design your scope action.

  7. To return to fault mode, double-click the scope.
  8. Select Actions Actions icon, 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.

  1. Add a throw new fault action to an integration in either of the following ways:
    • On the side of the canvas, click Actions Integration actions icon and drag the Throw New Fault action to the appropriate location.
    • Click Add icon at the location where you want to add the throw new fault action, then select Throw New Fault.
  2. Click Edit Edit icon under Throw New Fault to enter a name and optional description for the throw new fault action.
    The Throw New Fault panel is displayed.


    The Throw New Fault panel shows the name field, description field, Code field, Reason field, Details field, and Skip Condition field.

  3. Click a field to open the Sources panel and specify values in any of the following ways:
    • Enter manually.
    • Select from the list.
    • Click Switch to Developer View Switch view icon to drag a value from the Sources panel.


      The Input Sources tab is selected. The Functions tab is to the right. Below Input Sources, the Sources tree is shown. On the right, the Throw New Fault panel shows the name field, description field, Code field, Reason field, Details field, and Skip Condition field.

  4. Complete the fields:
    Element Description
    Code

    Create a code value. This is a mandatory field.

    Reason

    Define a reason for the error.

    Details

    Define additional error details.

    Skip Condition

    Define a condition to prevent the fault from being thrown.


    The Throw New Fault panel shows the name field, description field, Code field, Reason field, Details field, and Skip Condition field.

  5. Click Save

    If a skip condition is not defined, the throw new fault action is displayed with a dashed line connecting to the next action. This signifies that the action continues processing only after processing the fault.


    Throw new fault action with a dashed line extending from the bottom.

    If a skip condition is defined, the line connecting to the next action is solid. The solid line indicates that it is possible that the processing of the integration bypasses the fault and goes straight through to the next action.

    Deleting the throw new fault action has no impact on downstream activities because this error does not have any output. Any changes to upstream activities triggers a throw new fault action validation because both the Code, Reason, and Details fields in the Throw New Fault page can point to flow input or upstream outputs.