Using fault handlers
A fault handler is a collection of specific activities
that run when a fault is thrown on the activity with which the handler
is associated.
About this task
The
following points apply when designing a fault handler:
- Catch a fault and try to correct the problem so that the business process continues to normal completion.
- Catch a fault and find that it is not resolvable at this scope.
In this case, you have the following additional options:
- Throw a new fault.
- Rethrow the original fault so that another scope can handle it.
- Reply with a fault to the process initiator.
- Start a human task to correct the issue. If the fault handler cannot resolve the issue, you might need to roll back the process and compensate it.
- For long-running processes, consider using the Stop on unhandled faults property on the process to handle a fault situation administratively.
Note: If you catch a fault using a fault handler and you are
using Oracle in IBM® Workflow
Server,
you must not delete the default namespace. Also, you must provide
a namespace if you are using Oracle with IBM Workflow
Server on
versions 6.1 through 7.0.0.2. IBM Integration
Designer does
not create a default namespace. See the technote at http://www-01.ibm.com/support/docview.wss?uid=swg21433700
for details.
for details.To create a fault handler on an activity, do the following instructions:
Procedure
Results
If a fault matches more than one fault handler, then the
following rules determine which catch element processes the fault:
- If the fault has no associated fault data, a catch activity with the matching fault name is selected (providing the fault handler has no variable assigned). Otherwise, the default catch-all element is chosen.
- If the fault does have fault data associated with it, then a catch element with matching fault name and variable values is selected. If there is no fault name specified, then a fault with a matching fault type is selected. Otherwise, the default catch-all element is chosen.
Example
To see an example of how to use
a fault handler in a BPEL process that you can build and run yourself,
go to http://publib.boulder.ibm.com/bpcsamp/index.html
, and click .
, and click . Note: This example
was created using an earlier version of the product, but the example
can be run in later versions as well.



This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15