Chapter 11. Compensations
Suppose you need to write a book on ordering process. This might include two main tasks: order registration and charging the client's credit card.
Imagine there is not enough credit in the customer's credit card when initiating a credit card transaction. In this case, we need to rollback a "Register Book Order" activity in order to avoid financial losses to the bookseller. This is where we need to have compensations in the BPEL processes. The already completed tasks can be rolled backed. In the preceding example, the BPEL process should implement necessary activities to cancel the book order during the compensation.
When using a self-contained synchronous system, all information is available during a change to simply roll the change back if an error or unexpected situation occurs. However, in a BPEL environment, things are often not self-contained, and a change needs to be committed to move on. If any error or unexpected situation...