Task listener (Complete) is not getting invoked when complete user task by correlate Message boundary event

diagram_1

I defined Task listeners (1.create 2.complete) for the user task. When I complete user task manually Task listener (complete) is getting invoked . But while complete using boundary event it’s not getting invoked.
How to invoke task complete listener at any kind of completion.

Thanks.

@kesava_Palanisamy, when boundary event is activated then User Task activity will be interrupted and the execution token will flow through the outgoing sequence of the boundary event. Task Listeners(event=Complete) will execute only if activity is not interrupted.

  • An interrupting event is more common that a non-interrupting event. As the name implies, once triggered, the current task stops and the flow of control continues along the new path

Boundary events are catching events that are attached to an activity. This means that while the activity is running, the message boundary event is listening for named message. When this is caught, two things might happen, depending on the configuration of the boundary event:

  • Interrupting boundary event: The activity is interrupted and the sequence flow going out of the event is followed.

I would recommend you to read this docs for message-boundary-event.

image

  • When an activity is being performed and a boundary event is triggered or thrown, a token is sent along the path defined by the boundary event. However, the question remains as to what should happen with the existing activity that was being performed.

  • In the case of an Interrupting Event, the activity which was being performed will immediately be canceled. An Interrupting Event is shown by a solid circle or two solid circles around the event icon depending on whether the event was a start event (one solid circle) or an intermediate event (two solid circles).

  • In the case of a Non-Interrupting Event, the activity which was being performed will continue in parallel along with the new flow that was initiated by the boundary event. The current activity will NOT be cancelled (or interrupted). A Non-Interrupting Event is shown by a dashed circle or two dashed circles around the event icon depending on whether the event was a start event (one dashed circle) or an intermediate event (two dashed circles).

1 Like

Hi @kesava_Palanisamy,

as @aravindhrs explained, the interrupting boundary event is not completing the task.

The engine will fire the delete event.

Hope this helps, Ingo

1 Like

@kesava_Palanisamy, When any of the attached interrupting boundary event got activated in that activity, then below listeners will be executed.

  • If Execution listeners configured in End Event
  • If Task listeners configured in Delete Event

It means when interrupting boundary event got activated, then the current activity is getting cancelled and not completed, so the task listeners configured in complete event won’t get executed.

BPMN Model: listenersTestWithBoundaryEvent.bpmn (6.1 KB)

1 Like