Setting Compensation

A Compensation activity within a complex activity enables you “undo” work that was committed in a previous step of the process.

For an overview on how compensation works, see Compensation Handling.

To set compensation:

  1. Open the complex activity in which the compensation is to occur.

  2. Identify the normal activities.

  3. Place the Compensate simple activity at the point where either a roll back of activities is to be performed or the flow continues to the next activity.

  4. Place a decision activity, such as a rule, before the Compensate.

  5. Build the rule that continues the processing down the normal flow of activities.

  6. Connect the False node of the rule to the Compensate activity.

  7. Create a compensation handler to respond to the processing that is to occur if the runtime processing results in the flow being sent to compensation. See Building Handlers.

A compensation flow outside of the normal activity flow defines the rollback of performed activities.