CHAPTER 5. THE METHODS FOR TRANSFORMING BPMN PROCESS INTO H T C PNET
5.2. T RANSFORMATION M ETHOD FOR C ONTROL F LOWS – Method CF
5.2.2. Transformation Rules for Advanced Elements
The advanced elements can be transformed into H PNet modules with Rules 8 to CT 22, respectively. The rules are defined upon the sequence: (1) advanced activity and event, (2) activity involving event and (3) complex control node. In these rules, the direct predecessor and successor of the intermediate actions (activity and event) are set as x and y , respectively. The direct predecessor/successor of end/start event is set as x / y also.
(1) Advanced Activity and Event
During the transformation, when an activity (task or sub-process) n with While / Re peatUntil loop structure is reached, n can be transformed with Rule 8 or 9.
Rule8. If n is a loop task, i.e., n.LT Standard= , n.EvTime Before / After= , and the associated evaluation expression / maximum execution times = BooleanExp /
Maximum , n ’s H PNet module is shown in Figure 5.5 (b)/(c). CT
Rule9. If n is a loop sub-process whose LT , EvTime and evaluation expression / maximum execution times are the same as Rule 8, n ’s H PNet module is TC shown in Figure 5.5 (b)/(c) and each atomic transition named t is replaced Tn with a compound transition representing the sub-process.
During the transformation, when an activity (task or sub-process) n with multi-instance loop structure is reached, n can be transformed with Rule 10 or 11. Let the evaluation result of NumExp associated with n be k , i.e., the number of instances of n is k .
Rule10. If n is a task whose instances are performed sequentially, i.e., n.LT MultiInstance= and n.Order Sequential= , n ’s H PNet module is shown CT in Figure 5.6 (b).
(a) A loop task n.
1'(int, m ax)
(b) The HTCPNets module of While loop task n.
(c) The HCTPNets module of RepeatUntil loop task n.
Figure 5.5 Two different H PNets modules of a task with loop structure. CT
Rule11. If n is a task whose instances are performed in parallel, i.e., n.LT MultiInstance= and n.Order Parallel= :
z When FlowCond None= , n ’s H PNet module is in Figure 5.6 (c). T
z When FlowCond One= , n ’s H PNet module is in Figure 5.6 (c), but TC
transition tTn
[ ]
0,z , place p n,y( )
and arc A t ,p n,y(
Tn( ) )
are replaced with the net shown in Figure 5.6 (d).z When FlowCond All= , n ’s H PNet module is in Figure 5.6 (c) but CT
transition tTn
[ ]
0,z , place p n,y( )
and arc A t ,p n,y(
Tn( ) )
are replaced with the net shown in Figure 5.6 (e).(a) A task n with multi‐instance loop
structure.
(b) The HCTPNets module of task n which is performed sequentially
Var in == (0,1)
Var in == (0,1)
(c) The HCTPNets module of task n which is performed in parallel.
(d) The HCTPNets module of task n which is performed in parallel.
(e) The HCTPNets module of task n which is performed in parallel.
Figure 5.6 Four different H PNets modules of a task with multi-instance loop TC structure.
Rule12. If n is an intermediate event, i.e., n.EC Intermediate= , a transition denoted with t is added into n HNet . i
(a) An none intermediate event.
(b) The HCTPNets module of none intermediate event.
Figure 5.7 The H PNets module of intermediate event. CT
During the transformation, when an event n with time limitation or message receiver/dispatcher is reached, n can be transformed with the following rules.
Rule13. If n is a start/intermediate event and n is timed, i.e., n.ET Time= , and the value of n ’s timer attribute is
[ ]
r ,r1 2 , 0≤ ≤ ≤ , Rule1/Rule12 is r1 r2 z applied respectively. Then, the firing interval of t is changed from n[ ]
0,z to[ ]
r ,r1 2 .Rule14. If n is a start/intermediate event and n is a message receiver, i.e., n.ET Message= and n.InMessage meg= , Rule1/Rule12 is applied respectively.
Then, a place denoted with pmeg is added into the net, generated by
Rule1/Rule12, and arc A p
(
meg,t and n)
A t ,p(
n meg)
are created.14-1. The color domain of place pmeg is C p
( )
meg ={
Meg}
and the token elements of place pmeg are(
Meg ,'read')
and(
Meg ,'unread')
. When there is a token tk with value
(
Meg ,unread)
in pmeg, a message is sent from other participant and not consumed by the participant yet. When there is a token tk with value
(
Meg ,read)
in pmeg, the message sent from other participant is consumed.14-2. The variable domain of transition t contains the variables typed with n
PNetin and Meg only, i.e.,
( ( ) )
(
n) ( ( (
n n) ) ) {
in}
Type Var G t =Type Var p ,t = PNet ,Meg .
The guard expression G t
( )
n is Var in==( )
0 1, ∧Var m==unread.The arc expressions of input arcs, A p ,t
(
n n)
and A p(
meg,tn)
, are Var in and Var m , respectively. The arc expressions of output arcs,(
n ( )n,x)
A t ,p and A t ,p
(
n meg)
, are Var in and 1' read( )
, respectively. t is fired immediately, when there are two tokens with value n
( ( ) )
(
PNet , ,in 1 0 ,@r)
and(
Meg ,unread)
in pn and pmeg , respectively.The H PNet module generated by applying Rule1 and Rule14 on message start TC event n is shown in Figure 5.8 (b).
(b) A HCTPNets module of message start event
Figure 5.8 Two different presentations of message start event.
Rule15. If n is an intermediate/end event and n is a message dispatcher, i.e., n.ET Message= and n.OutMessage meg= , Rule12/Rule2 is applied respectively. Then, a place denoted with pmeg is added into the net generated by
Rule12/Rule2 and the arc A t ,p
(
n meg)
is created.When t is fired, a token with value n
( (
PNet , ,in( )
0 1)
,@r in place)
p( )x ,n is removed and the tokens with value(
Meg ,unread)
and( (
PNet , ,in( )
0 1)
,@r are)
added into pmeg and p( )n ,y , respectively. The H PNet module generated by TC applying Rule12 and Rule15 on intermediate message dispatcher n is shown in Figure 5.9 (b).
(b) A HTCPNets module of message dispatcher
x y
x
Figure 5.9 Two different presentations of intermediate message dispatcher.
(2) Activity Involving Event
During the transformation, when an activity (task or sub-process) n involving an event e is reached, n can be transformed by Rule 16, 17, 18, 19 or 20.
Here, event e is associated with a time limitation or a message receiver/dispatcher. Let n ’s direct successors be y and 1 y . 2 y is connected 2 by a supplement arc.
Rule16. If n is a task and the value of timer attribute of n ’s timing event e is
[ ]
r ,r1 2 , 0≤ ≤ ≤ , r1 r2 z n ’s H PNet module is designed in Figure 5.10 (b). Let TC the time stamp associated with control token be stamp .
(a) Task involving a timing event.
Var in == (0,1) Var in == (0,1)&& stamp > rVar in == (0,1)&& stamp <= r
Var in
(b) A HTCPNets module of a task involving a timing event.
Figure 5.10 Two different presentations of a task involving a timing event.
Rule17. If n is a sub-process and the value of timer attribute of n ’s timing event e is
[ ]
r ,r1 2 , 0≤ ≤ ≤ , n’s r1 r2 z H PNet module is in Figure 5.10 (b) while CT t n is represented with a compound transition.Rule18. If n is a task associated with a message receiver e, n ’s H PNet module CT is in Figure 5.11 (b) where transition t is the body of n . n
(a) Task involving a
message receiver. (b) A HCTPNets module of a task involving a message receiver.
Figure 5.11 Two different presentations of a task involving a message receiver.
Rule19. If n is a sub-process associated with a message receiver e, n ’s H PNet CT module is in Figure 5.12 (b) where the subnet in block is the body of n .
(a) Sub‐process involving a message
receiver.
1'(boolean, ok)
1'(PN etin,(1,0)) 1'(boolean, ok)
bo1'(
eaol
nn,
)ok
(b) A HCTPNets module of a sub‐process involving a message receiver.
Figure 5.12 Two different presentations of a sub-process involving a message receiver.
Rule20. If n is a task and associated with a message dispatcher e, n ’s H PNet CT module is in Figure 5.13 (b).
(a) Task involving a message dispatcher.
1'(Meg, unread) pmeg
Var in == (0,1)
p(n,y) tn[0,z]
p(x,n)
Var in 1'(PNetin,(1,0))
(a) A HTCPNets module of a task involving a message dispatcher.
Figure 5.13Two different presentations of a task involving a message dispatcher.
(3) Complex Control Node
During the transformation, when a complex control node n implemented with advanced join mechanism is reached, n can be transformed by Rule 21 or 22.
Rule21. If complex control node n is implemented with Discriminator or “N out M join” mechanism, n ’s H PNet module is in Figure 5.14 (b). CT
When n is implemented with Discriminator mechanism, variable i used in the module generated is set with 1. Otherwise, i is set with M .
Rule22. If complex control node n is implemented with “Multiple Merge”
mechanism, n ’s H PNet module is in Figure 5.14 (c). TC
y
(a) Branch 1 to m are joined at a
complex control node n.
in
(b) A HTCPNets module of a control node implemented with Discriminator/”N out of M join”.
(c) A HTCPNets module of a control node implemented with “Multiple Merge”.
Figure 5.14 Different presentations of a complex control node implemented with different mechanisms.