BPMN v1.1 - Compensation

From Training Material
Revision as of 02:41, 17 November 2012 by Bernard Szlachta (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


title
BPMN v1.1 - Compensation
author
Bernard Szlachta (NobleProg Ltd)

Element compensation association.png

What is compensation ⌘

  • Some activities produce complex effects or specific outputs.
  • If the outcome is determined to be undesirable by some specified criteria (such as an order being cancelled), then it will be necessary to “undo” the activities.
  • There are three ways this can be done:
    • Restoring of a copy of the initial values for data, thereby overwriting any changes.
    • Doing nothing (if nothing has changed because the changes have been set aside until a confirmation).
    • Invoking activities that undo the effects--also known as compensation.

Compensation implementation ⌘

  • e.g. Customer charged for the flight should be refunded if error prevent the flight to happen
  • These types of activities usually need a separate activity to counter the effects of the initial activity.


Figure10-33-transaction-sub-process.png


Compensation Activity ⌘

png?inline&authkey=f2f79b6777fc66eb33519fcdf19e55b217755ef378abadb0209e42abe9244ad9&.png

  • Target of this Association is the activity that will compensate for the work done in the source activity, and will be referred to as the Compensation Activity
  • Compensation Activity:
    • is special in that it does not follow the normal Sequence Flow rules
    • is outside the Normal Flow of the Process.
    • cannot have any incoming or outgoing Sequence Flow
    • Compensation marker will be displayed in the bottom center of the Activity to show this status of the activity
    • there can be only one target activity for compensation
    • There cannot be a sequence of activities shown
      • if more activities is required -> single Sub-Process
    • The Sub-Process can be collapsed or expanded

Compensation Activity Trigger ⌘

Only activities that have been completed can be compensated The compensation of an activity can be triggered in two ways:

  1. The activity is inside a Transaction Sub-Process that is cancelled
    • In this situation, the whole Sub-Srocess will be “rewound” or rolled back--the Process flow will go backwards
    • any activity that requires compensation will be compensated
    • After the compensation has been completed, the Process will continue its rollback.
  2. A downstream Intermediate or End Event of type Compensation “throws” a compensation identifier that is “caught” by the Intermediate Event attached to the boundary of the activity. The compensation is thrown in two ways:
    • The Event can specifically identify an activity that requires compensation and only that activity will be compensated.
    • The Event can broadcast the need for the compensation and then all completed activities that have a Compensation Intermediate Event attached to their boundaries will be compensated
      • The compensation applies to all activities that have fully completed within the Process Instance (which includes all levels of the Process)
      • The rewind occur in the reverse order

Figure10-33-transaction-sub-process.png

png?inline&authkey=17f1363381753e41abece50639befa422d3a932383a8a01bd786332bbc020&.png