Compensation is the means by which operations in a process that have successfully completed can be undone.
Compensation processing starts because an error occurs in a running process instance for which compensation is defined in the process model. Compensation reverses the effects of operations that were committed up to when the error occurred to get back to a consistent state.
You can define compensation for long-running processes and for microflows in your process model.
Compensation for long-running processes is also known as business-level compensation. This type of compensation is defined on the scope level. This means that either part of the process, or the entire process can be compensated.
Compensation is triggered by fault handlers or the compensation handler of a scope or a process; compensation is another navigation path of the process.
A long-running process automatically compensates child processes that have successfully completed when the enclosing parent scope is compensated. Within a process, only invoke and scope activities that complete successfully are compensated.
Compensation for microflows is also known as technical compensation. This type of compensation is triggered when the work unit (the transaction or the activity session) that contains the microflow is rolled back. Therefore, undo actions are typically specified for activities that cannot be reversed by rolling back the unit of work. When a process instance runs, undo actions for compensable activities are registered with the enclosing unit of work. Depending on the outcome of this unit of work (rollback or commit), compensation starts.
If the microflow is a child of a compensable, long-running process, the undo actions of the microflow are made available to the parent process when the microflow completes. It can, therefore, potentially participate in the compensation of the parent process. For these types of microflows, it is a good practice to specify undo actions for all of the activities in the process when you define your process model.
If an error occurs during compensation processing, the compensation action requires manual resolution to overcome the error. You can use Business Process Choreographer Explorer to repair these compensation actions.
Last updated: Tue Feb 21 17:31:25 2006
(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)