07.03.2014 Views

BPMN and Beyond Business process modelling notation, workflow ...

BPMN and Beyond Business process modelling notation, workflow ...

BPMN and Beyond Business process modelling notation, workflow ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ComplMultInstExit has to keep track of whether the initially empty set of those activity<br />

instances, which have AlreadyCompleted <strong>and</strong> have passed their continuation tokens to the outgoing<br />

arc, has reached the prescribed number tokenNo(complexMiFlowCond) of elements. If yes, the<br />

remaining instances upon their completion are prevented from passing further tokens outside the<br />

multiple instance activity. If not, each time an instance appears to be in NewCompleted we once<br />

more Produce a token on the outgoing arc out—if the TokenTime(complexMiFlowCond) condition<br />

allows us to do so, in which case we also insert the instance into the set AlreadyCompleted.<br />

Since the context apparently is distributed <strong>and</strong> since the st<strong>and</strong>ard document contains no constraint<br />

on TokenTime(complexMiFlowCond), at each moment more than one instance may show up in<br />

NewCompleted. 32 Therefore we use a selection function select NewCompleted to choose an element<br />

from the set NewCompleted 33 of multiple instances that have Completed but not yet produced<br />

their continuation token. 34 In the following definition n is supposed to be a multiple instance activity<br />

node with parallel miOrdering. The st<strong>and</strong>ard document leaves it open whether output (if<br />

any) is produced either after each instance has completed or only at the end of the entire multiple<br />

instance activity, so that in our definition we write the corresponding updates in square brackets<br />

to indicate that they may be optional.<br />

ComplMultInstExit(n, t) = // for miOrdering(n) = Parallel<br />

AlreadyCompleted := ∅ // initially no instance is completed<br />

seq<br />

while AlreadyCompleted ≠ {i | i ≤ miNumber(n)} do<br />

if NewCompleted(n, t) ≠ ∅ then<br />

if | AlreadyCompleted |< tokenNo(complexMiFlowCond)<br />

then<br />

if TokenTime(complexMiFlowCond) then<br />

let i 0 = select NewCompleted in<br />

Produce(miExitToken(t, i 0 ), out)<br />

Insert(i 0 , AlreadyCompleted)<br />

[ProduceOutput(outputSets(n), currInput(n))]<br />

else forall i ∈ NewCompleted(n, t) Insert(i, AlreadyCompleted)<br />

where<br />

NewCompleted(n, t) =<br />

{i ≤ miNumber(n) | Completed(iterBody(n, miToken(t, i)[. . .])) <strong>and</strong> i ∉ AlreadyCompleted}<br />

The EveryMultInstExit machine is an instance of ComplMultInstExit where tokenNo<br />

is the number (read: cardinality of the set) of all to-be-considered activity instances <strong>and</strong> the<br />

TokenTime is any time.<br />

EveryMultInstExit(n, t) = ComplMultInstExit(n, t)<br />

where<br />

tokenNo(complexMiFlowCond) =| {i | i ≤ miNumber(n)} |<br />

TokenTime(complexMiFlowCond) = true<br />

32 The description of the case miFlowCond = One in the st<strong>and</strong>ard document is ambiguous: the wording<br />

after only one of the activity instances has completed seems to implicitly assume that at each moment<br />

at most one activity instance can complete its action. It is unclear whether this is really meant <strong>and</strong> if<br />

yes, how it can be achieved in a general distributed context.<br />

33 In ASM terminology this is a derived set, since its definition is fixed <strong>and</strong> given in terms of other dynamic<br />

locations, here Completed <strong>and</strong> AlreadyCompleted.<br />

34 If one prefers not to describe any selection mechanism here, one could instead use the forall construct<br />

as done in the else branch. This creates however the problem that it would not be impossible for<br />

more than tokenNo(complexMiFlowCond) many <strong>process</strong> instances to complete simultaneously so that a<br />

more sophisticated mechanism must be provided to limit the number of those ones that are allowed to<br />

Produce a token on the outgoing arc.<br />

28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!