I’m finding that occasionally I see two invocations of my
@Override
public void notify(final DelegateExecution execution) throws Exception {
method in my java ExecutionListener.
This method gets called twice for the same activityId, processInstanceId, and eventSource. The only thing that varies is the execution.getId(). I’m only looking for “start” event names on the external task.
I apologize for the false alarm. When I looked closely at my BPMN diagram, I had two arrows entering the external task box, that were right on top of each other, so that they looked like a single arrow. This explains why I saw two notify events being fired.
On this note, I was wondering if this is valid/compliant BPMN? I mean to have two incoming arrows into a task, and only one coming out?
If this is valid, what possible use case would this be good for?
The spec allows that an activity has multiple incoming sequence flow (and only one outgoing sequence flow). It has the same behavior as a gateway. If one of the incoming sequence flows is taken then the activity is activated then the outgoing sequence flow is taken. This can happen multiple times.