Compensation is the means by which operations in a process that have completed can be undone to return the system to a consistent state if an error occurs.
You can compensate a BPEL process in two ways:
- Save the properties of the individual parts of a process so that they can be restored if the process cannot be committed and must be rolled back (compensation pairs).
- Use a compensation handler to return a failed process to a balanced state after a fault is thrown when the parent activity has already been committed.