Sem PM 11-12 BPMN
Sem PM 11-12 BPMN
Sem PM 11-12 BPMN
with BPMN
Andrea Marrella
[email protected]
Presentation Outline
This seminar introduces business process modeling using the
BPMN (Business Process Model and Notation) standard.
This lesson shows how BPMN can support different
methodologies as well as different modeling goals (e.g.,
orchestration and choreography), using actual business
processes as examples.
Visit http://www.bpmn.org/ for downloading the complete
specification of BPMN 2.0 and some interesting examples.
Reference Books :
Stephen A. White PhD, Derek Miers
BPMN Modeling and Reference Guide
Thomas Allweyer
BPMN 2.0 - Introduction to the Standard for Business Process
Modeling
2
Topics
Process Modeling
BPMN Background
Basic Concepts
Advanced Concepts
Conclusions
Business Processes
Business Process [1] : A business process consists of a set of
activities that are performed in coordination in an organizational and
technical environment. These activities jointly realize a business goal
A business goal is the target that an organization aims to achieve by
performing correctly the related business process.
The Importance of
Process Modeling
This leads to a number of questions :
Business process
concerning the book
loans service provided by
a library.
Process Management
Systems
Process Management System (PMS) [1] : A PMS is a
generic software system that is driven by explicit
process representations to coordinate the enactment of
business processes .
It manages the
process routing
librarian
PMS
It takes a process
model as input
It assigns tasks
to proper participants
system
Executable Process
Models
Executable Process Models carry the instructions on how work
should happen, who should do it, links to the other systems, etc.
They provide a direct method of translating strategical and
tactical intent into operational processes.
For being executed, process models have to meet very strict
demands, because they are not converted into a computer program
by a human being, but directly processed by a machine.
By now, standards for executable process descriptions have been
established, as for example :
XPDL (XML Process Definition Language) [2]
BPEL (Business Process Execution Language) [3]
[7]
Workflow Nets [5]
[8]
DECLARE [6]
Topics
Process Modeling
BPMN Background
Basic Concepts
Advanced Concepts
Conclusions
10
Why BPMN?
The primary goal of BPMN is to provide a notation that
is readily understandable by all business users, from the
business analysts that create the initial draft of the
processes, to the technical developers responsible for
implementing the technology that will perform these
processes, and finally to the business people who will
manage and monitor those processes.
The idea is to create a standardized bridge for the gap
between the business process design and process
implementation. [BPMN 2.0 spec.]
11
In 2001 BPMI
(Business Process
Management Initiative)
developed BPML as an
XML process
execution language.
What is a Metamodel?
15
BPMN 2.0
The typical modeler does not need to work with the
metamodel. Normally, s\he uses a modeling tool that
only allow the creation of models complying with the
specification, and thus with the metamodel.
It is rather the vendors of modeling tools and process
engines who have to deal with the metamodel.
BPMN 2.0 supports 3 different levels of process
modeling:
Process Maps: simple flow charts of the activities.
Process Descriptions: flow charts extended with additional
information, but not enough to fully define actual performance.
Process Models: flow charts extended with enough information so that
the process can be analyzed, simulated, and/or executed.
19
Topics
Process Modeling
BPMN Background
Basic Concepts
Advanced Concepts
Conclusions
20
Categories of Processes
BPMN 2.0 supports four main categories of Processes
1.
2.
3.
4.
Basic elements in a
BPMN process
22
BPMN Activities
Task
Sub-Process
Tasks
Receive
Send
Service
Script
Manual
Activity Behaviour
26
Connecting Activities
Receive
Payment
Accept
Payment
Typically, an Activity will tend to have a single incoming and a single outgoing
Sequence Flow.
Sequence Flows cannot cross a process boundary (a Pool) or a Sub-Process
boundary.
27
Types of sub-processes
Collapsed
sub-process
Manage
Payment
Expanded sub-process
Receive
credit
report
Approval
Include
Standard
Text
28
Embedded sub-processes
Independent
sub-processes
Transferring data from the parent Process to the reusable Sub-Process will
rely on a mapping between the data elements of the two levels.
Just like an embedded Sub-Process, an Independent Sub-Process must
30
have a None Start Event.
Behaviour across
process levels
The sub-process is
active
The sub-process is
completed
31
Looping
Multi-Instance Activities
Activity to be performed many
times with different data sets.
The value of the loop condition
attribute determines the number of
times that the Activity is
performed. The condition must
resolve to an integer.
The individual instances of a MultiInstance Activity might occur in
parallel or in sequence.
33
Events
Start
Intermediate
End
34
Start Events
None
Message
Timer
Conditional
Signal
Multiple
Parallel
Multiple
37
38
39
40
41
End Events
None
Message
Signal
Multiple
Terminate
44
Intermediate Events
Catching Throwing
None
Timer
Message
Signal
Conditional
Link
Multiple
Parallel
Multiple
47
Intermediate Events
Behaviour
Discuss
Confirmation
Confirmation
Discuss
Confirmation
Confirmation
An Example
49
Link Intermediate Events are always used in pairs, with a source and a target
Event. To ensure the pairing, both the source and target Link Events must
have the same label.
Using a pair of Link Events creates a virtual Sequence Flow.
There can be only one Target Link Event, but there may be multiple Source
Link Events paired with the same catching Link Event.
Once the Source Link Event
is triggered (the throw), the
token immediately jumps to
the catching (Target) Link
Event.
The arrival of the token at
the Target Link Event
immediately triggers the
Event..
50
Example of a
Multiple Intermediate Event
51
Gateways
Exclusive
Event
Parallel
Inclusive
Complex
52
Exclusive Gateways
Splitting Behaviour
Exclusive Gateways are locations
within a Process where there are
two or more alternative paths.
The criteria for the decision, which
the Exclusive Gateway represents,
exist as conditions on each of the
outgoing Sequence Flow.
When a token arrives at an
Exclusive Gateway, there is an
immediate evaluation of the
conditions that are on the
Gateways outgoing Sequence
Flow. One of those conditions must
always evaluate to true.
53
Default Conditions
One way for the modeler to
ensure that the Process does
not get stuck at an Exclusive
Gateway is to use a Default
Condition for one of the
outgoing Sequence Flow.
The default condition can
complement a set of standard
conditions to provide an
automatic escape mechanism
in case all the standard
conditions evaluate to false.
The Default is chosen if all the
other Sequence Flow
conditions turn out to be false.
54
Exclusive Gateways
Merging Behaviour
55
Event-based Exclusive
Gateways
Parallel Gateways
Splitting Behaviour
57
Parallel Gateways
Merging Behaviour
To synchronize the flow, the Parallel Gateway will wait for a token to arrive
from each incoming Sequence Flow.
When the first token arrives, there is no evaluation of a condition for the
incoming Sequence Flow, but the token is held at the Gateway and does not
continue.
When all the tokens have arrived, then they are merged and one token moves
down the outgoing Sequence Flow
58
Exercise
59
Exercise
60
Inclusive Gateways
Splitting Behaviour
Inclusive Gateways
Merging Behaviour
62
Complex Gateways
Splitting Behaviour
Complex Gateways
Merging Behaviour
There are many patterns that can be performed with the Complex Gateway,
such as typical Inclusive Gateway behavior, batching of multiple tokens,
accepting tokens from some paths but ignoring the tokens from others, etc.
The Gateway looks the same for each of these patterns, so the modeler should
use a Text Annotation to inform the reader of the diagram how it is used.
The Complex Gateway uses an incoming assignment when tokens arrive.
The condition may refer to Process or Data Object information and the status of
the incoming Sequence Flow.
If the condition is false, nothing happens other than the token is held there.
If the condition is true, then the action could be set to pass the token to the output
side of the Gateway, thereby activating the outgoing assignment, or the action could
be set to consume the token.
64
Exercise
Design a a sample expense reimbursement process. This process provides for
reimbursement of expenses incurred by employees for the company. For
example buying a technical book, office supplies or software. In a normal day
there are several hundreds of instances of this process created. Concentrate on
the basic flow of the Process
Exercise - Solution
66
Topics
Process Modeling
BPMN Background
Basic Concepts
Advanced Concepts
Conclusions
67
Advanced Concepts
Artifacts
Text Annotations, Groups, Data Objects
Artifacts
Artifacts provide a mechanism to capture additional information about
a Process, beyond the underlying flow-chart structure.This information
does not directly impact the flow chart characteristics of a Process.
Three different kinds of artifacts are available : A Text Annotation provides
the modeler with the ability
Groups, Text Annotations, Data Objects.
to add further descriptive
Modelers and tool vendors can extend BPMN information or notes about a
through the addition of new types of Artifacts. Process or its elements.
Groups cannot be
interrupted by
Intermediate
Events
A Group is used to
surround a group of
flow objects in order
to highlight and/or
categorize them.
69
Data Objects
Data Objects are used to show how data and documents are used
within a Process. While Data Objects do not affect the structure and
flow of the Process, they are intimately tied to performance of
Activities.
Data Objects can be used to define inputs and outputs of activities.
Data Objects also have states that
depict how the object (document) is
updated within the Process. The state is
usually shown under the name of the
Data Object and is placed between
brackets.
By using the state of a Data Object and
placing it within multiple locations within
a diagram, the modeler can document
the changes that a Data Object will go
through during the Process.
70
Data Flow
Data flow represents the movement of Data Objects from into and out
of Activities.
In BPMN, data flow is decoupled from the Sequence Flow.
It is possible to combine the Sequence Flow and the data flow when
they coincide, but they are natively separated to allow modeling
flexibility.
71
Error Events
The Error Intermediate Event is used to
handle the occurrence of an error that
Error End Event
Catching
needs the interrupting of an Activity (to
which it is attached).
Error Intermediate Event An error is generated by applications or
Throwing
systems involved in the work (which are
transparent to the Process) or by End
Events.
The Error End Event is used to throw an error.
The Error Intermediate Event can only be used when attached
to the boundary of an Activity, thus it can only be used to
catch an error.
When an error occurs all work will stop for that Process.
However, these Events do not interrupt the Activity since they
are only operational after an Activity has completed.
73
Exception Handling
Exception Handling
75
Transactions
A Process model (i.e.,
within one Pool), shows the
Activities of the Transaction
Sub-Process for just one of
the participants.
A Transaction is a set of
activities that logically belong
together.
In BPMN, a Transaction is a
formal business relationship
and agreement between two
or more participants.
For a Transaction to succeed, all
parties involved have to perform
their own Activities and reach an
agreement point.
If any one of them withdraws or
fails to complete, then the
Transaction cancels and all
parties need to undo all the work
that has completed.
76
Transactions
Cancel Events
The Cancel Intermediate Event is designed to handle
a situation where a transaction is canceled.
Cancel Intermediate Events can only catch a transaction
cancellation. The Cancel End Event throws the cancellation.
The Cancel Intermediate Event can only be attached to the
boundary of a Transaction Sub-Process. It can be triggered by a
Cancel End Event within the Sub-Process, or through a cancellation
received through the transaction protocol assigned to the
Transaction Sub-Process.
When triggered, the Transaction Sub-Process is interrupted (all
work stops) and the Sub-Process is rolled-back, which may result in
the compensation of some of the Activities within the Sub-Process.
To cancel the Transaction Sub-Process, the Cancel End Event must
be contained within the Sub-Process or within a lower level child
Sub-Process.
78
Compensation Events
There are two types of Compensation
Intermediate Events: throwing and
catching - i.e. sending and receiving.
The catch Compensation Intermediate Event can only be used by
attaching them to the boundary of an Activity. However, the throw
Compensation Intermediate Event is used in normal flow.
The Compensation End Event indicates that the ending of a Process
path results in the triggering of a compensation.
In the definition of the Compensation End Event the name of an Activity
can be identified as the Activity that should be compensated. The
Activity must be within the Process, either at the top-level Process or
within a Sub-Process.
If the named Activity was completed and it has an attached
Compensation Intermediate Event, then that Activity will be
compensated.
79
Hazard in a Transaction
Sub-Process
When there is a hazard, a normal
cancellation and compensation are
not sufficient to fix the situation.
The transaction is then interrupted.
The error can happen within the
Transaction Sub-Process or within
a Process (unseen) of one the
other participants in the
transaction.
The error from one of the other participants will be sent through the
transaction protocol.
When Error Intermediate Event triggers, all work within the SubProcess is terminated immediately - there is no compensation.
The token then is sent down the outgoing Sequence Flow of the Error
Event to reach Activities that will deal with the situation.
80
Cancellation in a
Transaction Sub-Process
a Transaction Sub-Process can be
cancelled through an Event
internal to the Sub-Process or
through a cancellation sent through
a transaction protocol.
When a Transaction Sub-Process
is cancelled, the Cancel
Intermediate Event attached to its
boundary is triggered.
The token will eventually continue down the Cancel Intermediate
Events outgoing Sequence Flow, but the behavior of the Transaction
Sub-Process involves more than just interrupting the work in the SubProcess.
Indeed, all ongoing work within the transaction is cancelled.
81
Compensation in a
Transaction Sub-Process
However, completed work (in the
Transaction Sub-Process) may
need to be undone, which requires
a rolling back before the parent
Process can continue.
This means that each Activity in
turn, in reverse order, is checked to
see whether or not it requires
compensation. Compensation is
the undoing of work that has been
completed.
A token can be used to trace this
rolling back as it travels backward
through the Process after a
Transaction Sub-Process has been
cancelled.
82
Compensation in a
Transaction Sub-Process
The link between the normal Activity and the Compensation Activity is
done through an Association rather than a Sequence Flow.
The Compensation Intermediate Event is never triggered during the
normal flow of the Process. It only can be triggered during the rollback of the Transaction Sub-Process. Only one Compensation Activity
can be associated with the Compensation Intermediate Event.
When the reversal of the token reaches an Activity that has an attached
Compensation Intermediate Event, that Compensation Event fires and
the token is then sent to the associated Compensation Activity.
83
Compensation in a
Transaction Sub-Process
When the Compensation Activity
has completed, the token
continues its backward journey
through the Transaction by
leaving the Activity whose work
was just undone.
When all the Activities of the
Transaction Sub-Process have
been checked and, if necessary,
compensated, then the
cancellation of the Transaction is
completed.
This allows the token in the
parent Process to travel down the
outgoing Sequence Flow of the
attached Compensation
84
Intermediate Event.
Ad Hoc Processes
The Ad Hoc Process represents Processes where the Activities might
occur in any order, and in any frequency- there is no specific ordering
or obvious decisions.
Typically, the Activities in
an Ad Hoc Process involve
human performers who
make the decisions as to
what Activities to perform,
when to perform them, and
how many times.
The Ad Hoc Process has a
non-graphical completion
condition attribute that is
used to determine if the
work of the Process is
complete.
85
Swimlanes
BPMN uses swimlanes to help partition and/organize activities in a
diagram. There are two main types:
Pools - act as containers for a Process, each one representing a
participant in a collaborative Business Process Diagram.
Lanes - often assumed to represent internal business roles within a
Process, Lanes actually provide a generic mechanism for partitioning
the objects within a Pool based on the characteristics of the Process
or elements.
86
Message Flows
Message Flow defines the messages/communications between two
separate participants (shown as Pools) of the diagram.
Message Flow must always occur between two separate Pools and
cannot connect two objects within a single Pool.
Thus, Message Flow is only used in
collaborations (diagrams with two or
more Pools).
Where a Pool has Process elements,
the Message Flow connects to those
elements
Sequence Flow cannot cross a Pool
boundary - i.e., a Process is fully
contained within a Pool.
87
88
Lanes
Lanes create sub-partitions for the objects within a Pool.
These partitions are used to group Process elements (showing how
they are related), or which roles have responsibility for carrying out
the Activities.
Lanes often represent organization
roles (e.g., Manager, Administration,
Associate, etc), but can represent any
desired classification (e.g., underlying
technology, organizational
departments, company products, etc).
Sequence Flow can cross Lane
boundaries.
Message Flow is not used within or
across Lanes of a Pool.
Lanes can be nested.
89
Conversation Diagrams
90
Conversation Elements
91
Coreography Diagram
92
Coreography Elements
93
Topics
Process Modeling
BPMN Background
Basic Concepts
Advanced Concepts
Conclusions
94
Sub-Process Marker
Send Task
Loop Marker
Receive Task
Parallel MI Marker
User Task
Sequential MI Marker
Manual Task
Ad Hoc Marker
Compensation Marker
Service Task
Pool
(Black Box)
has a condition
assigned that defines
whether or not the
flow is used.
Complex Gateway
Complex merging and
branching behavior that is not
captured by other gateways.
Attached
Intermediate
Timer Event
Ad-hoc Subprocess
Manual Task
Task
End
Event
Timer
Intermediate
Event
Subprocess
Data
Store
Attached
Intermediate
Error Event
Looped
Subprocess
End
Event
Start
Event
Link
Intermediate
Event
Escalation
End Event
Signal
End
Event
Collection
Text Annotation
Group
Data
Multi Instance
Task (Parallel)
condition
Event Subprocess
Conditional
Start Event
Error End
Event
Call Activity
Send Task
Exclusive
Gateway
Task
Swimlanes
Parallel
Gateway
Task
Message
End Event
Input
Output
Data Store
2011
Standard
Throwing
Boundary NonInterrupting
Conditional: Reacting to
changed business conditions
or integrating business rules.
Task
Data Object
Inclusive Gateway
When splitting, one or more
branches are activated. All
active incoming branches must
complete before merging.
Event-based
Gateway
Receive Task
Message
Start Event
Lane
Parallel Gateway
Escalation: Escalating to
an higher level of
responsibility.
Compensation: Handling or
triggering compensation.
Collapsed
Subprocess
Message Flow
Parallel
Link
Intermediate Multiple
Intermediate
Event
Event
Lane
Event-based Gateway
Choreography
Task
Participant C
Response
Message
(decorator)
Pool
Exclusive Gateway
Participant A
Participant B
Collaboration Diagram
Lane
Gateways
Participant B
Participant B
Participant C
Conditional Flow
a decorator depicting
the content of the
message. It can only
be attached to
Choreography Tasks.
Sub-Conversation
Choreography
Task
Choreography
Task
Message
(Black Box)
Participant A
Participant
B
Participant
A
(Black Box)
Lane
Default Flow
Initiating
Message
(decorator)
End
Participant A
denotes a set of
Participants of the
same kind.
Conversation
A Call Choreography is a
wrapper for a globally
defined Choreography Task
or Sub-Choreography. A call
to a Sub-Choreography is
marked with a
symbol.
Choreography Diagram
Pool
Script Task
Sequence Flow
A Sub-Choreography contains
a refined choreography with
several Interactions.
Multiple
Participants Marker
Conversation Diagram
Participant B
Participant B
Participant C
A Choreography Task
represents an Interaction
(Message Exchange)
between two Participants.
Events
Intermediate
Pool
Participant B
Pool
Task Types
Call
Choreography
Pool
(Black
Box)
Activity Markers
Sub-Choreography
Call Activity
Choreography
Task
Start
Boundary
Interrupting
Event
Sub-Process
Participant A
Catching
Participant A
Event Sub-Process
Non-Interrupting
Transaction
Task
Participant A
Event Sub-Process
Interrupting
Standard
Conversations
Activities
http://bpmb.de/poster
References
[BPMN 2.0 spec] OMG. BPMN 2.0 specification. (January 2011)
[1] M. Weske. Business Process Management: Concepts, Languages,
Architectures. Springer-Verlag (2007).
[2] Workflow Management Coalition. XPDL 2.1 Complete Specification
(2008).
[3] OASIS. Web Services Business Process Execution Language Version
2.0. http://docs.oasis-open.org/wsbpel/2.0/Primer/wsbpel-v2.0-Primer.pdf
(2007).
[4] R. Hull. Artifact-Centric Business Process Models: Brief Survey of
Research Results and Challenges. In Proceedings of the OTM 2008
Confederated International Conferences, CoopIS (2008).
[5] W.M.P .van der Aalst, C. Stahl. Modeling Business Processes A Petri Net
Oriented Approach. The Mit Press (2011).
[6] M. Pesic. DECLARE: Full Support for Loosely-Structured Processes.
In Proceedings at the 11th IEEE International Enterprise Distributed
Object Computing Conference (EDOC) (2007) .
96
References
[7] A.H.M. ter Hofstede, W. van der Aalst, M. Adams, N. Russell. Modern
Business Process Automation: YAWL and its Support Environment.
Springer-Verlag (2009).
[8] S. Christensen, N. Damgaard Hansen. Coloured Petri Nets: Basic
Concepts, Analysis Methods and Practical Use. Jensen (1997).
97