IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Developing business processes > Building BPEL processes > Defining BPEL process logic > Dealing with faults in your process
Fault activities
You can deal with potential faults in your BPEL process using a combination of the activities, handlers, and elements that are described in this topic.
- Compensate activity
- Use this activity within a scope's fault or compensation handler to invoke a specific compensation handler within the scope.
- Set Compensate Link
![]()
- Use this element with a compensate activity to call a compensation handler on nested scopes.
- Compensation handler
- Use the compensation handler on either an invoke or a scope activity, and within a long-running process to define logic that will run when a fault is thrown after the parent activity has already been committed. Compensation is used when the activity cannot simply be reversed or undone, but another operation must be run in order to return the failed process to a balanced state.
- Fault handler
- A fault handler is a collection of specific activities that will run when a fault is thrown on the activity with which the handler is associated. Fault handlers can be used on both invoke and scope activities, and will run either when a fault is thrown by the invoke activity, or by an activity inside the scope activity. 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.
- Catch element
![]()
- Use this element within a fault handler to intercept, and deal with a specific kind of fault. The catch element is always the first element on the control path of a fault handler, and the activities that follow it run if the fault conditions you specify occur. You can catch a built-in fault type, or define one yourself. On the canvas, each catch shows the name of the fault type that it will catch, and each is associated with a variable.
- Catch all element
![]()
- Use this element within a fault handler to intercept, and deal with any fault that is not already defined in an existing catch element. The catch all element is the first object on a control path, and the activities the follow it run if the fault conditions you specify occur.
- Terminate activity
- Use this activity to halt a process. When used, all activities that are currently active are halted without any fault handling or compensation behavior. When the terminate activity has been invoked, its own fault handler runs.
- Throw activity
- Use this activity to signal an internal fault. In defining the properties of this activity, you can specify a name and a message in the properties area of the BPEL process editor. These details can then be passed onto a fault handler that presumably is configured to deal with this kind of exception.
- Rethrow activity
- Use this activity to forward a fault from inside a fault handler to delegate the handling of a fault to an enclosing scope. The fault is sent to the enclosing scope exactly as it was caught by the fault handler, that is, any modifications of the associated fault data are ignored.
Dealing with faults in your BPEL process
Related concepts:
Raising faults
BPEL process compensation
Related tasks:
Use fault handlers
Continue processing upon unhandled faults
Typing fault variables