A fault handler associates specific fault activities on either
an invoke or a scope activity that will execute when a fault is thrown by
the invoke activity or an activity inside the scope activity.
In this case, the operation within the parent activity has NOT been
committed, and it is possible to easily reverse the transaction. You can place
activities on paths within the handler to either deal with anticipated faults,
or attempt to find another way to complete the operation. Each path within
the fault handler is preceded by either a catch, or a catch all element.
To
create a fault handler on an activity, proceed as follows:
If a fault matches more than one fault handler, then the following
rules determine which catch element will process the fault:
- If the fault has no associated fault data, a catch activity with the matching
fault name will be selected. 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 will be selected. If there is
no fault name specified, then a fault with a matching fault type will be selected.
Otherwise, the default catch all element is chosen.
If no catch or catch all element is selected, then the fault is rethrown
to the enclosing scope. If the fault occurs in (or is rethrown to) the global
scope, and there is no matching fault handler, the process terminates.