Camunda executing execution listeners based on the number of outbound sequence flows

633 views
Skip to first unread message

John D. Ament

unread,
Dec 19, 2014, 7:37:15 AM12/19/14
to camunda-...@googlegroups.com
Hi,

I have a start event in a bpmn file w/ an execution listener tied to the end event of the start event.

I'm seeing that the execution listener is invoked based on the number of outbound sequence flows.  So if I have one outbound, it executes once.  If I have 3, it executes three times.

I didn't think this would be the case.  Should it be the case?

John

John D. Ament

unread,
Dec 19, 2014, 8:05:21 AM12/19/14
to camunda-...@googlegroups.com

BTW this is on camunda 7.2.0.

--
You received this message because you are subscribed to a topic in the Google Groups "camunda BPM users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/camunda-bpm-users/npAK6K7VZRE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/2a630db1-0634-4448-8fb3-ed715cb92009%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Meyer

unread,
Dec 19, 2014, 11:00:48 AM12/19/14
to camunda-...@googlegroups.com
Hi John,

yes, this is expected behavior. If it is inconvenient for your usecase, you would have to work with a Gateway after the start event.

Regards,
Daniel

John D. Ament

unread,
Dec 19, 2014, 12:46:21 PM12/19/14
to camunda-...@googlegroups.com
Ah ha.  So you're expecting a gateway before anytime there's multiple user tasks?  I should end up seeing this behavior them on user tasks as well, right?

John D. Ament

unread,
Dec 19, 2014, 1:15:55 PM12/19/14
to camunda-...@googlegroups.com
Also, would this be an incluisve or an exclusive gateway?

John

webcyberrob

unread,
Dec 19, 2014, 6:07:07 PM12/19/14
to camunda-...@googlegroups.com
Hi John,

from your description, I would suggest that the gateway you want is a parallel fork (+). Use an inclusive or exclusive gateway if your flows have conditions.  In addition, check out this best practice note on symmetry.


regards

Rob

John D. Ament

unread,
Dec 23, 2014, 6:59:42 AM12/23/14
to camunda-...@googlegroups.com
I must have hit the wrong button when replying.  I meant to add this:

I highly doubt my issue is the use of gateways (in fact using a gateway here seems like more of a hack).  I think I'm trying to model a plain sequence flow: http://docs.camunda.org/latest/api-references/bpmn20/#gateways-conditional-and-default-sequence-flows

When I model a gateway (xor and parallel), I get the right set of actions available.  However, on second step I get the previously unused step plus the newly available step.  My workflow is basically "pick A or B" when you pick A you get to do (in sequence) C, D then E.  You pick b and you can do F, G and then E (a join).

I got this as a reply back:

Hi John,

From your description, it sounds like your proces flow is something like...

http://camunda.org/share/#/process/b6093408-e6cf-4a22-9378-f1ee9d63d776


regards

Rob

John D. Ament

unread,
Dec 23, 2014, 7:03:22 AM12/23/14
to camunda-...@googlegroups.com
The problem with that flow is that I'm not modeling a conditional system implication causing me to do one path or the other, instead the user is manually deciding at the point of being presented with the two options which do I want to do?

I guess maybe what I'm not catching, is I can present the user w/ a user task with the two options in an enum and use that enum's value to guide how they want to progress?  The problem is they may decide to go a different route in which case they need to be able to get back to the list of options as well (meaning a third arrow going back to the form w/ the options again).

John

John D. Ament

unread,
Dec 23, 2014, 3:39:05 PM12/23/14
to camunda-...@googlegroups.com
Even when I add an exclusive or, I get back:

org.camunda.bpm.engine.ProcessEngineException: No outgoing sequence flow of the exclusive gateway 'ComplexGateway_1' could be selected for continuing the process


Which is what I expected, I don't want it to move I just want it to stop at the gateway while both options are presented.


I cannot add a step in the workflow before this to make that decision.

webcyberrob

unread,
Dec 23, 2014, 6:10:37 PM12/23/14
to camunda-...@googlegroups.com
Hi John,

Can you post your process model on Camunda Share so I can get a better idea of what you want to achieve?

Rob

John D. Ament

unread,
Dec 23, 2014, 6:23:31 PM12/23/14
to camunda-...@googlegroups.com
I'll try to get that together, however I just had another thought.

After I post whatever user action I want to perform, and I know I don't want to do the other user task, can I call deleteTask on the user task not performed?

John
Reply all
Reply to author
Forward
0 new messages