modeling process aware information systems with bpmn

62
(c) Wil van der Aalst, Eindhoven University of Technology PN-1 Modeling Process Aware Information Systems with BPMN Fabrizio Maria Maggi Based on lecture material by Marlon Dumas (University of Tartu, Estonia) and Wil van der Aalst (Eindhoven University of Technology, The Netherlands http://www,workflowcourse.com)

Upload: others

Post on 24-Mar-2022

6 views

Category:

Documents


0 download

TRANSCRIPT

(c) Wil van der Aalst, Eindhoven University of Technology

PN-1

Modeling Process Aware

Information Systems with BPMN

Fabrizio Maria Maggi

Based on lecture material by Marlon Dumas (University of Tartu,

Estonia) and Wil van der Aalst (Eindhoven University of Technology,

The Netherlands http://www,workflowcourse.com)

(c) Wil van der Aalst, Eindhoven University of Technology

Business Process

Lifecycle

Purposes of process modeling

3

• Communication

• Documentation

• Analysis (e.g. simulation)

• Automation

• Testing

Conceptual

Conceptual

Executable

(c) Wil van der Aalst, Eindhoven University of Technology

1. Introduction

2. Process Identification

3. Essential Process Modeling

4. Advanced Process Modeling

5. Process Discovery

6. Qualitative Process Analysis

7. Quantitative Process Analysis

8. Process Redesign

9. Process Automation

10.Process Intelligence

(c) Wil van der Aalst, Eindhoven University of Technology

Business Process

Lifecycle

(c) Wil van der Aalst, Eindhoven University of Technology

Petri nets for modeling business processes

• [Aalst96] proposed to explicitly use Petri nets for

business process modelling.

• Intuition: transitions represent the tasks that

comprise a business process and places represent

the conditions preceding and following the tasks.

[Aalst96] W.M.P. van der Aalst. Three Good Reasons for Using a Petri-net-based Workflow Management System. Proc. of the International Working Conference on Information and Process Integration in Enterprises (IPIC’96), pp. 179-201 (1996)

(c) Wil van der Aalst, Eindhoven University of Technology

Petri net exampleOrder Fulfillment Example

First, a take order

task is executed.

Then, pack order and

check account tasks are

executed in parallel.

When pack order and check account

tasks have been both completed, the

credit check task is executed.

If the customer has sufficient credit

remaining, the order is despatched.

If the customer has not sufficient credit

the decline order runs and, finally, the

return stock task ensures that the

items from the order are returned to

the warehouse.

(c) Wil van der Aalst, Eindhoven University of Technology

Workflow nets: Definition

• The work [Aalst96] proposed a particular subclass of Petri nets,

called Workflow nets (WF-nets) for modelling processes.

• A WF-net has a single start place and a single end place.

– This means that WF-nets closely correspond to real-life processes that tend to

have a specific starting point and a specific end point.

• Every transition in the workflow net is on a path from the start to

the end place.

– This ensures that each transition in a workflow net contributes to the progression

of an executing instance towards its end state.

• Definition: A Petri net N = (P, T, F) is a WF-net (Workflow net) if

and only if:

– There is one source place i ∈ P such that •i = ∅

– There is one sink place o ∈ P such that o• = ∅

– Every node x ∈ P ∪ T is on a path from i to o.

Exercise: Candidate WF-nets?

(c) Wil van der Aalst, Eindhoven University of Technology

Workflow nets: Definition

• It is important to notice that the previous definition traces

the minimal requirements for a WF-net.

• However, it does not guarantee that a candidate WF-net

net will not potentially be subject to deadlocks.

• To ensure that any given process instance behaves in a

predictable way, in [AH02] a number of so-called

soundness criteria are formulated.

[AH02] Wil M.P. van der Aalst and Kees M. van Hee. Workflow

Management: Models, Methods, and Systems. The MIT Press (2002)

(c) Wil van der Aalst, Eindhoven University of Technology

Workflow nets: Soundness

Definition [soundness]: A procedure modeled in the form of a WF-net

N = (P, T, F) is sound if and only if:

– [Option to Complete] Given an initial marking i, from every marking M reachable from

i, there exists a firing sequence leading from state M to state o.

• This means that the any executing instance of the WF-net must

eventually complete, i.e., net is free of deadlock and infinite loops.

– [Proper Completion] State o is the only state reachable from state i with at least one

token in place o. Formally:

• When the net completes, no other task is still running and

completion is signalled only once. At the moment of termination,

there must be one token in the end place o and all other places in

the WF-net must be empty.

– [No Dead Tasks] For every transition t, a marking M reachable from i can be

found that enables t.

• The net does not contain any superfluous parts that can never be

activated. In a nutshell, dead transitions are not allowed.

(c) Wil van der Aalst, Eindhoven University of Technology

Workflow Net Constructs

Automatic tasks

execute as soon as

they are enabled.

User tasks are passed to

human resources for execution

once enabled.

External tasks only proceed once

they are enabled and a required

message or signal is received from

the operating environment.

Time tasks only proceed once they

are enabled and a specified (time-

based) deadline occurs.

There are some notational enhancements

for split and join constructs that simplify the

specification of a WF-net. Petri nets can be

used to understand their semantics.

(c) Wil van der Aalst, Eindhoven University of Technology

Parallelism: AND-split

A

B

C

B

C

• According to the WfMC [WfMC], an AND-split

is “a point within the workflow where a single

thread of control splits into two or more

threads which are executed in parallel within

the workflow, allowing multiple activities to be

executed simultaneously.”

• The execution of A enables both task B and

task C. As a result, task B and task C are

executed in parallel (in an arbitrary order).

• In WF-nets, a special construct for AND-split

is introduced.

AND-split

A

(c) Wil van der Aalst, Eindhoven University of Technology

Parallelism: AND-join

B

C

D

B

C

• According to the WfMC [WfMC], an AND-join

is “a point in the workflow where two or more

parallel executing activities converge into a

single common thread of control.”

• Task D is enabled after execution both B and

C, i.e., D is used to synchronize two subflows.

• In WF-nets, a special construct for AND-JOIN

is introduced.

AND-join

D

(c) Wil van der Aalst, Eindhoven University of Technology

Conditional Routing: XOR-split

A

B

C

B

C

• According to the WfMC [WfMC], a XOR-split

is “a point within the workflow where a single

thread of control makes a decision upon

which branch to take when encountered with

multiple alternative workflow branches.”

• Only one of the outgoing branches can be

chosen (i.e., either task B or C can be

executed).

• In WF-nets, a special construct for XOR-spit

is introduced.

XOR-split

A

(c) Wil van der Aalst, Eindhoven University of Technology

Conditional Routing: XOR-join

B

C

D

B

C

• According to the WfMC [WfMC], a XOR-join is

“a point within the workflow where two or more

alternative activity(s) workflow branches re-

converge to a single common activity as the

next step within the workflow.

• As no parallel activity execution has occurred

at the join point, no synchronization is

required. Therefore, D is enabled when B or C

complete.

• In WF-nets, a special construct for XOR-JOIN

is introduced.

XOR-join

D

(c) Wil van der Aalst, Eindhoven University of Technology

WF-net exampleOrder Fulfillment Process

The take order task is externally

triggered when an order request is

received.

Most tasks are undertaken by

human resources (i.e., staff).

The decline order task runs automatically

with the customer receiving a notification

either by email or fax.

(c) Wil van der Aalst, Eindhoven University of Technology

From Workflow Nets to BPMN

18

� A WF-net may be used to represent a process model, while the

tokens represent process instances.

� Since tokens in WF-nets cannot be distinguished from each other,

WF-nets can only host a single process instance per time.

� Moreover, WF-nets are not able to explicitly represent resources,

data, etc.

� The Business Process Modeling Notation (BPMN) has been

instead developed with the purpose of supporting the complete range

of subdomains of business process modelling.

� BPMN is the ISO standard for modeling business processes

(ISO/IEC 19510:2013), and creates a standardized bridge for the gap

between the business process design and process implementation.

� The theoretical underpinnings of BPMN are largely based on WF-nets

nets, adopting the same token passing for flow control.

(c) Wil van der Aalst, Eindhoven University of Technology

Business Process Model and Notation (BPMN)

• OMG standard (nowadays BPMN 2.0)

• Supported by numerous tools: bpmn.org lists over 70 tools

(c) Wil van der Aalst, Eindhoven University of Technology

BPMN from 10,000 miles)

A BPMN process model is a graph consisting of four

types of core elements:

activity gatewayevent sequence

flow

start end

A start event triggers a new process instance

by generating a token that traverses the

sequence flow (“tokens source”)

An end event signals that a process instance has

completed with a given outcome by consuming

a token (“tokens sink”)

A little bit more on events…

21

start

event

end

event

An order-to-cash process is triggered by the receipt of a

purchase order from a customer. Upon receipt, the purchase

order has to be checked against the stock to determine if the

the requested item(s) are available. Depending on stock

availability the purchase order may be confirmed or rejected.

If the purchase order is confirmed, an invoice is emitted and the

goods requested are shipped. The process completes by

archiving the order.

Let’s start modeling

Order-to-cash

• An order-to-cash process is triggered by the receipt of a

purchase order from a customer.

• Upon receipt, the purchase order has to be checked against

the stock to determine if the the requested item(s) are

available.

• Depending on stock availability the purchase order may be

confirmed or rejected.

• If the purchase order is confirmed, an invoice is emitted and

the goods requested are shipped. The process completes by

archiving the order.

Let’s start modeling – break it down

Order-to-cash

• An order-to-cash process is triggered by the receipt of a

purchase order from a customer.

• Upon receipt, the purchase order has to be checked against

the stock to determine if the the requested item(s) are

available.

Let’s start modeling – break it down

Order-to-cash

BPMN Model

25

Order-to-cash

Purchase

order

received

Check stock

availability

• An order-to-cash process is triggered by the receipt of a

purchase order from a customer.

• Upon receipt, the purchase order has to be checked against

the stock to determine if the the requested item(s) are

available.

• Depending on stock availability the purchase order may be

confirmed or rejected.

• If the purchase order is confirmed, an invoice is emitted and

the goods requested are shipped. The process completes by

archiving the order.

Let’s start modeling – break it down

Order-to-cash

BPMN Model

start

event

end

event

activity

split gateway

27

Order-to-cash

Purchase

order

received

end

event

Ship goods

Order

rejected

Order

fulfilled

Archive

order

Reject order

Confirm

order

Items in

stock

Items not in

stock

Check stock

availability

Emit

invoice

• Event: noun + past-participle verb (e.g. insurance claim lodged)

Naming conventions

• Activity: verb + noun (e.g. assess credit risk)

Check stock

availability

Reject order

Confirm

order

Emit

invoiceShip goods

Purchase

order

receivedItems in

stock

Items not in

stockOrder

rejected

Order

fulfilled

Archive

order

Execution of a process model

The “token game”

28

Order #1

Order #2

Order #3

[…] If the purchase order is confirmed, an invoice is emittedand the goods requested are shipped (in any order). Theprocess completes by archiving the order. […]

Order-to-cash example revisited…

29

Check stock

availability

Reject order

Confirm

order

Emit

invoiceShip goods

Purchase

order

receivedItems in

stock

Items not in

stockOrder

rejected

Order

fulfilled

Archive

order

XOR-split � takes one outgoing branch

XOR-join � proceeds when one incoming branch has

completed

A little more on gateways: XOR Gateway

condition

¬ condition

30

An XOR Gateway captures decision points (XOR-

split) and points where alternative flows are merged

(XOR-join)

Example: XOR Gateway

5

Invoice checking process

A little more on gateways: AND Gateway

32

An AND Gateway provides a mechanism to

create and synchronize “parallel” flows.

AND-split � takes all outgoing branches

AND-join � proceeds when all incoming branches

have completed

33

Example: AND Gateway

Airport security check

Check stock

availability

Reject order

Confirm order

Send invoice

Ship goods

Purchase

order

receivedItems in

stock

Items not in

stockOrder

rejected

Order

fulfilled

Archive

order

Revised order-to-cash process model

XOR-split

AND-split AND-join

34

(c) Wil van der Aalst, Eindhoven University of Technology

Petri nets to BPMN

35

(c) Wil van der Aalst, Eindhoven University of Technology

Petri nets to BPMN

36

(c) Wil van der Aalst, Eindhoven University of Technology

Petri nets to BPMN

37

(c) Wil van der Aalst, Eindhoven University of Technology

Petri nets to BPMN

38

(c) Wil van der Aalst, Eindhoven University of Technology

Petri nets to BPMN

39

A company has two warehouses that store different products:

Amsterdam and Hamburg. When an order is received, it is

distributed across these warehouses: if some of the relevant

products are maintained in Amsterdam, a sub-order is sent

there; likewise, if some relevant products are maintained in

Hamburg, a sub-order is sent there. Afterwards, the order is

registered and the process completes.

Between XOR and AND

40

Order distribution process

Solution 1

XOR-split XOR-join

AND-split AND-join

41

Order distribution process

Solution 2

42

Order distribution process

XOR-split XOR-join

AND-split AND-join

OR Gateway

43

An OR Gateway provides a mechanism to create

and synchronize n out of m parallel flows.

OR-split � takes one or more branches depending

on conditions

OR-join � proceeds when all active incoming

branches have completed

cond1

condn

Solution using OR Gateway

44

Order distribution process

Quick Note: Implicit vs. explicit gateways

A

B

C

B

C

A=

45

Guidelines: Naming Conventions

1. Give a name to every event and task

2. For tasks: verb followed by business object name and possibly complement• Issue Driver Licence, Renew Licence via Agency

3. For message events: object + past participle• Invoice received, Claim settled

4. Avoid generic verbs such as Handle, Record6

5. Label each XOR-split with a condition• Policy is invalid, Claim is inadmissible

Poll: Which model do you prefer?

One more guideline!

• Model in blocks• Pair up each AND-split with an AND-join and each XOR-split with a XOR-

join, whenever possible

• Exception: sometimes a XOR-split leads to two end events – different

outcomes (cf. order management example)

Rework and repetition

Address ministerial correspondence

In the minister’s office, when a ministerial inquiry has been received, it is

registered into the system. Then the inquiry is investigated so that a

ministerial response can be prepared.

The finalization of a response includes the preparation of the response itself

by the cabinet officer and the review of the response by the principal

registrar. If the registrar does not approve the response, the latter needs to

be prepared again by the cabinet officer for review. The process finishes

only once the response has been approved.

XOR-join: entry point XOR-split: exit point

49

When?

Flows

Gateways

Which?

Data / Materials

What?

Tasks

Events

Who?Organization

Process Modelling Viewpoints

Lanes &

Pools

Data Objects,

Stores

Organizational Elements in BPMN – Pools & Lanes

51

Pool

Captures a resource class. Generally used to model a business party (e.g. a whole company)Pool

Lane

A resource sub-class within a pool. Generally used to model departments (e.g. shipping, finance), internal roles (e.g. Manager, Associate), software systems (e.g. ERP, CRM)

Order-to-cash process with lanes

A Message Flow represents a flow of information between

two process parties (Pools)

Message

Message Flow

53

Pool 2

Poo

l 1

Pool 2

Poo

l 1

Send

Receive

Send Receive

A Message Flow can connect:

• directly to the boundary of a Pool � captures an informative message

to/from that party

• to a specific activity or event within that Pool � captures a message

that triggers a specific activity/event within that party

Order-to-cash process with a black-box customer pool

54

1. A Sequence Flow cannot cross the boundaries of a Pool (message flows can)

2. Both Sequence Flow and Message Flow can cross the boundaries of Lanes

3. A Message Flow cannot connect two flow elements within the same pool

Pools, Lanes and Flows: syntactic rules

One more guideline!

• Start modeling with one single “white-box” pool

• Initially, put the events and tasks in only one pool – the pool of the

party who is running the process

• Leave all other pools “black-boxed”

• Once you have modeled this way, and once the process diagram

inside the white-box pool is complete, you can model the details

(events and tasks) in the other pools if that is useful.

• In this course we will only model processes with one single white-

box pool – all other pools are black-box

Which?

Data / Materials

Process Modelling Viewpoints

Data Objects,

Stores

The purchase order document serves as an input to the stock

availability check. Based on the outcome of this check, the

status of the document is updated, either to “approved” or

“rejected”. If the order is approved, an invoice and a shipment

notice are produced.

Order-to-cash process, again

58

Check stock

availability

Confirm

order

Reject order

Send

invoice

Ship goods

Purchase

order

received

Items not in

stock

Items in

stock

Order

rejected

Order

fulfilled

Archive

order

Purchase

Order

Invoice

Check stock

availability

Confirm

order

Reject order

Send

invoice

Ship goods

Purchase

order

received

Items not in

stock

Items in

stock

Order

rejected

Order

fulfilled

Archive

order

Model with information artifacts

Purchase

Order

59

Purchase

Order

[checked]

Purchase

Order

[rejected]

Purchase

Order

[approved]

Purchase

OrderShipment

notice

Warehouse DB

Orders DB

Purchase

Order

A Data Object captures an artifact required

(input) or produced (output) by an activity.

• Can be physical or electronic

BPMN Information Artifacts

60

Emit

invoice

Purchase

order

Invoice

Retrieve client

information

Oracle CRM Client info

A Data Store is a place containing data objects

that must be persisted beyond the duration of

a process instance.

It is used by an activity to store (as output) or

retrieve (as input) data objects.

A Text Annotation is a mechanism to provide additional text

information to the model reader

• Doesn’t affect the flow of tokens through the process

Quick Note: BPMN Text Annotations

61

Clear vendor

line items

For blocked invoices

Ship goods

Includes packaging

BPMN Poster

(http://www.bpmb.de/images/BPMN2_0_Poster_EN.pdf )

62