You can define two types of fault handlers:
fault handler that defines a set of custom fault-handling activities that execute based on an optional fault name and/or fault variable. If the fault name is missing, then the catch intercepts all faults with the same type of fault data.
fault handler that executes if a thrown fault is not caught by a
fault handler. Catch all is a variant of catch. It does not specify a fault name or variable to catch.
You can define
handlers for the process on the Process Editor Fault Handlers tab, as described in
Adding a Fault Handler
The following illustration shows an example of fault handlers created on the Process Editor canvas.
You can also define fault handlers for a scope, as the error catch event, labeled
, shows in the following illustration.
You can define each catch activity to intercept a specific kind of fault, defined by a globally unique fault name and a variable associated with the fault. Optionally, you can have a defined type associated with the fault variable, either a message type or an element type.
(faultMessageType="QName" | faultElement="QName")?>*
Fault name only or fault variable only or fault name plus fault variable
Fault name, Fault variable definition, Fault variable
Comment. See Adding Comments to a Process
Documentation. See Adding Documentation to a Process
See Setting Visual Properties and Using Your Own Library of Images.
Execution State. See Viewing the Execution State of an Activity or Link
Extension Attributes and Extension Elements. See Declaring Extension Elements and Attributes.
Catch Fault Name and Fault Variable
The fault name and fault variable/variable definition are optional attributes, but you must provide at least one of them for a
. These attributes determine which catch in a fault handler executes when a fault is thrown.
If you do not define either a fault name or variable, the catch is executed as a
In most cases, the values for these attributes are from the WSDL for a service being invoked. The name of the fault is typically the name of fault on an operation with the target namespace as the qualifying namespace value. The variable for a fault is typically the message sent when an operation in WSDL throws a fault. In the case where a catch includes a fault variable, that variable must be defined within the catch. This variable gets populated with the data from the fault when the catch executes. In addition, Process Developer provides special handling for undeclared faults.
For more details about the use of fault names and variables, see the following topics:
Fault Handling Processing Rules
Tips on Fault Handling
Catching Undeclared and SOAP Faults
CatchAll Handler Examples
catches any faults that were not caught by an existing catch block. The benefit of this construct is that you can be sure that your fault handler has an opportunity to execute your fault handling code in the event a fault is thrown. One drawback is that you will not have any details regarding the type of fault that was thrown since there is no fault name or fault variable available to a
, per se. However, Process Developer provides custom functions to handle undeclared faults in a
. This construct is best used in cases where you do not care what fault is thrown or in cases where you want to be sure that no faults get past your existing fault handler logic.
fault handler is as follows: