Add Global Fault Handling to Integrations

You can add global fault handling to integrations. This functionality enables you to direct business faults back to the caller or apply business logic before sending faults to the error handling framework. You can add fault handling to any integration type (for example, asynchronous, synchronous, or scheduled fire-and-forget (no response expected)).

Add a Global Fault

  1. Design an integration. The integration does not need to be complete. You can add fault handling at any time. However, the integration must include an invoke connection.

  2. In the integration canvas, click View Global Fault Handler Toggle between main integration and global faults icon.

    The Global Fault Handler page is displayed. The initial trigger in your integration is automatically connected to an initial Re-throw Fault action. However, you can add and delete other Re-throw Fault actions. The Re-throw Fault action does not respond back to the trigger. Instead, details collected by the Re-throw Fault action are sent to the error handling framework.


    This image shows the Global Fault and Re-throw Fault.

  3. Click Actions Integration actions icon to add actions to design specific fault handling logic in the integration. For example, you can add Switch, Stop, or additional actions, when needed.

  4. To build an expression to capture fault handling information, select the action, then click Actions icon, then Edit .

    A switch action expanded to show the Route 1 and Otherwise branches is shown. To the right are the Input Sources tab (which is selected) and the Functions tab. Below is the Sources element tree. The $GlobalFaultObject element is expanded to show fault, and then errorCode, reason, and details. To the right is the Configure Route panel, which includes an Enter Name field, a Conditional is undefined label, a Statement is undefined label, a Value field, an Operator field, and a Value field. The Two Value fields include a clear icon and a switch to developer view icon.

    Note:

    The Expression Builder includes the following functions under Functions > Integration Cloud for designing fault handling:
    • getFaultAsString (returns the fault as a string value)

    • getFaultAsXML (the fault as an XML element)

    • getFaultName (returns the fault name)

    • getFaultedActionName (returns the fault of the action)

    • getFlowId (returns the flow ID of the integration)

    • lookupValue

    These functions are only available within the Expression Builder in integrations.

  5. Build an expression to capture fault handling information. For example:
    $TargetApplicationObject1/nssrcmpr:fault/nssrcmpr:details = "ERROR"
  6. Drag a Stop action to the Otherwise branch of the switch action.

    The fault handling logic is now complete. For this example, if an error occurs, error details are captured and sent to the error handling framework (as indicated by the Re-throw Fault action). If no error occurs, the fault handling stops and nothing is sent to the error handling framework (as indicated by the Stop action).

  7. Click Save.

  8. Click View Main Integration Toggle between main integration and global faults icon to return to edit mode in the integration canvas.
  9. Complete the design of the integration.

  10. Activate the integration.

Track the Status of a Global Fault During Runtime

During runtime, you can track the status of global faults on the Instances page through the tracking diagram and activity stream for an activated integration. This is only possible if there is a tracking instance.

  1. In the navigation pane, click Observability, then Instances.
  2. On the Instances page, click the business identifier value of the integration to track.

    Global fault handling is only invoked if there is a failure in the integration flow. Failures are identified by red.

    If the global fault handler successfully handled the error, the integration is displayed as Succeeded on the Instances page.