Too many notify calls for external task on ExecutionListener

Hi,

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.

Does anyone have an idea why this might be happening? This is similar to something like this:
https://app.camunda.com/jira/browse/CAM-2937

but for external tasks…

I’m using Camunda 7.7.0.

Thanks,
Galen

Hi Galen,

thank you for reaching this out. Can you please provide the BPMN process that helps me to reproduce the issue?

Best regards,
Philipp

Hi Philipp,

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?

Thanks,
Galen

Hi Galen,

no problem :slight_smile:

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.

Does this help you?

Best regards,
Philipp

Yes, Thanks!
Galen

New Camunda Modeler Feature/Improvement related to this:

  • If two arrows are completely overlapping (100% coverage), then display the arrow(s) as the color red.

This way the user will be tipped off that what looks like a single arrow is actually 2!

1 Like

I’m not sure what is the best way to handle this issue. However, feel free to create a new issue in the modeler repository.

1 Like

Thanks,
It looks like both coloring and disallowing of overlapping arrows have already been suggested in this issue:

So it looks like this situation will be covered in a future release!

Galen