AnsweredAssumed Answered

Exclusive join of forked parallel gateway executions

Question asked by gergelydombi on Mar 3, 2011
Latest reply on Mar 16, 2011 by bojiang

I want to implement the following behaviour:

        |—– TASK APPROVE ——|
TASK 1 -+                         +———- END
        |——TASK CANCEL ——-|
TASK APPROVE is a human task dedicated to the actor group APPROVER
TASK CANCEL is a human task dedicated to a different actor

There is a parallel gateway between these tasks and the initial TASK 1 which forks the
process into two executions.

There is another parallel gateway that joins these executions.

Basically I want to continue from this gateway whenever the FIRST token arrives
(either from the CANCEL or the APPROVE path).

I could not find built in BPMN2.0 construct for this.

My ideas:

1) Implement a boundary event attached to TASK APPROVE to catch a terminateEvent from the TASK CANCEL path (it seems like activiti currently not supports only timer and error based boundary)
Is it at all possible to throw an error event to influence control flow? At least it does not sounds like a good flow design. Or is it consiedred the way to go in bpmn?

2) Implement a TaskListener in TASK CANCEL to programmatically complete() the TASK APPROVE
with a special transition that represent the cancellation

Does someone have any more idea on this?