Page 204 -
P. 204
6 Declarative Workflow 195
Consider, for example, two instances ci 1 D .hpickup; delivery; billi; cm LT TL /
and ci 2 D .hpickup; bill; deliveryi; cm LT TL / of the model cm LT TL shown in Fig.
6.9 on page 188. Figure 6.14 shows that ci 1 is satisfied by replaying their traces on
the model automaton.
Assume now that we attempt to dynamically change the cm LT TL model in both
instances by removing the pickup task and the 1..* constraint from task deliv-
ery,removing the precedence constraint, and adding a new precedence constraint
between tasks delivery and bill. The new model and its automaton are shown in
Fig. 6.15.
Figure 6.16 shows that this dynamic change involving is successful for ci 1 and
not successful for ci 2 . This figure shows how the instance trace is “replayed” on
the automaton. On the one hand, the trace of instance ci 1 can be replayed on the
new automaton and, although the instance is temporarily violated, thisisa valid
dynamic change. On the other hand, the trace of instance ci 2 cannot be “replayed”
on the automaton because it is not possible to execute task bill from the state S 0 ,
that is, this change would violate the instance. Therefore, the dynamic change for
instance ci 2 is not possible.
Note that, even though the task pickup is removed from the model after it was
executed (the instance trace contains task pickup), the dynamic change for instance
ci 1 is successful. This is due to the property that a trace that satisfies a model can
contain tasks that are not in the model. The only consequence of removing task
pickup from the model is the fact that it will not be possible to execute this task
again in the future.
pickup delivery pickup bill delivery
S0 S1 S4 S0 S1 S3 S5
temporarily temporarily temporarily temporarily temporarily temporarily satisfied
violated violated violated violated violated violated
(a) ci 1 D .hpickup; deliveryi; cm LT TL / (b) ci 2 D .hpickup; bill; deliveryi; cm LT TL /
Fig. 6.14 Replaying traces of two instances of model cm LT TL shown in Fig. 6.9 on page 188 on
the model automaton
!bill & !delivery !bill –
1..*
precedence
delivery bill delivery bill
S0 S1 S2
(a) The new model
(b) Automaton for the new model
Fig. 6.15 Applying a dynamic change to the model cm LT TL shown in Fig. 6.9 on page 188