Using a Catch Intermediate Error Event to Catch a Fault Message

Procedure

  1. Add a catch intermediate error event to the boundary of the service task that is invoking the web service operation.
  2. Select the catch intermediate event.
  3. On the General tab of the Properties view:
    1. Enter a suitable Label for the event.
    2. Click Select Error (to the right of the Catch Error Code field). The Select Error to Catch dialog is displayed. This lists the fault messages which can be returned by the operation being invoked. For example:
    3. Select the fault message you want to catch, then click OK. The Catch Error Code and Thrown By fields contain the details of the fault message.
  4. On the Map From Error tab:
    • The left-hand side displays the fault message parameters defined for the selected fault message, which will contain the data returned about the error.
    • The right-hand side displays the formal parameters and data fields available to this service task, as defined on the Interface tab.

      Drag and drop the fault message parameter(s) onto the appropriate formal parameters or data fields.

Catching Errors Example

The following process illustrates one way to catch the errors.

Service Task invokes the request-response operation provided by the process described in An Example. That operation includes three separate fault messages, Fault1, Fault2 and Fault3.

Three catch intermediate error events - Catch Fault1, Catch Fault2 and Catch Fault3 - are added to Service Task to catch each fault.

Each event:

  • is configured to catch the appropriate error - Fault1, Fault2 or Fault3 - in the Catch Error Code field.
  • maps the data from the fault message parameter to appropriate process data fields on the Output Fault From Process tab.

The process then provides whatever exception handling logic is required to process these errors.

Note: An alternative approach would be to use a single catch intermediate error event, set to Catch All instead of catching each specific error. See "Throw and Catch Error Events" in the TIBCO Business Studio Modeling User’s Guide for more information about how to throw and catch errors.