业务过程自动化part1

introduction

业务过程自动化

Petri nets

wiki百科

Petri网是1960年代由卡尔·亚当·佩特里发明的,适合于描述异步的、并发的计算机系统模型。Petri网既有严格的数学表述方式,也有直观的图形表达方式。由于Petri网能表达并发的事件,被认为是自动化理论的一种。研究领域趋向认为Petri网是所有流程定义语言之母。

  • Based on a few simple concepts, yet expressive
  • Many analysis techniques exist
  • Many extensions and variants have been defined over the years

Definition

P ~ places & T ~ transitions
Petri net :N ~ (P, T, F)
F ⊆ (P x T ∪ T x P) is the flow relation
p • = {t ∈ T | (p, t) ∈ F}, • p =

  • Places can be input/output of transitions
  • Places represent states, transitions represent state changes
  • Places are represented by circles, transitions by thick bars

Marking
Markings assign tokens to places; they represent a state of the system.
M ≥ M′ iff for all p in P: M(p) ≥ M′(p)

  • In a marking, any enabled transition may fire, in which case a token is
    removed from each of its input places and a token is produced for each of its output places.

reachability graph

Reachability graphs provide an important means of determining a number of properties of a Petri net

properties

  • A Petri net N with initial marking M0 is live iff for every reachable marking M and every transition t there exists a marking M’ reachable from M which enables t.
  • A Petri net N with initial marking M0 is deadlock free iff every reachable marking enables some transition.
  • A Petri net N with initial marking M0 is k-bounded iff for every reachable marking M, M(p) <= k (k is the minimal number for which this holds). A 1-bounded net is called safe. A net is bounded if a natural number k can be found such that the net is k-bounded.
  • A Petri net N is strongly connected iff for every pair of nodes x and y there is a path from x to y and vice versa.

Free Choice Petri nets

Free Choice Petri nets are a subclass of Petri nets with a “nice” tradeoff between expressiveness and analyzability.

  • In a Free Choice Petri net, every pair of transitions either share all their input places, or they share none.

Evaluation Strategies

Standard: true token propagation. Receipt of such a token implies that the corresponding activity needs to be executed.
Safe: almost the same as standard, except new instances of an already executing activity will not be created
Synchronizing: true/false token propagation. When a true token is received the corresponding activity is executed, while if a false token is received it is skipped. Tokens needs to be received from all incoming branches before tokens can be passed on.

Activities

A description of a piece of work that forms a logical step within a process.

  • or-split: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

  • xor-split :only one of the outgoing branches can be chosen

  • and-split :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

  • and-join:A point in the workflow where two or more parallel executing activities converge into a single common thread of control

  • xor-join: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

unstructured and structured workflows

  • a(b+c) ≠ ab + ac
  • parallelism

There are arbitrary well-behaved workflow models that cannot be modelled as structured
workflow models.


WF-nets

a particular subclass of Petri nets

Definition:
A Petri net PN = (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.

benefits:

– Petri nets are formally defined;
– Petri nets support the notion of being “in between” performing tasks through the notion of place;
– Petri nets have associated analysis techniques

Soundness

Option to Complete Given an initial marking i, from every marking M reachable
from i, i →* M, a marking M’ can be reached that covers o, i.e. M →* M’ and M ≥ o.
• In practical terms this means that the net is free of deadlock and infinite loops.
Proper Completion Any marking M reachable from i, M →* i, that marks output
place o, M ≥ o, marks no other place and only has one token in o, i.e. M = o.
• When the workflow terminates no other tasks are still running and termination
is signalled only once.
No Dead Tasks For every transition t, a marking M reachable from i, i →* M can
be found that enables t.
• The workflow does not contain any superfluous parts that can never be activated.

it was shown that soundness for a WF-net could be determined in terms of liveness and
boundedness.


Reset nets

Reset nets extend Petri nets with a special type of arc, the reset arc.
a reset arc does not impose a precondition on firing, and empties the place when the transition fires.


posted @ 2014-08-25 02:48  letitiaxx  阅读(197)  评论(0)    收藏  举报