Presentation is loading. Please wait.

Presentation is loading. Please wait.

composition of workflows

Similar presentations


Presentation on theme: "composition of workflows"— Presentation transcript:

1 composition of workflows
Dresden Dec.12, 2016 GK Rosi Soundness preserving composition of workflows Theory of Programming Prof. Dr. W. Reisig Wolfgang Reisig

2 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 …

3 Smart Behavior modeling
… using Workflow Nets 1.1 Classes of Workflow Nets 1.2 Sound Workflow Nets

4 1.1 Classes of Workflow Nets
local ~ global ~ open ~

5 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.

6 local WF net: credit based shopping

7 global WF net: Buyer and seller
goods I Def.: global WF 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 each p  N* .

8 stretched WF net N: restaurant
2 1 global WF net: restaurant stretched WF net N: restaurant Def.: global WF 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 each p  N* .

9 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

10 Open WF nets Def.: later

11 inner(N) Lemma: Let N be an open WF net.
Then inner(N) is a global WF net

12 1.2 Sound workflow nets sound! Def.: Let N be a global WF net.
N is sound iff 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)

13 Internet Shopping sound! Def.: Let N be a global WF net.
choose product send order rec. product accept product ib fb return prod. sound! Def.: Let N be a global WF net. N is sound iff 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)

14 not sound Def.: Let N be a global WF net. N is sound iff
choose product send order rec. product accept product ib fb time out return prod. Def.: Let N be a global WF net. N is sound iff 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)

15 because Def.: Let N be a global WF net. N is sound iff
choose product send order rec. product accept product ib fb time out return prod. Def.: Let N be a global WF net. N is sound iff 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)

16 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

17 2.1 The problem of associative comp.
Example: a supply chain composition of business processes RM $ Su $ Ma $ Di $ Cu $ Co no brackets!

18 an analogy: adapter $ $ socket $ adapter $ plug

19 an analogy: adapter $ $ ( ) socket $ adapter $ plug no brackets!

20 a naïve composition operator
(S $ T) $ U a b c a b b c S U = | S $ (T $ U) T a b c U S not associative

21 … summing up On the set of component models, composition should be
total associative

22 2.2 Left and right port On the set of component models,
composition should be total associative

23 A fundamental observation
$ typical left/right ports: start and stop input and output customer and supplier provider and requester 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!

24 left and right port S right port T* right port S* T U left port *T
b c right port T* right port S* T b e d f U b e d f left port *T 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!

25 composition along ports
b c T b e d f U b e d f (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!

26 … is associative! = S T U (S $ T) $ U S $ (T $ U)
b c T b e d f U b e d f (S $ T) $ U = 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!

27 2.3 Index labelled composition

28 in case a* and *b fit perfectly
The two “C” labelled places are matching. The two “D” labelled places are matching.

29 composition a$b a$b B D D F a b A C C E * (a$b) (a$b)*

30 … it is not always that simple
*b b E D C F G B D a A C *a a* The two “C” labelled places are matching. The two “D” labelled places are matching.

31 … it is not always that simple
a$b C1 G B D D F a b A C C E L1 R2 *(a$b) (a$b)*

32 this works nicely: C a b B D G F a b A C C E *a a* *b b*
The two “C” labelled places are matching.

33 … unfortunately a b* *b b E D C F E B D a A C *a a*
The two “C” labelled places are matching. The two “D” labelled places are matching.

34 … unfortunately a$b C1 C2 E B D D F a b A C C E R2 *(a$b) L1 (a$b)*
Two nodes of (a$b)* are labelled alike! You can not avoid this!

35 … what to do here ??? ? a b B D D F C a b A C C E *a a* 1 2 *b b*
Idea: index labelling: n equally labelled nodes in one port are indexed 1, … n . graphical convention: lower < upper. Glue equally labelled and equally indexed nodes.

36 … what to do here ??? a b B D C D F a b A C C E *a a* 1 2 *b b* Idea:
index labelling: n equally labelled nodes in one port are indexed 1, … n . graphical convention: lower < upper. Glue equally labelled and equally indexed nodes.

37 an extreme case a b* *b b A A A A a A 1 2 3 A *a 1 2 a* 1 2 1
all labels alike.

38 an extreme case a b* *b b A 1 A A A a A 1 2 3 A *a 1 2 a* 1 2
all labels alike.

39 an extreme case a$b C1 C2 A A D A a b 2 A A C A R2 *(a$b) L1 1 2
all labels alike.

40 … another extreme case B F D D H a b A E C G C B A D b a G F E H
all labels different. results in

41 The associativity Theorem
Theorem: Index labelled composition is associative.

42 2.4 Composition of global WF nets
index labelled remember: Def.: global WF 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 each p  N* . the left port the right port index labelled

43 a global, sound workflow, N
add a seller choose product send order rec. product accept product ib fb time out return prod. rec. returned prod. handle rec. order send product file record is fs

44 … a reachable state … buyer may want to continue … choose product
send order rec. product accept product ib fb return prod. buyer may want to continue … time out rec. returned prod. handle rec. order send product file record is fs

45 second purchase, N$N choose product send order ib rec. returned prod.
handle return prod. time out accept product fb file record fs

46 second purchase choose product send order ib rec. returned prod.
handle return prod. time out accept product fb file record fs

47 second purchase rec. returned prod. handle return prod. time out
accept product fb file record fs rec. product accept product fb return prod. time out rec. returned prod. handle file record send product rec. order is fs choose product send order ib

48 N$N is a sound WF net, too! N: choose product send order rec. product
accept product ib fb time out return prod. rec. returned prod. handle rec. order send product file record is fs

49 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.

50 2.5 Open WF nets composition
Def.: open WF net N: - set *N of places and transitions, subset of places startN  *N, initial marking: 1 token on each p  startN . set N* of places and transitions, subset of places stopN  *N, final marking: 1 token on each p  stopN . the left port the right port Observation: An open WF net N is a global WF net iff *N = startN and N* = stopN .

51 Example: Client and seller
order receive pay seller obtain collect send subscription product cash subscription product cash

52 … not what we wanted Deadlock!! client seller order receive pay obtain
collect send subscription product cash Deadlock!!

53 Adapting required behaviour
client order receive pay bank subscription product cash seller obtain collect send subscription product cash subscription product cash

54 associativity required!
client order receive pay subscription product cash bank subscription product cash seller obtain collect send subscription product cash

55 More liberal compo- sition

56 Composed business processes

57 Properties Observation. Let N and M be open WF nets.
Then N$M is an open WF net. … no compositional behavior

58 3. The cyclic extension ac
B A D a C B a D B C B A Idea: To construct ac, compose a* with *a just as you compose a* with some *b .

59 remember: Seller and buyer
the Always ready-seller N: N choose product send order rec. product accept product ib fb *N N* time out return prod. Def.: global WF 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 each p  N* . with internal init  M - set M of inner places  M rec. returned prod. handle Observations. Each conventional open WF net is an open WF net with M = ; as internal init . ii. Let N and M be open WF nets with internal init. N$M is an open WF net with internal init. M rec. order send product file record is fs

60 remember: Seller and buyer
the Always ready-seller, Nc Nc N: choose product send order rec. product accept product ib fb *(Nc) (Nc)* time out return prod. Def.: global WF 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 each p  N* . Closure Nc of a  MN Let MN be the “matching” places of N* and *N.  MN rec. returned prod. handle Observation: Let N be a global WF net with internal init. Then Nc is a global workflow net with internal init. MN rec. order send product file record is fs is

61 remember: Soundness Def.: Let N be a global WF net. N is sound iff
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 K > N* is reachable. with internal init, M.  M  M  M Theorem: Let N and M be sound global Wf nets with initial init. i. N$M is sound. ii. Nc is sound.

62 global WF net: restaurant
2 1 N Nc *N ={C1, C2, Wf} *(Nc) ={C1, C2} N* ={e1, e2, Wf} (Nc)* ={e1, e2}

63 4. Include data …

64 data processing open WF nets
x! = x = the juice partner: coin beverage coin x! beverage x order order

65 Distinguishable tokens
x! = x = the tea partner: coin beverage coin x! beverage x order order

66 The McDonald’s vending machine
x = ... coin x! beverage x order

67 summing up: How to use all this …
Start modelling your system by small data processing sound open WF nets; compose them; You get a sound system model for free!

68 composition of workflows
SOAMED Vorlesung 5. Dez. 2016 Soundness preserving composition of workflows do it with global , sound workflow nets! Theory of Programming Prof. Dr. W. Reisig Wolfgang Reisig

69 Soundness preserving composition of workflows
A large computer embedded system or business process is usually composed of interacting components. A component may be organized as a workflow. A workflow is a pattern, describing a set of events, to be executed in a “before-after”-relation, or independent form one another, or alternatively. A large workflow may be composed from smaller ones. A reasonable workflow W is sound: W has a unique initial and a unique terminal state; to every event e of W there exists a sequence of event executions that includes e; W can always reach its terminal state, and upon termination, no “garbage” remains. Soundness of (Petri net models of) workflows is efficiently decidable. We present a most liberal composition operator for workflows that preserves soundness (i.e. composition of two sound workflows is a sound workflow again). This allows to stay in the world of sound workflows during the construction of large workflows and business processes.


Download ppt "composition of workflows"

Similar presentations


Ads by Google