Understanding fault handlers and signaling
Fault handler, as the name suggests, is used in the WS-BPEL 2.0 specification to handle the generated faults. These faults can be logical errors, execution errors, or errors generated due to the external environment of the BPEL process. These faults can be either implicitly generated by the BPEL runtime or explicitly generated using the <throw>
activity.
The basic <throw>
activity has the following syntax with an attribute named faultName
. The value of this attribute can be any qualified name so it can be used to realize the correct fault handler that is responsible for the generated fault. Consider the following code snippet:
<throw xmlns:fltns="http://packtpub.com/bpel/faults" faultName="fltns:faultName" />
However, some generated faults can contain data related to the fault. As usual, this data is represented by a BPEL variable and the optional attribute named faultVariable
is used to refer to the particular variable that contains...