690 likes | 717 Views
Understanding the theory and techniques behind sound workflow nets, component models, and smart composition modeling. Analyzing behavioral steps, interface elements, and communication through composition. Explore associative composition, left and right ports, and index labeling for better workflow design.
E N D
Soundness preserving composition of workflows Dresden Dec.12, 2016GK Rosi Theory of Programming Prof. Dr. W. Reisig Wolfgang Reisig
Background Each large system is made of components (workflows, services, … ) A component • has a behavior • has an interface, • interface is used to communicate with other components A component model • describes behavior as steps, • describes the interface as a set of – whatever – elements • models communication by composition, i.e “glueing” corresponding interface elements of components This talk: • Smart Behavior Modeling • Smart Composition Modeling • The cyclic extension • Include data …
Smart Behavior modeling … using Workflow Nets 1.1 Classes of Workflow Nets 1.2 Sound Workflow Nets
1.1 Classes of Workflow Nets • local ~ • global ~ • open ~
local WF net: A buyer Def.: local WF net: - one start place, p; Initial marking: 1 token on p. - one stop place, q; Final marking: 1 token on q.
global WF net: Buyer and seller goods I Def.: globalWF net N: - set *N of start places, initial marking: 1 token on each p *N . - set N* of stop places, final marking: 1 token on eachp N* .
global WF net: restaurant stretched WF net N: restaurant 1 2 Def.: globalWF net N: - set *N of start places, initial marking: 1 token on each p *N . - set N* of stop places, final marking: 1 token on eachp N* .
Observations let N be global. i. N is local iff |*N| = |N*| = 1 ii. N can easily be made local: Later we see: no good idea upon composition
OpenWFnets Def.: later
inner(N) Lemma: Let N be an open WF net. Theninner(N) is a global WF net
1.2 Sound workflow nets sound! Def.: Let N be a global WF net. N is soundiff • no arc goes out of N* ; • starting from *N, each transition can be enabled; • From each reachable marking M, the marking N* is reachable. • No marking M > N* is reachable. Soundness is efficiently decidable. (v.d. Aalst)
Internet Shopping choose product send order rec. product accept product fb ib return prod. sound! Def.: Let N be a global WF net. N is soundiff • no arc goes out of N* ; • starting from *N, each transition can be enabled; • From each reachable marking M, the marking N* is reachable. • No marking M > N* is reachable. Soundness is efficiently decidable. (v.d. Aalst)
not sound choose product send order rec. product accept product fb ib return prod. Def.: Let N be a global WF net. N is soundiff • no arc goes out of N* ; • starting from *N, each transition can be enabled; • From each reachable marking M, the marking N* is reachable. • No marking M > N* is reachable. Soundness is efficiently decidable. (v.d. Aalst) time out
because choose product send order rec. product accept product fb ib return prod. Def.: Let N be a global WF net. N is soundiff • no arc goes out of N* ; • starting from *N, each transition can be enabled; • From each reachable marking M, the marking N* is reachable. • No marking M > N* is reachable. Soundness is efficiently decidable. (v.d. Aalst) time out
2. Smart Composition Modeling 2.1 The problem of associative composition 2.2 Left and right port 2.3 Index labelling of a port 2.4 Composition of global WF nets 2.5 Composition of open WF nets
2.1 The problem of associative comp. Example: a supply chain composition of business processes RM$ Su$Ma$Di$Cu $Co no brackets!
an analogy: adapter $ $ socket$adapter$plug
an analogy: adapter $ $ ( ) socket$adapter$plug no brackets!
a naïve composition operator T (S$T) $U b a c a b b c S U = | S$ (T $U) T b a c not associative a b b c S U
… summing up On the set of component models, composition should be • total • associative
2.2 Left and right port On the set of component models, composition should be • total • associative
A fundamental observation $ $ typical left/right ports: start and stop input and output customer and supplier provider andrequester producer and consumer buy side and sell side predecessor and successor RM$Su$Ma$Di$C u $Co The interface of a component S is partitioned into a left and a right port *S and S*! Central idea: Exploit this observation!
a left and right port d d f f S b b b T U b b e e c e e right port T* left port *T right port S* The interface of a component S is partitioned into a left and a right port *S and S*! For S$T, compose S* with *T. Central idea: Exploit this observation!
a composition along ports d d f f S b b b U T b b e e c e e (S$T) $U The interface of a component S is partitioned into a left and a right port *S and S*! For S$T, compose S* with *T. Central idea: Exploit this observation!
a … is associative! d d f f S b b b T U b b e e c e e = (S$T) S$ $U (T $U) The interface of a component S is partitioned into a left and a right port *S and S*! For S$T, compose S* with *T. Central idea: Exploit this observation!
in case a*and*b fit perfectly a b D F B D b a C E A C *b b* *a a* The two “C” labelled places are matching. The two “D” labelled places are matching.
composition a$b a$b D F B D b a C E A C (a$b)* * (a$b)
… it is not always that simple b a D F B G D b a C E A C *b a* *a a* The two “C” labelled places are matching. The two “D” labelled places are matching.
… it is not always that simple a$b C1 D F B G D b a C E A C R2 L1 *(a$b) (a$b)*
this works nicely: b a D F B G b a C C E A C *b b* *a a* The two “C” labelled places are matching.
… unfortunately b a D F B D E b a C E A C *b b* *a a* The two “C” labelled places are matching. The two “D” labelled places are matching.
… unfortunately C2 a$b C1 D F B E D b a C E A C R2 L1 *(a$b) (a$b)* You can not avoid this! Two nodes of (a$b)* are labelled alike!
… what to do here ??? b a D F B ? D C b a C E A C *b b* 2 *a a* Idea: index labelling: n equally labelled nodes in one port are indexed 1, … n . graphical convention: lower < upper. 1 Glue equally labelled and equally indexed nodes.
… what to do here ??? b a D F B D C b a C E A C *b b* 2 *a a* Idea: index labelling: n equally labelled nodes in one port are indexed 1, … n . graphical convention: lower < upper. 1 Glue equally labelled and equally indexed nodes.
an extreme case b a A A A A b a 3 A A A A *b b* 2 2 2 *a a* 1 1 1 1 all labels alike.
an extreme case b a A A A A b a 3 A A A A *b b* 2 2 2 *a a* 1 1 1 1 all labels alike.
an extreme case C2 a$b C1 A A A D b a 2 A A A C R2 2 L1 *(a$b) (a$b)* 1 1 all labels alike.
… another extreme case F H B D D b a E G A C b a H F all labels different. E G results in B D D A C
The associativity Theorem Theorem: Index labelledcompositionisassociative.
2.4 Composition of global WF nets index labelled remember: Def.: globalWF net N: - set *N of start places, initial marking: 1 token on each p *N . - set N* of stop places, final marking: 1 token on eachp N* . the left port the right port index labelled
add a seller a global, sound workflow, N choose product send order rec. product accept product fb ib return prod. time out rec. returned prod. handle file record send product rec. order fs is
… a reachable state … choose product send order rec. product accept product fb ib return prod. buyer may want to continue … time out rec. returned prod. handle file record send product rec. order fs is
second purchase, N$N choose product send order accept product fb ib return prod. time out rec. returned prod. handle file record fs
second purchase choose product send order accept product fb ib return prod. time out rec. returned prod. handle file record fs
second purchase choose product send order rec. product accept product accept product fb fb ib return prod. return prod. time out time out rec. returned prod. rec. returned prod. handle handle file record file record send product rec. order fs fs is
N$N is a sound WF net, too! N: choose product send order rec. product accept product fb ib return prod. time out rec. returned prod. handle file record send product rec. order fs is
Properties Let N and M be global WF nets. Observation: N$M is a global WF net. Theorem 1.N$M is sound iff both N and M are sound.
2.5 Open WF nets composition Def.: openWF net N: - set *N of places and transitions, subsetof places startN *N, initial marking: 1 token on each p startN. • set N* of places and transitions, subsetof places stopN *N, final marking: 1 token on eachp stopN. the left port the right port Observation: An open WF net N is a global WF net iff *N = startNand N* = stopN.