BPMN Diagrams – Make It Right With Intermediate Compensation Events


Sometimes we can’t undo our actions. Water under the bridge. But we can make it right by doing something else to compensate. BPMN allows us to use intermediate events to compensate for mistakes in the past. A classic example is cancellation of a purchase. Our example is a little more fun.


We presented an introduction to BPMN diagrams in July. Business analysts are often required to document as-is processes and to-be processes. These diagrams help identify the scope of a software project. The diagrams can also help uncover requirements that might be overlooked without diagramming the processes.

The BPMN specification is designed to establish a common language and convention for creating process diagrams. This common convention allows people who are familiar with modeling, but new to a project to avoid learning a new diagramming language on each project or for each client. We have a link to the official version of the spec in our introductory post (we will update that link if and when the spec changes).

Intermediate events are one of the more unfamiliar items in the BPMN language. They also allow for some of the cleanest, unambiguous expressions of steps in business processes.

This Sounds Familiar

In our article on end compensation events, we demonstrated how intermediate compensation events attached to the boundary of an activity can be used to compensate for an activity or set of activites. The intermediate compensation event is triggered by a business process reaching an end compensation event. Here’s the diagram from that article for a quick review.

bpmn compensation end event example

In the business process modeling example above, when an invalid card is discovered within the subprocess flow, it triggers the compensation of the “Process Credit Card” task, with the “Record Possible CC Fraud” task. Since this end event terminates the flow within the subprocess, the parent process then continues to the “Record Transaction” step.

Intermediate compensation events are handy because they allow us to compensate for transactions that can not (or should not) be undone. We can use cancel events to truly undo steps within transactional subprocesses. Compensation events are used when we don’t want to undo a step, but do want to record both that step and a future activity (task or subprocess) that compensates for the original activity.

[Update 20060918]

The example above shows a process with two misinterpretations of compensation event semantics. A detailed explanation of the mistakes has been published. First, the compensating task above does not really compensate for (undo) the associated activity. Second, there are no additional activities between the task being compensated and the compensation end event.

The following example also suffers from the second of those two mistakes.

[End Update]

In the following example, our morning diner eats a breakfast burritto. This is a step that can not be undone. If our diner gets heartburn, he will take an antacid, which will make him feel better. He finishes up the process by enjoying the day – either because he didn’t get heartburn, or because he did, but taking the antacid compensated for his folly.

bpmn diagram example of a compensation intermediate event


The key point to take from this is that compensation is used when we can’t undo a step in a process, but we can perform another action designed to neutralize the effect of the former step. [Update 20060918: Please review this correction to avoid the mistakes in this article]

2 thoughts on “BPMN Diagrams – Make It Right With Intermediate Compensation Events

  1. I think, there is a mistake on scheme. Intermediate compensation event on the border of activity must be catching, no throwing.

  2. Thanks, Dmitry!

    I apologize, it has been many years since I wrote this, or used BPM. Frankly, I don’t remember the specific semantics / rules any more. As linked above, there are at least a couple errors with my examples. What you’re pointing out may be a third error, or may have already been addressed.

    The BPMN spec has been updated at least once since this article was published as well. For a more authoritative source, I’d suggest checking out some of Bruce Silver’s stuff. He was one of the few experts writing about this at the time that I wrote this series, and he appears to still be active in the space.

    Best of luck!

Leave a Reply

Your email address will not be published. Required fields are marked *