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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

9.4 Activity Rules<br />

TaskTransition(task) = [if Enabled(in) then]<br />

if ReadyForExec(task) then let t = firingToken(in)<br />

[Consume(t, in)]<br />

let i = select InputSets (SomeAvail(inputSets(task)))<br />

Exec(task, inputs(i))<br />

currInput(task) := i<br />

[seq<br />

if Completed(task, t) then<br />

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

[Produce(taskToken(task, t), out)]]<br />

where<br />

ProduceOutput(outputSets(t), i) =<br />

choose o ∈ outputSets(t) with Defined(outputs(o)) <strong>and</strong> IORules(t)(o, i) = true<br />

Emit(outputs(o))<br />

ReadyForExec(t) ⎧<br />

=<br />

⎨ SomeAvail(inputSets(t))<br />

if type(t) ∈ {Service, User}<br />

Arrived(mssg(t)) [<strong>and</strong> Instantiate(t)] if type(t) = Receive<br />

⎩<br />

true<br />

if type(t) ∈ {Send, Script, Manual, Reference}<br />

Exec(t, ⎧ i) =<br />

Send(inMssg(t))<br />

if type(t) ∈ {Service, User}<br />

Receive(mssg(t))<br />

if type(t) = Receive<br />

⎪⎨<br />

Send(mssg(t))<br />

if type(t) ∈ {Send}<br />

Call(performer(action(t, i)), action(t, i)) if type(t) ∈ {Script, Manual}<br />

Exec(taskRef (t), i)<br />

if type(t) = Reference<br />

⎪⎩<br />

skip<br />

if type(t) = None<br />

LoopTransition(node) = [if Enabled(in) then]<br />

let t = firingToken(in)<br />

LoopEntry(node, t)<br />

seq<br />

if testTime(node) = before then<br />

while loopCond(node, t) LoopBody(node, t)<br />

if testTime(node) = after then<br />

until loopCond(node, t) LoopBody(node, t)<br />

[seq LoopExit(node, t)]<br />

where<br />

LoopBody(n, t) =<br />

loopCounter(node, t) := loopCounter(node, t) + 1<br />

iterBody(node, loopToken(t, loopCounter(node, t) + 1)[, inputs(currInput(node))])<br />

LoopEntry(n, t) =<br />

loopCounter(n, t) := 0<br />

[Consume(t, in)]<br />

[currInput(n) := select InputSets (SomeAvail(inputSets(n)))]<br />

LoopExit(n, t) =<br />

if Completed(n, t) then<br />

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

[Produce(loopExitToken(t, loopCounter(n, t)), out)]<br />

Completed(n, t) = LoopCompleted(n, t) if n ∈ Loop(t)<br />

36

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

Saved successfully!

Ooh no, something went wrong!