BIPM - LIACS - Universiteit Leiden

Business Intelligence and Process Modelling
F.W. Takes
Universiteit Leiden
Lecture 7: Process Modelling & Petri Nets
BIPM — Lecture 7: Process Modelling & Petri Nets
1 / 56
Recap
Business Intelligence
Process Modelling
Business process modelling
Modelling languages
Process discovery
Applications in financial industry
BIPM — Lecture 7: Process Modelling & Petri Nets
2 / 56
Process Modelling
BIPM — Lecture 7: Process Modelling & Petri Nets
3 / 56
Business Process Management (recap)
Process: a set of related actions and transactions to achieve a
certain objective
Business process: a sequence of activities aimed at producing
something of value for the business (Morgan02)
Management processes
Operational processes
Supporting processes
Business Process Management: the discipline that combines
knowledge from information technology and knowledge from
management sciences and applies this to operational business
processes (v.d. Aalst)
Extension of WorkFlow Management (WFM)
BIPM — Lecture 7: Process Modelling & Petri Nets
4 / 56
Business Process Modelling (recap)
Business Process Model: abstract representation of business
processes, functionality is:
Descriptive: what is actually happening?
Prescriptive: what should be happening?
Explanatory: why is the process designed this way?
In practice: formalize and visualize business processes
Process Discovery: derive the process from a description of
activities
Process Mining: the task of converting event data into process
models (discovery, conformance, enhancement)
BIPM — Lecture 7: Process Modelling & Petri Nets
5 / 56
Why Model Processes? (recap)
BIPM — Lecture 7: Process Modelling & Petri Nets
6 / 56
Classical BPM Lifecycle (recap)
BIPM — Lecture 7: Process Modelling & Petri Nets
7 / 56
Process Mining (recap)
BIPM — Lecture 7: Process Modelling & Petri Nets
8 / 56
Business Process. . . Intelligence?
M. Castellanos et al., Business process intelligence, Handbook
of research on business process modeling, pp. 456–480, 2009.
BIPM — Lecture 7: Process Modelling & Petri Nets
9 / 56
Process Modelling
Informal models: used for discussion and documentation
(process descriptions)
Formal models: used for analysis or enactment
(Colored) Petri Nets — today
Business Process Model Notation — next lecture
BIPM — Lecture 7: Process Modelling & Petri Nets
(C)PN
BPMN
10 / 56
Business Process Model Notation
BIPM — Lecture 7: Process Modelling & Petri Nets
11 / 56
Petri Nets
BIPM — Lecture 7: Process Modelling & Petri Nets
12 / 56
Event logs (1)
Case ID
1
1
1
1
1
2
2
2
2
2
3
3
3
3
3
3
3
3
3
4
4
4
4
4
...
Event ID
35654423
35654424
35654425
35654426
35654427
35654483
35654485
35654487
35654488
35654489
35654521
35654522
35654524
35654525
35654526
35654527
35654530
35654531
35654533
35654641
35654643
35654644
35654645
35654647
dd-mm-yyyy:hh.mm
30-12-2010:11.02
31-12-2010:10.06
05-01-2011:15.12
06-01-2011:11.18
07-01-2011:14.24
30-12-2010:11.32
30-12-2010:12.12
30-12-2010:14.16
05-01-2011:11.22
08-01-2011:12.05
30-12-2010:14.32
30-12-2010:15.06
30-12-2010:16.34
06-01-2011:09.18
06-01-2011:12.18
06-01-2011:13.06
08-01-2011:11.43
09-01-2011:09.55
15-01-2011:10.45
06-01-2011:15.02
07-01-2011:12.06
08-01-2011:14.43
09-01-2011:12.02
12-01-2011:15.44
Activity
register request
examine thoroughly
check ticket
decide
reject request
register request
check ticket
examine casually
decide
pay compensation
register request
examine casually
check ticket
decide
reinitiate request
examine thoroughly
check ticket
decide
pay compensation
register request
check ticket
examine thoroughly
decide
reject request
Resource
Pete
Sue
Mike
Sara
Pete
Mike
Mike
Sean
Sara
Ellen
Pete
Mike
Ellen
Sara
Sara
Sean
Pete
Sara
Ellen
Pete
Mike
Sean
Sara
Ellen
Costs
50
400
100
200
200
50
100
400
200
200
50
400
100
200
200
400
100
200
200
50
100
400
200
200
Table : Event logs of a helpdesk handling customer compensations
BIPM — Lecture 7: Process Modelling & Petri Nets
13 / 56
Event logs (2)
Case ID
...
5
5
5
5
5
5
5
5
5
5
5
5
5
6
6
6
6
6
Event ID
dd-mm-yyyy:hh.mm
Activity
Resource
35654711
35654712
35654714
35654715
35654716
35654718
35654719
35654720
35654721
35654722
35654724
35654725
35654726
35654871
35654873
35654874
35654875
35654877
06-01-2011:09.02
07-01-2011:10.16
08-01-2011:11.22
10-01-2011:13.28
11-01-2011:16.18
14-01-2011:14.33
16-01-2011:15.50
19-01-2011:11.18
20-01-2011:12.48
21-01-2011:09.06
21-01-2011:11.34
23-01-2011:13.12
24-01-2011:14.56
06-01-2011:15.02
06-01-2011:16.06
07-01-2011:16.22
07-01-2011:16.52
16-01-2011:11.47
register request
examine casually
check ticket
decide
reinitiate request
check ticket
examine casually
decide
reinitiate request
examine casually
check ticket
decide
reject request
register request
examine casually
check ticket
decide
pay compensation
Ellen
Mike
Pete
Sara
Sara
Ellen
Mike
Sara
Sara
Sue
Pete
Sara
Mike
Mike
Ellen
Mike
Sara
Mike
Costs
50
400
100
200
200
100
400
200
200
400
100
200
200
50
400
100
200
200
Table : Event logs of a support desk handling customer compensations
BIPM — Lecture 7: Process Modelling & Petri Nets
14 / 56
Simplified event log
Case ID
1
2
3
4
5
6
Trace
ha, b, d, e, hi
ha, d, c, e, g i
ha, c, d, e, f , b, d, e, g i
ha, d, b, e, hi
ha, c, d, e, f , d, c, e, f , c, d, e, hi
ha, c, d, e, g i
Table : Simplified event log of a support desk handling customer
compensations (a = register request, b = examine thoroughly, c = examine
casually, d = check ticket, e = decide, f = reinitiate request, g = pay
compensation, h = reject request)
BIPM — Lecture 7: Process Modelling & Petri Nets
15 / 56
Simplified event log
Case ID
1
2
3
4
5
6
Trace
ha, b, d, e, hi
ha, d, c, e, g i
ha, c, d, e, f , b, d, e, g i
ha, d, b, e, hi
ha, c, d, e, f , d, c, e, f , c, d, e, hi
ha, c, d, e, g i
Table : Simplified event log of a support desk handling customer
compensations (a = register request, b = examine thoroughly, c = examine
casually, d = check ticket, e = decide, f = reinitiate request, g = pay
compensation, h = reject request)
In short: {ha, b, d, e, hi, ha, d, c, e, g i, ha, c, d, e, f , b, d, e, g i,
ha, d, b, e, hi, ha, c, d, e, f , d, c, e, f , c, d, e, hi, ha, c, d, e, g i}
BIPM — Lecture 7: Process Modelling & Petri Nets
15 / 56
Example (1)
Case ID
1
2
3
4
5
6
Trace
ha, b, d, e, hi
ha, d, c, e, g i
ha, c, d, e, f , b, d, e, g i
ha, d, b, e, hi
ha, c, d, e, f , d, c, e, f , c, d, e, hi
ha, c, d, e, g i
BIPM — Lecture 7: Process Modelling & Petri Nets
16 / 56
Example (2)
Figure : Petri net based on event log {ha, b, d, e, hi, ha, d, b, e, hi}
BIPM — Lecture 7: Process Modelling & Petri Nets
17 / 56
Play in
BIPM — Lecture 7: Process Modelling & Petri Nets
18 / 56
Play out
BIPM — Lecture 7: Process Modelling & Petri Nets
19 / 56
Replay
BIPM — Lecture 7: Process Modelling & Petri Nets
20 / 56
Replay
Connecting models to real events is crucial
Possible uses
Conformance checking
Repairing models
Extending the model with frequencies and temporal information
Constructing predictive models
Operational support (prediction, recommendation, etc.)
BIPM — Lecture 7: Process Modelling & Petri Nets
21 / 56
Petri Nets
BIPM — Lecture 7: Process Modelling & Petri Nets
22 / 56
Automata (remember?)
Finite automaton FA = (Q, Σ, qo , A, δ)
Q is a finite set of states
Σ is a finite alphabet of input symbols
qo ∈ Q is the initial state
A ⊆ Q is the set of accepting states
δ : Q × Σ → Q is the transition function
BIPM — Lecture 7: Process Modelling & Petri Nets
23 / 56
Automata (remember?)
Finite automaton FA = (Q, Σ, qo , A, δ)
Q is a finite set of states
Σ is a finite alphabet of input symbols
qo ∈ Q is the initial state
A ⊆ Q is the set of accepting states
δ : Q × Σ → Q is the transition function
Figure : Deterministic Finite Automaton for the function x mod 3
BIPM — Lecture 7: Process Modelling & Petri Nets
23 / 56
Petri Nets
Petri net N = (P, T , F )
P is a finite set of places
T is a finite set of transitions
F ⊆ (P × T ) ∪ (T × P) is a finite
set of directed arcs called the flow
relation
BIPM — Lecture 7: Process Modelling & Petri Nets
24 / 56
Labeled Petri Nets
Petri net N = (P, T , F , A, `)
P is a finite set of places
T is a finite set of transitions
F ⊆ (P × T ) ∪ (T × P) is a finite
set of directed arcs called the flow
relation
A is a set of activity labels
` : T → A is a labeling function
BIPM — Lecture 7: Process Modelling & Petri Nets
25 / 56
Enabling
A transition is enabled if each of its input places contains at
least one token
BIPM — Lecture 7: Process Modelling & Petri Nets
26 / 56
Firing
An enabled transition can fire (i.e., it occurs), consuming a
token from each input place and producing a token for each
output place.
BIPM — Lecture 7: Process Modelling & Petri Nets
27 / 56
Petri Nets
Connections are directed
No connections between two places or two transitions
Places may hold zero or more tokens
At most one arc between nodes (for now)
Firing is atomic
Multiple transitions may be enabled, but only one fires at a time
During execution, the number of tokens may vary if there are
transitions for which the number of input places is not equal to
the number of output places
The network is static
BIPM — Lecture 7: Process Modelling & Petri Nets
28 / 56
Example (1)
Petri net for a traffic light
BIPM — Lecture 7: Process Modelling & Petri Nets
29 / 56
Example (1)
Petri net for a traffic light
States: red, orange and green
BIPM — Lecture 7: Process Modelling & Petri Nets
29 / 56
Example (1)
Petri net for a traffic light
States: red, orange and green
Transitions from red to green, green
to orange, and orange to red
BIPM — Lecture 7: Process Modelling & Petri Nets
29 / 56
Example (1)
Petri net for a traffic light
States: red, orange and green
Transitions from red to green, green
to orange, and orange to red
BIPM — Lecture 7: Process Modelling & Petri Nets
29 / 56
Example (2a)
Petri net for
2 traffic lights
BIPM — Lecture 7: Process Modelling & Petri Nets
30 / 56
Example (2a)
Petri net for
2 traffic lights
BIPM — Lecture 7: Process Modelling & Petri Nets
30 / 56
Example (2b)
Petri net for
2 traffic lights
BIPM — Lecture 7: Process Modelling & Petri Nets
31 / 56
Example (3)
Petri net for
2 traffic lights
BIPM — Lecture 7: Process Modelling & Petri Nets
32 / 56
Marked Petri Nets
Marking: the distribution of tokens over places in a Petri net
Marked Petri net (M, N):
Petri net N = (P, T , F )
Marking M ∈ B(P) is a multi-set over P indicating the marking
of N, denoted for example by [c12 , c2, c34 ]
Net behavior: set of all possible state sequences
BIPM — Lecture 7: Process Modelling & Petri Nets
33 / 56
Reachability graph
BIPM — Lecture 7: Process Modelling & Petri Nets
34 / 56
Reachability graph
BIPM — Lecture 7: Process Modelling & Petri Nets
34 / 56
Reachability graph
BIPM — Lecture 7: Process Modelling & Petri Nets
35 / 56
Different types of states
Initial state: initial distribution of tokens.
Reachable state: reachable from initial state.
Final/dead state: no transition is enabled.
Home state/marking: it is always possible to return (i.e., it is
reachable from any reachable state).
BIPM — Lecture 7: Process Modelling & Petri Nets
36 / 56
Roles in Modelling
Place: passive element
Transition: active element
Arc: causal relation
→
Token: elements subject to change
BIPM — Lecture 7: Process Modelling & Petri Nets
•
37 / 56
Role of a token •
a physical object, for example a product, a part, a drug, a
person;
an information object, for example a message, a signal, a
report;
a collection of objects, for example a truck with products, a
warehouse with parts, or an address file;
an indicator of a state, for example the indicator of the state
in which a process is, or the state of an object;
an indicator of a condition: the presence of a token indicates
whether a certain condition is fulfilled.
BIPM — Lecture 7: Process Modelling & Petri Nets
38 / 56
Role of a place a type of communication medium, like a telephone line, a
middleman, or a communication network;
a buffer: for example, a depot, a queue or a post bin;
a geographical location, like a place in a warehouse, office or
hospital;
a possible state or state condition: for example, the floor
where an elevator is, or the condition that a specialist is
available.
BIPM — Lecture 7: Process Modelling & Petri Nets
39 / 56
Role of a transition an event: for example, starting an operation, the death of a
patient, a change seasons or the switching of a traffic light from
red to green;
a transformation of an object, like adapting a product,
updating a database, or updating a document;
transport of an object: for example, transporting goods, or
sending a file.
BIPM — Lecture 7: Process Modelling & Petri Nets
40 / 56
Typical net structures
Causality
Parallelism (AND-split, AND-join)
Choice (XOR-split, XOR-join)
Iteration (XOR-join, XOR-split)
Capacity constraints
Feedback loop
Mutual exclusion
Alternating
BIPM — Lecture 7: Process Modelling & Petri Nets
41 / 56
Causality
BIPM — Lecture 7: Process Modelling & Petri Nets
42 / 56
Parallelism
BIPM — Lecture 7: Process Modelling & Petri Nets
43 / 56
Parallelism: AND-split
BIPM — Lecture 7: Process Modelling & Petri Nets
44 / 56
Parallelism: AND-join
BIPM — Lecture 7: Process Modelling & Petri Nets
45 / 56
Choice: XOR-split
BIPM — Lecture 7: Process Modelling & Petri Nets
46 / 56
Choice: XOR-join
BIPM — Lecture 7: Process Modelling & Petri Nets
47 / 56
Logic with Petri nets
BIPM — Lecture 7: Process Modelling & Petri Nets
48 / 56
Iteration: 1 or more times
Figure : XOR-join before XOR-split
BIPM — Lecture 7: Process Modelling & Petri Nets
49 / 56
Iteration: 0 or more times
Figure : XOR-join before XOR-split
BIPM — Lecture 7: Process Modelling & Petri Nets
50 / 56
Capacity constraints: feedback loop
Figure : AND-join before AND-split
BIPM — Lecture 7: Process Modelling & Petri Nets
51 / 56
Capacity constraints: mutual exclusion
Figure : AND-join before AND-split
BIPM — Lecture 7: Process Modelling & Petri Nets
52 / 56
Two traffic lights: mutual exclusion
Petri net for
2 traffic lights
BIPM — Lecture 7: Process Modelling & Petri Nets
53 / 56
Capacity constraints: alternating
Figure : AND-join before AND-split
BIPM — Lecture 7: Process Modelling & Petri Nets
54 / 56
Lab session March 26
Finish Assignment 2
Complete relevant empirical experiments
Implement (a small part of) your data mining algorithm on
Algorithmia, and add it to your dashboard
Finish the assignment report
Report any final questions
BIPM — Lecture 7: Process Modelling & Petri Nets
55 / 56
Credits
Lecture based on slides belonging to the course book
W. van der Aalst, Process Mining: Discovery, Conformance and
Enhancement of Business Processes, Springer, 2011.
BIPM — Lecture 7: Process Modelling & Petri Nets
56 / 56