2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

29
© 2009 IBM Corporation Petri-Nets an introduction for Business Process Management (BPM) Mike Marin 29 April 2010

description

“Petri-Nets an introduction for Business Process Management (BPM)”. Introductory presentation on Petri-Nets for Math Majors (BPM is used as an example application), presented by Mike Marin in 2010.

Transcript of 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

Page 1: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

© 2009 IBM Corporation

Petri-Nets an introduction for Business Process Management (BPM)

Mike Marin 29 April 2010

Page 2: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

2 © 2010 IBM Corporation

Petri Nets in Business Process Management

Abstract: Petri nets are directed bipartite graphs that can be used as a modeling language for discrete distributed systems. Petri nets were introduced by Carl Adam Petri in 1939, and have been used as the theoretical foundation for Workflow and Business Process Management (BPM) systems. This presentation will be an introduction to Petri nets, workflow nets, and their use in the modeling of business processes.

Bio: Mike Marin is an IBM Distinguished Engineer in the Software Group and the chief architect of the IBM FileNet P8 Business Process Management technology. Marin is also an ACM Distinguished Engineer with a MSCS in Artificial Intelligence. He has more than twenty years of experience designing and developing system software. The last Fifteen years, he has been developing business process management (BPM), workflow products, and participating in standard organizations including WfMC, OMG, and OASIS working on BPM and workflow standards. He has edited and contributed to the definition several workflow and BPM standards; is a Fellow of the WfMC and has received the WfMC Excellence Award for his technical contributions to the WfMC standardization efforts.

Page 3: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

3 © 2010 IBM Corporation

Petri Nets

Page 4: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

4 © 2010 IBM Corporation

Petri Nets

■ Useful to model systems with concurrency and asynchronous behavior– Able to model complex processes

■ Visual tool– Based on bipartite graphs

■ Mathematical tool– Useful to analyze the modeled system

■ Used by industry to analyze multiple type of systems– Because they can be simulated, tested, and analyzed

■ Large variety of Petri Nets– High level Petri Nets, colored Petri Nets, stochastic Petri Nets, workflow Nets,

etc.

Page 5: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

5 © 2010 IBM Corporation

History

■ Invented by Carl Adam Petri– Claims to have been invented “in August 1939 at the age of 13 for the purpose of

describing chemical processes” (Wikipedia & Scholarpedia)

– Ph.D. Dissertation: ”Kommunikation mit Automaten.”, Institut für Instrumentelle Mathematik, Bonn, 1962

■ Nothing to do with Petri dishes

Picture source: www.scholarpedia.org/article/Petri_net

Page 6: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

6 © 2010 IBM Corporation

Applications

■ Industrial control systems

■ Communication protocols

■ Performance evaluation

■ Distributed systems

■ Parallel and concurrent programs

■ Multiprocessor memory systems

■ Discreet event systems

■ Dataflow systems

■ Fault-tolerant systems

■ Workflow systems

■ Business Process Management (BPM) graphs

■ Etc.Source: Gabriel Eirea 2002 + mods

Page 7: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

7 © 2010 IBM Corporation

Informal definition

■ Directed, bipartite graph

■ Nodes– Two types

• Places {p1, … , p

n} (represented by circles)

• Transitions {t1, … , t

n} (represented by boxes or bars)

■ Arcs (represented by arrows)– Directed– Connect nodes of different types– Weighted (by default 1)

• w(p1,t

1) = weight from place p

1 to transition t

1

■ Tokens (represented by dots inside a place)– Places have zero or more tokens

■ Markings– Describe the placement of tokens in the graph at a given moment on time

t1

2

P1 P2

Page 8: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

8 © 2010 IBM Corporation

Behavior (firing rule)

■ Transition t is enabled if each input place p has at least w(p,t) tokens

■ An enabled transition may or may not fire

■ A firing on an enabled transition t removes w(pi,t) from each input place p

i, and adds

w(t,po) to each output place p

o

■ Firing is an atomic operation, resulting in a new marking

P1

t1

2

2

P2

P3

P1

t1

2

2

P2

P3

Fires to

Graph source: Gabriel Eirea 2002 + mods

Page 9: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

9 © 2010 IBM Corporation

Non-determinism

■ Petri net execution is non-deterministic

■ Multiple transitions can be enabled at the same time– Any one of which can fire– None are required to fire– They may fire at will (between time zero and infinite)

• They may not fire at all

Page 10: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

10 © 2010 IBM Corporation

Interpretation of places and transitions

Input places Transitions Output places input data computations output data required resources task freed resources input signal signal processing output signal buffer/registers processor buffer/register chemical substances chemical reactions new chemical substances physical object transport geographical location state event state etc. etc. etc.

Source: neo.dmcs.p.lodz.pl/oom/petri_nets.pdf + mods

Page 11: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

11 © 2010 IBM Corporation

Example – Elevator

P1

Ground floor

P2

P3

P4

1 st floor

2nd floor

3rd floor

t1

t2

t3 t4

t5

t6

Source: www.informatik.uni-hamburg.de/TGI/PetriNets/introductions/aalst/ + mods

P1

P2

t1 t2

Version 1 – token represent the elevator

(marking for ground floor)

Version 2 – tokens represent the number of movements the elevator can make up or down

in a certain state(marking for ground floor)

DownUp

Page 12: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

12 © 2010 IBM Corporation

Example - Dining Philosophers

Five philosophers alternatively think and eating

Chopsticks: p0, p2, p4, p6, p8

Philosophers eating: p10, p11, p12, p13, p14

Philosophers thinking/meditating: p1, p3, p5, p7, p9

Source: Paul Fishwick, 2005

Page 13: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

13 © 2010 IBM Corporation

Formal definition

Definition 1 (Petri net): A Petri net is a 5-tuple, PN = (P, T, F, W, M0)

where

A Petri net structure N = (P, T, F, W) without initial marking is denoted by N

A Preti net with an initial marking is denoted as (N, M0)

P {p1, p2,⋯, pn}isa finite setofplaces ,T {t1, t2,⋯, tn}isa finite setoftransitions ,F⊆P×T ∪T×Pis a setofarcs ,W:F{1,2,3,⋯}is a weightfunction ,M0 :P{0, 1,2,⋯}isan initialmarking ,P∩T=∅∧P∪T≠∅.

Page 14: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

© 2010 IBM Corporation

Behavioral properties (1) Properties that depend on the initial marking

Reachability Mn is reachable from M0 if exists a sequence of firings that transform

M0 into Mn reachability is decidable, but exponential

Boundedness a PN is bounded if the number of tokens in each place doesn’t exceed a

finite number k for any marking reachable from M0 a PN is safe if it is 1-bounded

Source: Gabriel Eirea 2002 + mods

Page 15: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

© 2010 IBM Corporation

Behavioral properties (2) Liveness

a PN is live if, no matter what marking has been reached, it is possible to fire any transition with an appropriate firing sequence

equivalent to deadlock-free strong property, different levels of liveness are defined (L0=dead, L1,

L2, L3 and L4=live)

Reversibility a PN is reversible if, for each marking M reachable from M

0, M

0 is

reachable from M relaxed condition: a marking M’ is a home state if, for each marking M

reachable from M0, M’ is reachable from M

Source: Gabriel Eirea 2002 + mods

Page 16: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

© 2010 IBM Corporation

Behavioral properties (3) Coverability

a marking is coverable if exists M’ reachable from M0 s.t. M’(p)>=M(p)

for all places p

Persistence a PN is persistent if, for any two enabled transitions, the firing of one

of them will not disable the other then, once a transition is enabled, it remains enabled until it’s fired all marked graphs are persistent a safe persistent PN can be transformed into a marked graph

Source: Gabriel Eirea 2002 + mods

Page 17: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

© 2010 IBM Corporation

Behavioral properties (4) Synchronic distance

maximum difference of times two transitions are fired for any firing sequence

well defined metric for condition/event nets and marked graphs

Fairness bounded-fairness: the number of times one transition can fire while the

other is not firing is bounded unconditional(global)-fairness: every transition appears infinitely often

in a firing sequence

)()(max 2112 ttd σσσ

−=

Source: Gabriel Eirea 2002 + mods

Page 18: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

© 2010 IBM Corporation

Analysis methods (1) Coverability tree

tree representation of all possible markings• root = M0• nodes = markings reachable from M0• arcs = transition firings

if net is unbounded, then tree is kept finite by introducing the symbol ω Properties• a PN is bounded iff ω doesn’t appear in any node• a PN is safe iff only 0’s and 1’s appear in nodes• a transition is dead iff it doesn’t appear in any arc• if M is reachable form M0, then exists a node M’ that covers M

Source: Gabriel Eirea 2002 + mods

Page 19: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

© 2010 IBM Corporation

Analysis methods (2) Incidence matrix

n transitions, m places, A is n x m aij = aij

+ - aij-

aij is the number of tokens changed in place j when transition i fires once State equation

Mk = Mk-1 + ATuk

uk=ei unit vector indicating transition i fires

Source: Gabriel Eirea 2002 + mods

Page 20: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

20 © 2010 IBM Corporation

Business Process Management (BPM)

Page 21: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

© 2010 IBM Corporation

Business Process Management (BPM) technology

■ Targeted to a team or line of business– Examples

• Design review• Loan origination

■ Designed to implement a business process– Process improvement

■ Developed using a BPM system– User Interface design– Define how work flow between users and applications– Define how to monitor key business metrics– May still require some programming

Page 22: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

© 2010 IBM Corporation

Frederick Taylor’s “Scientific Management” theoryDivision of labourManagerial control of the workplaceCost accounting based on systematic time-and-motion study

1st Wave: Taylorism 2nd Wave: Business Process Reengineering

Processes manually re-engineered (typically a one time event)Processes implemented via ERP softwareBusiness & process logic hard-codedLed to EAI (application to application focused)

3rd Wave: Business Process Management (BPM)

Facilitating the ability to changeManage and optimize business processes Perceived as potential next “big thing” in consulting

“The ability to change is far more prized than the ability to

create in the first place.”Business Process Management — The Third Wave

Howard Smith & Peter Fingar

Source: David Knight

Evolution of Process Technology

Page 23: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

23 © 2010 IBM Corporation

BPM or Workflow model

■ Defined using a directed graph using multiple icons as nodes

■ Executing the model means moving a package of data through the nodes– similar to a token in a Petri net

■ Order processing example– Accepted or rejected are alternatives– Ship order and send invoice are done in parallel– Send invoice, make payment, accept payment are done in series

Page 24: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

24 © 2010 IBM Corporation

Modeling business processes requires

■ Sequential business activities

■ Parallel business activities– Split (AND-split)– Join (AND-join)

■ Branching (or alternative paths)– Branch (XOR-split)– Rendezvous (XOR-join)

■ Iteration

Activity1 Activity2

Page 25: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

25 © 2010 IBM Corporation

Workflow nets definition

Definition 2 (Wf-net): A Petri net structure N = (P, T, F, W) is a Wf-net iff (i) The weight function w(p,t) = w(t,p) = 1 for all p and t (ii) N is a connected graph (ii) N has two special places i and o,

where i is the start place, and o is the last place

Page 26: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

26 © 2010 IBM Corporation

Modeling is just one aspect of BPM

But, it is the base for all the other aspects...

All based on graph and Petri Net theory...

Page 27: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

© 2010 IBM Corporation

Page 28: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

© 2010 IBM Corporation

References

■ Murata, Tadao. Petri Nets: Properties, Analysis and Applications. Proceedings of the IEEE, 77(4):541-580,. April 1989.

■ Van der Aalst, W.M.P. The Application of Petri Nets to Workflow Management. . The Journal of Circuits, Systems and Computers, 8(1):21-66, 1998.

■ IBM Academic Initiative– http://www.ibm.com/university

■ IBM Students Portal– http://www.ibm.com/university/students

■ BPM Product Sample– http://www.ibm.com/software/info/bpm

Page 29: 2010 04-29 mm (carson, california - csu-dh) petri-nets introduction

29 © 2010 IBM Corporation