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 > BPEL process compensation

Compensating a microflow

In a microflow, the entire process executes within a single transaction. To set up compensation for a microflow, you store the original properties for each of the invoke activities within the microflow so that the original data can be restored if the process cannot be committed and must be rolled back.

If this microflow fails, the runtime engine crawls back through the invoke activities in reverse order, and restores each to its previous state. To create compensation logic for an invoke activity in a microflow, you must define a location to store the details of this state. To do this, proceed as follows:


Procedure

  1. To begin, you will have to make this a microflow. To do this, click an empty area of the canvas, click the Details tab in the properties area, and clear the Process is long-running check box.

  2. Configure the Compensation Sphere setting. You have the following two options:
    Option Description
    Supports Use this setting when this microflow can run without a compensation service.
    Required Use this setting when this microflow needs a compensation service.

  3. For each invoke activity in this microflow, proceed as follows:

    1. Click the Compensation tab in the properties area.
    2. Browse to a reference partner, and select an appropriate operation to store the original condition of the activity.
    3. Browse to an input variable to store the original value of the activity.
    In the event that the microflow has to be compensated, it will look at these values, and restore them to the activity.


Results

If this microflow is called or invoked by a larger long-running process, the compensation values for each activity are promoted to the parent process and stored there in case it fails, and the process as a whole must be compensated.

BPEL process compensation

Building BPEL processes


Related concepts:
Business processes
Work with BPEL extensions
Choose between long-running processes and microflows
Best Practice: When to not use the BPEL extensions


Related tasks:
Compensating activities in a long-running process


Related reference:
Server tab: BPEL process editor