1 / 33

工作流技术

This overview explores Petri Net as an example of workflow model, its analysis techniques, practical use, and firing rules.

heal
Download Presentation

工作流技术

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 工作流技术 Petri Net – as an example of workflow model

  2. Outline • Petri Net – as an example of workflow model Workflow Technologies

  3. Petri nets • The classical Petri net was invented by Carl Adam Petri in 1962. • A lot of research has been conducted (>10.000 publications). • Until 1985 it was mainly used by theoreticians.

  4. Petri Net • Petri网模型一个很重要的特点在于它提供了丰富的系统分析技术,这些技术可以用来分析模型的各种特性,如有界性、活性、不变量等;也可以用来计算模型的各种性能指标,如响应时间、等待时间、占有率等 • 这些分析技术同样也为基于Petri网的工作流模型提供了强有力的分析手段(方法及工具的支持) Workflow Technologies

  5. High-levelPetri nets • Since the 80-ties the practical use is increasing because of the introduction of high-level Petri nets and the availability of many tools. • High-level Petri nets are Petri nets extended with • color (for the modeling of attributes) • time (for performance analysis) • others

  6. The classical Petri net model A Petri net is a network composed of places ( ) and transitions ( ). t2 p2 t1 p1 p4 t3 p3 Connections are directed and between a place and a transition. Tokens ( ) are the dynamic objects. The state of a Petri net is determined by the distribution of tokens over the places.

  7. The classical Petri net model Transition t1 has three input places (p1, p2 and p3) and two output places (p3 and p4). Place p3 is both an input and an output place of t1. p1 p4 t1 p2 p3

  8. t1 t2 Enabling condition Transitions are the activecomponents and places and tokens are passive. A transition is enabled if each of the input places contains tokens. Transition t1 is not enabled, transition t2 is enabled.

  9. t2 t2 Firing An enabled transition may fire. Firing corresponds to consuming tokens from the input places and producing tokens for the output places. Firing is atomic.

  10. Example

  11. Non-determinism Two transitions fight for the same token: conflict. Even if there are two tokens, there is still a conflict. t1 t2

  12. Modeling States of a process are modeled by tokens in places and state transitions leading from one state to another are modeled by transitions. • Tokens represent objects (humans, goods, machines), information, conditions or states of objects. • Places represent buffers, channels, geographical locations, conditions or states. • Transitions represent events, transformations or transportations.

  13. red yr yellow rg gy green Example: Traffic light

  14. red1 red2 yr1 yr2 yellow1 yellow2 rg1 rg2 gy1 gy2 green1 green2 Two traffic lights

  15. red1 red2 safe yr1 yr2 yellow1 yellow2 rg1 rg2 gy1 gy2 green1 green2 Two safe traffic lights

  16. Two safe and fair traffic lights red1 red2 safe2 yr1 yr2 yellow1 yellow2 rg1 rg2 gy1 gy2 safe1 green1 green2

  17. Example: life-cycle of a person child puberty marriage bachelor married divorce death dead

  18. Some definitions • current stateThe configuration of tokens over the places. • reachable stateA state reachable form the current state by firing a sequence of enabled transitions. • dead stateA state where no transition is enabled.

  19. Definition • 定义 [Petri网] 一个Petri网表示为一个三元组(S, T, F) 其中: • S={s1, s2, ∙∙∙, sm}为库所集合,其中每个库所p表示状态或条件; • T={t1, t2, ∙∙∙, tn}为变迁集合,其中每个变迁t表示活动或事件; • ST=(集合S和集合T不相交); • ST(集合S和集合T不同时为空,网非空);, • F(ST)(TS)为连接库所和变迁的有向弧,表示库所与变迁之间的控制依赖关系;流关系仅存在于S与T的元素之间。 Workflow Technologies

  20. Workflow Net • A Petri net that models the control-flow dimension of a workflow is called a workflow net(WF-net) • Definition of WF-net • A Petri net PN = (S,T;F) • There is one source place i  S such that ·i= • There is one sink place o  S such that o·= • Every node x ST is on a path from i to o Workflow Technologies

  21. Firing rule • A transition t is said to be enabled iff each input place p of t contains at least one token • An enabled transition may fire Workflow Technologies

  22. Soundness • A WF-net is sound if and only if • For each token put in the source place(or start place), one( and only one) token eventually appears in the sink place( or end place) • When the token appears in the end place, all the other places are empty • For each transition(task), it is possible move from the initial state to a state in which that the transition is enabled Workflow Technologies

  23. Sequential routing "First A then B" A B

  24. Parallel routing "A and B at the same time or in any order" AND-split AND-join A B

  25. Choice (1) "A or B" Overkill ?! OR-split OR-join A B

  26. Choice (2) Implicit choice: it depends on the "eagerness" of A and B! OR-join OR-split A B

  27. Choice (3) Choice is explicit and may be based on logistic attributes! • We use high-level Petri nets: • tokens have values: case variables • transitions determine the number of tokens produced: explicit OR-split OR-split OR-join A B

  28. Syntactic sugaring AND-join AND-split OR-join Explicit OR-split

  29. Iteration B may be executed several times. B C A

  30. Typical Workflow Process Errors • Dead tasks which can never be carried out • Dead lock • Jamming a case before it reaches the “end” AND-Join AND-Join AND-Split OR-Split Workflow Technologies

  31. Typical Workflow Process Errors • Livelock • an endless cycle • Activities still take place after the condition “end” is reached • Tokens remain in the process definition after the case has been completed Workflow Technologies

  32. Mapping a process definition onto Petri nets condition task case subprocess case variables

  33. Reference • Wil van der Aalst and Kees van Hee , Workflow Management-Models, Methods, and Systems, The MIT Press Workflow Technologies

More Related