BPMN tutorial part 2

Have you completed the BPMN introduction tutorial?  In this second part tutorial we will discuss about the two other core BPMN elements: Activities and Gateways.

An activity, represented with a rounded-corner rectangle, describes a kind of work which must be done. It commonly includes Tasks and Subprocesses.

BPMN Tasks

A BPMN Task is essentially an activity which needs to be performed either by a human actor or automatically. Prior to BPMN 2.0 the only way to understand what type of task is was look at in the lanes in the pool, or using a text annotation to clarify the intent of the digram.  BPMN 2.0 adds new icon annotations to the tasks. These icons might differ a bit depending on the BPMN software you are using, however I encourage you to use them because it brings a lot of clarity to a diagram.

Let’s see all type of tasks available:

Human task A human task is a task that requires intervention by a human (actor). For example the user fills up a form and submit his work to the manager.
Manual task A human task which is to be performed without the aid of any business process execution or any application. Example: phone call
Service task Represents an automated unit of work that should be executed in this process. All work that is executed outside the process engine should be represented (in a declarative way) using a Service Task.
Call Activity Represents a reusable global task or process. Call activity references a process that is external to the process definition, whereas the subprocess is embedded within the original process definition.
Script Task A script task is an automatic activity. When a process execution arrives at the script task, the corresponding script is executed.
  Send Task  A simple task that is designed to send a message to an external participant (relative to the process). Once the message has been sent, the task is completed.
Receive Task A simple task that is designed to wait for a message from an external participant (relative to the process). Once the message has been received, the task is completed.
Business rule task Provides a mechanism for the process to provide input to a business rule engine and to get the output of calculations that the business rules engine might provide. In the process model it does not take any action.  It just returns the rule result, which can be used by subsequent process logic in a variety of ways.


Sub-Processes are a very handy concept in BPMN.  Besides providing a natural way to draw a condensed top-down view with drill-down to any level of detail, BPMN subprocesses also determine the boundaries of when an event can be received – a change to an order in process, for example.

In terms of graphical aspect, a Sub-Process object shares the same shape as the Task object, which is a rounded rectangle. The Sub-Process can be in a collapsed view that hides its details (see picture)

A Sub-Process can be in an expanded view that shows its details within the view of the Process in which it is contained. Here is an example of Sub-Process (“OrderProduct”) which is part of an Inventory system. The subprocess is used to model and hide the complexity of the refurnish subprocess and to issue an Exception if goods cannot be ordered in time.



A gateway is used to control the flow of execution (or as the BPMN 2.0 describes, the tokens of execution). A gateway is capable of consuming or generating tokens.

Gateways can define all the types of business process Sequence Flow behavior: Decisions/branching (exclusive, inclusive, and complex), merging, forking, and joining. A gateway is graphically visualized as a diamond shape, with an icon inside. BPMN, however, extends the behavior of the diamonds to reflect any type of Sequence Flow control. Each type of Gateway will have an internal indicator or marker to show the type of Gateway that is being used.

The following table summarizes the most common gateways used in a business process:

Exclusive Gateway Used to model a decision in the process. Only one sequence flow is selected when using the exclusive gateway. In case multiple sequence flow have a condition that evaluates to true, the first one defined in the XML is selected for continuing the process.
Parallel Gateway Allows to fork into multiple paths of execution or join multiple incoming paths of execution. When used to fork the sequence flow, all outgoing branches are activated simultaneously. When joining parallel branches it waits for all incoming branches to complete before moving to the outgoing flow
Inclusive Gateway  Inclusive gateway is also a division point of the business process. Unlike the exclusive gateway, inclusive gateway may trigger more than 1 out-going paths. Thus, all out-going conditions will be evaluated no matter has fulfilled out-going flow or not.

Sequence Flows

A sequence flow is the connector between two elements of a process. After an element is visited during process execution, all outgoing sequence flow will be followed. A sequence flow is visualized as an arrow going from the source element towards the target element. The arrow always points towards the target.

A Sequence Flow MAY have a conditional expression attribute, depending on its source object. This means that the condition expression must be evaluated before a Token can be generated and then leave the source object to traverse the Flow. The conditions are usually associated with Decision Gateways, but can also be used with activities.

All BPMN 2.0 tasks and gateways can have a default sequence flow. This sequence flow is only selected as the outgoing sequence flow for that activity if and only if none of the other sequence flow could be selected. Conditions on a default sequence flow are always ignored.


A default sequence flow is visualized as a regular sequence flow, with a ‘slash’ marker at the beginning.

We have completed our whirlwind tour of BPMN from the basics to more complex constructores. More resources about BPM are available in our Site Menu (BPM).

BPMN tutorial for beginners

This tutorial introduces the essential features of BPMN 2.0. BPMN stands for Business Process Modeling Notation and is a public standard maintained by OMG. It describes a business-friendly, flow chart-like graphical notation that business process analysts and business users can use to model business processes and has support for process interactions, exception handling, compensation semantics, and so on.

BPMN It is widely accepted by both commercial and open source BPMS tooling vendors. It is highly adaptable and can be used to capture everything from abstract process outlines to detailed process flows to implementation ready processes. One of the main value propositions of BPMN besides being a diagram standard is the precise semantics behind the diagram. The shape, the symbols (also referred to as markers), the borders, the placement of the BPMN diagram elements, as well as their properties have well defined meanings and have to be interpreted in the same manner by all tools.
Although BPMN 1.1 comprehensively addressed process modeling notations, it was substantially missing to address an interchange format (for diagram exchange). This resulted in implementation vendors adopting different standards (BPEL, XPDL, or JBPM’s JPDL) to store BPMN process models leading to not only a loss of portability across tools but also making it difficult to communicate across the various stakeholders.
Here we will summarize a short descriptions of the different standards emerged in these years:


  • Analyst and developers oriented.
  • Strongly tied with jBPM and Java.
  • Allows custom process routing logic and a large set of built-in nodes.
  • Intuitive XML language.


  • Text based (XML) Business Process Modeling language which includes precise execution semantics.
  • Used to orchestrate Web services.
  • Does not contain elements to represent the graphical aspects of the process diagram.


  • Designed to exchange the process definition, both the graphics and the semantics of a workflow business process.
  • As it name implies contains elements to hold graphical information, such as the X and Y position of the nodes.
  • Contains as well as executable aspects which would be used to run a process.

The vision of BPMN 2.0 is to have a single specification for notation, metamodel, and interchange. In addition, BPMN 2.0 has been expanded to include orchestrations and choreography of process models.
A Business Process Diagram is a simple diagram made up of a set of graphical elements that depicts a business process.

There are four primary elements of BPD:

  1. Flow Objects: represent the core elemets of the business process diagram.
  2. Connecting Objects: are used to connect the BPMN 2.0 core objects
  3. Artifacts: allow process designers to extend the basic BPMN 2.0 notation to include additional information about the process in the process diagram
  4. Swimlanes: are mechanism to organize activities and responsibilities on a process diagram.

BPMN 2.0 Flow Objects

As we said, Flow Objects are shapes that represent the core elements of the Business Process Diagram (BPD), including:

  • Activity: is any work that is being performed in a process.
  • Event: are anything that “happens” during the course of a business process.
  • Gateway: is used to control the flow of a process.

The following diagram depicts a sample BPMN 2.0 Purchase Process which includes a Start Event, some Activities, one Gateway and an End Event:

If you want to have visibility on which Role is in charge of a specific Task, you can use Swim Lanes. Here is for example how to depict the above Process using Swim Lanes:

BPMN 2.0 Events

The biggest difference between BPMN 2.0 and traditional flowcharting is the support for events.  An event is a signal that something happened, and BPMN lets you say how the process should respond.
The Events can occur at the beginning (Start Events) or at the end (End Events) or in the middle (Intermediate) of the process.  Additionally, some events can happen on the Boundary of an activity.

A Boundary Event is an intermediate event, that is it can be triggered or thrown at any time while the associated task or activity is being performed.  Some boundary events are time-based while others are based on a condition which must resolve to ‘True’ in order for that branch of the flow to proceed.

The following picture depicts a process of ordering some products which includes a Start event (a message event), of an Intermediate error event, a Boundary Timer event, and two End events.

All BPMN 2.0 Events can also be classified as:

  • Catching events, which are events with a defined trigger. They are started once the trigger has activated or fired.
  • Throwing events, which are triggers for catching events and are triggered by the process.

The Start Events are always of catch type and the End Events are always of throw type. The Intermediate Events can be either of throw or catch type.There are various flavors of Events in BPMN 2.0. The Event Types are listed as follows:

Message Events Send or receive messages.
Timer Events Are always of catch type and used to signify waiting for a specific time condition to evaluate to true.
Signal Events Are used for publish and subscribe of signals.
Error Events Are used for exception handling and they can occur only at the end of the process.
Termination Event Are used to terminate the process and can occur only at the end of the process.
Conditional Event Are used for rule-based triggers.
Escalation Event Has been newly introduced in BPMN 2.0 to handle escalation conditions.
Compensation Event Introduced to to handle compensation in the process.

Depending on the combination of events, phase in which the event is triggered (Start, Intermediate, Boundary) and if the event interrupts an Activity, the event can be represented with a different combination of graphic notations.

BPMN 2.0 Message Events

BPMN 2.0 Message events are events which reference a named message. A message has a name and a payload and is always directed at a single receiver.
The graphical representation of the message can vary depending on the phase in which the message is sent/received

Start Message Event

A process or an event subprocess can contain multiple message start events, which are triggered by a particular message.  A message has a name and a payload. Unlike a signal, a message event is always directed at a single recipient. The process instance with a message start event only starts its execution from this event after it has received the respective message. After the message is received, the process is instantiated and its message start event is executed immediately.

Because a message can be consumed by an arbitrary number of processes, one message can trigger multiple message start events and thus instantiate multiple processes.

Intermediate Message Event

A message intermediate event is an intermediate event that enables you to manage a message. Use one of the following events:

  • A throwing message intermediate event produces a message object based on the defined properties.
  • A catching message intermediate event listens for a message object with the defined properties.

End Message Event

When a flow enters a message end event, the flow finishes and the end event produces a message as defined in its properties.

BPMN 2.0 Timer Events

BPMN 2.0 Timer events are events which are triggered by defined timer. They can be used as start event, intermediate event or boundary event.


Start Timer Event

The timer start event is based on a timing mechanism. A process can contain multiple timer start events, which are triggered at the start of the process. After that, the timing mechanism is applied.

Intermediate Timer Event

A timer intermediate event enables you to trigger or delay the workflow execution periodically. It represents a timer that can trigger one or multiple times after a specified period of time. When the timer intermediate event is triggered, the timer based condition is verified and the outgoing flow is taken. When the timer intermediate event is placed in the process workflow, it has one incoming flow and one outgoing flow. Its execution starts when the incoming flow transfers to the event. When a timer intermediate event is placed on an activity boundary, the execution is triggered at the same time as the activity execution.

End Timer Event

The timer is canceled if the timer element is canceled, for example by completing or aborting the enclosing process instance.

BPMN 2.0 Signal Events

This type of event is used for sending or receiving Signals. A Signal is for general communication within the process components. A BPMN 2.0 Signal is similar to a signal flare that shot into the sky for anyone who might be interested to notice and then react. Thus, there is a source of the Signal, but no specific intended target. This is different than a BPMN Message, which has a specific Source and a specific Target (which can be an Entity or an abstract Role).

Start Signal Event

The signal start event is is triggered by a signal with a particular signal code. A process can contain several signal start events. The signal start event only starts its execution within the process instance after the instance has received the respective signal. Then, the signal start event is executed and its outgoing flow is taken.

Intermediate Signal Event

A signal intermediate event enables you to produce or consume a signal object. You can use any of the following options:

  • A throwing signal intermediate event produces a signal object based on the defined properties.
  • A catching signal intermediate event listens for a signal object with the defined properties.

End Signal Event

A throwing signal end event is used to finish a process or subprocess flow. When the execution flow enters the element, the execution flow finishes and produces a signal identified by its SignalRef property.

BPMN 2.0 Error Events


Start Error Event

A process or subprocess can contain multiple error start events, which are fired when an error object (containing a particular ErrorRef property) is received. The error object can be produced by an error end event. It indicates an incorrect process ending. The process instance with the error start event starts execution after it has received its error object.  

Intermediate Error Event

An error intermediate event enables the process to react to an error end event in the respective activity. The activity must not be atomic. When the activity finishes with an error end event that produces an error object with the respective ErrorCode property, the error intermediate event catches the error object and execution continues to its outgoing flow.

End Error Event

The throwing error end event finishes the incoming workflow, which means consumes the incoming token, and produces an error object. Any other running workflows in the process or subprocess remain uninfluenced.

BPMN 2.0 Compensation Events

Compensation is a means for “undoing” the effects of an action.

For example, supposing you have booked a ticket to a show at the beginning of your process, then a compensation could be cancelling the reservation.

Intermediate Compensation Event

A compensation intermediate event is a boundary event attached to an activity in a transaction subprocess. It can finish with a compensation end event or a cancel end event. The compensation intermediate event must be associated with a flow, which is connected to the compensation activity.

The activity associated with the boundary compensation intermediate event is executed if the transaction subprocess finishes with the compensation end event. The execution continues with the respective flow.

End Compensation Event

A compensation end event is used to finish a transaction subprocess and trigger the compensation defined by the compensation intermediate event attached to the boundary of the subprocess activities.

BPMN 2.0 Conditional Events

Real world business processes often embody complex decision making. Conditional events can thus be used for rule-based triggers which are included in the process.


Start Conditional Event

The conditional start event is a start event with a Boolean condition definition. The execution is triggered when the condition is first evaluated to false and then to true. The process execution starts only if the condition is evaluated to true after the start event has been instantiated.
A process can contain multiple conditional start events.

Intermediate Conditional Event

A conditional intermediate event is an intermediate event with a boolean condition as its trigger. The event triggers further workflow execution when the condition evaluates to true and its outgoing flow is taken.

End Conditional Event

The event must define the Expression property. When a conditional intermediate event is placed in the process workflow, it has one incoming flow, one outgoing flow, and its execution starts when the incoming flow transfers to the event. When a conditional intermediate event is placed on an activity boundary, the execution is triggered at the same time as the activity execution. Note that if the event is non-interrupting, the event triggers continuously while the condition is true.

The first part of BPMN tutorial ends here. In the next BPMN tutorial part 2 we will discuss about the other two Flow Objects: Gateways and Activities.