Fault Handling Order of Precedence in BPEL 2.0
In BPEL 2.0, the order of precedence for catching faults thrown without associated data is as follows:
- 
                     If there is a catch activity with a matching faultNamevalue that does not specify afaultVariableattribute, the fault is sent to the identified catch activity.
- 
                     Otherwise, if there is a catchAll activity, the fault is sent to the catchAll fault handler. 
- 
                     Otherwise, the fault is processed by the default fault handler. 
In BPEL 2.0, the order of precedence for catching faults thrown with associated data is as follows:
- 
                     If there is a catch activity with a matching faultNamevalue that does not specify afaultVariableattribute, the fault is sent to the identified catch activity.
- 
                     If the fault data is a WSDL message type in which the following exists: - 
                           The message contains a single part defined by an element. 
- 
                           A catch activity with a matching faultNamevalue that has afaultVariablewhose associatedfaultElementQName matches the QName of the runtime element data of the single WSDL message part.
 Then, the fault is sent to the identified catch activity with the faultVariableinitialized to the value in the single part's element.
- 
                           
- 
                     Otherwise, if there is a catch activity with a matching faultNamevalue that does not specify afaultVariableattribute, the fault is sent to the identified catch activity. In this case, the fault value is not available from within the fault handler, but is available to the rethrow activity.
- 
                     Otherwise, if there is a catch construct without a faultNameattribute that has afaultVariablewhose type matches the type of the runtime fault data, then the fault is sent to the identified catch activity.
- 
                     Otherwise, if the fault data is a WSDL message type in which the message contains a single part defined by an element and there exists a catch activity without a faultNameattribute that has afaultVariablewhose associatedfaultElementQName matches the QName of the runtime element data of the single WSDL message part, the fault is sent to the identified catch activity with thefaultVariableinitialized to the value in the single part's element.
- 
                     Otherwise, if there is a catchAll activity, the fault is sent to the catchAll fault handler. 
- 
                     Otherwise, the fault is handled by the default fault handler.