Fault Handler
The fault handler's main role is to provide a means of recovery from an error in a workflow. It associates a specific error with the recovery process.
One or more fault handlers can be added to a scope. The scope itself is a subprocess or a step within a workflow or a fault scope activity. However, no matter how many fault handlers are within a scope, only one will run based on the configuration of the handlers. Fault handlers can be configured to handle specific faults, system faults, or all faults. The handler that runs is the first one that is appropriately configured to resolve the fault. The path that is followed to find the appropriately configured fault handler is a linear path (from left to right).
If any handler runs, the currently running subprocess ends and the rest of the workflow continues to run as prescribed, starting at the next subprocess. If no handler runs or an unhandled fault occurs, the current subprocess ends at the fault and the workflow instance ends in the normal way; that is, the postsubprocess, postprocess, and unload steps run before the instance completes.
Fault handlers exist at two levels: within a process step and within a fault scope activity. Logic for the fault handlers can be defined at both levels. It is important to have handlers at both these levels to be able to try and resolve any issues that cannot be resolved at the activity level.
Fault Handler Activity
Fault handler activities are added to a fault handler collection, which are added to fault scope activities. If a fault handler activity is set to handle a certain fault, it will drill down into the handler and run the activities of that handler when that fault occurs. You can edit the handler's attributes at the fault handler level.
The following options are available to configure fault handler activities:
Attribute | Value | Description |
---|---|---|
Handle All Faults | User-defined | Select this check box to automatically handle any faults that the handler was not configured to resolve. Typically, this option is selected for the last fault handler activity in a series to ensure that all faults are found and resolved. No other options are available when this option is selected. |
Handle System Exception | User and system-defined | Select this check box to handle any system fault that was not created by a user. When you select this check box, the Handled Faults Edit link is enabled. |
Handled User Faults: Select Faults | User-defined | Click this link to open the Universal Browser to select one or more faults to add to the selected fault handler activity. The selected faults display below Handled Faults in the activity configuration panel. |
Handled User Faults: Clear List | User-defined | Click this link to remove any user-defined faults previously added to this fault handler activity. |
Properties
The following fault handler activity properties are available through these binds: Write activity and Local Variables.
Attribute | Value | Description |
---|---|---|
FaultName | System-defined | This provides more information about the fault that occurred. |
FaultMessage | System-defined | This provides more information about the fault that occurred. |