ActiveBPEL® Designer User’s Guide
To start at the beginning of the tutorial, see Introduction to ActiveBPEL Tutorial.
Fault handling in a BPEL process is reverse work, undoing the partial and unsuccessful work of a scope in which a fault has occurred. When a fault occurs, normal processing is terminated, and control is transferred to the corresponding fault handler.
So far in the tutorial, you have completed a BPEL process definition that contains all the steps for normal processing. Now you will add a fault handler to handle a service invocation fault.
If the loan process throws a fault, it terminates the process via a standard fault, and turns over control to the fault handler activity.
In the loanprocess.wsdl file, there is a fault name and a fault message defined for the WSDL’s operation, namely the request operation. The loan process uses the fault name and message in defining fault handling activities for the assessor and approver services.
In the Project Explorer view, you should have the following files:
By completing Part 6 of the tutorial, you will be able to:
Step 1: Add a Catch fault handler and fault variable
Upon receipt of an inbound fault message, a fault handler assigns the fault message to a variable before proceeding to perform an activity enclosed by the catch.
loan:errorMessage.

approvews:loanProcessFault, as shown
in the example.

errorApprove,
which is the name we will associate with the fault variable definition.
The properties for the Catch activity should look like the following
example:

Also notice that a new variable named errorApprove has
been added to Process Variables view. This variable is exclusively
for fault handling, indicated by an icon that differs from normal
process variables.

Step 2: Add a fault handling activity
When a fault is caught, the fault handler must execute an activity. We will add a Reply activity to tell the customer that the process was unable to handle the request.

ReplywithApprovalFault.

riskws:loanProcessFault and
naming the fault variable errorRisk.
Tip: Instead of filling in the Reply’s properties manually, you can use the Operation Wizard to drag the Interfaces’ request operation to the Catch activity. When the wizard opens, select Reply with Fault to automatically fill in the Reply’s properties shown in the example above.
Your Fault Handlers view should be similar to the following:

Proceed to Tutorial Part 7: Adding Compensation and Correlation.
Copyright (c) 2004-2008 Active Endpoints, Inc.