Table of Contents

Search

  1. Preface
  2. Part 1: Using Process Developer
  3. Part 2: Creating and Modifying Processes
  4. Part 3: Functions, Events, Errors, and Correlation
  5. Part 4: Testing and Deployment
  6. Part 5: Process Central and Process Server (On-Premises)

Process Developer

Process Developer

Compensation Handlers and Compensate Activities

Compensation Handlers and Compensate Activities

Compensation Handlers and Compensate Activities
You can add compensation handling as follows:
  • Define a compensation handler for a scope. The compensation handler can only have a single child activity, but this activity can be a structured activity like a sequence that has child activities. The contents of the compensation handler depend on your application logic.
  • Use a compensate activity within a fault handler, compensation handler, or termination handler to specify compensation on all inner scopes that have already completed successfully, in default order.
  • Use a compensate scope activity within a fault handler, compensation handler, or termination handler to specify compensation for a named, inner scope. This method provides control over the order and selection of compensation activities in a scope.
XML Syntax
<compensationHandler> activity </compensationHandler>
The following illustration compares default and specified compensation.
Default-order compensation
Default order compensation example
Specified compensation
Specified compensation example
Implicit Compensation
In the case where a scope does not define a compensation handler, the execution engine provides an implicit compensation handler. This handler contains a single
<compensate>
activity at compensates all of the enclosed scopes that have completed and are eligible for compensation. In general, you should only provide a compensation handler when you have some application-specific logic to execute in order to undo some previously executed logic.
See also:

0 COMMENTS

We’d like to hear from you!