Hi @McAlm,
Thanks for your response.
I understand that upon a transition both a start and an end event are fired. However, in my case with method signature:
@EventListener
public void notify(final DelegateExecution delegateExecution) {
...
}
I receive some notifications twice.
For a start event I get callbacks for start twice. And for the end event I get callbacks for end twice.
To illustrate I share with you my logging output for the tested process; that comprises a start event -> a script task that does nothing -> end event.
> Process instance: c7838280-bd3d-11e9-9703-acde48001122 - Current activity: Start of the process(StartEvent_1) - Event name: start
> Process instance: c7838280-bd3d-11e9-9703-acde48001122 - Current activity: Start of the process(StartEvent_1) - Event name: start
> Process instance: c7838280-bd3d-11e9-9703-acde48001122 - Current activity: Start of the process(StartEvent_1) - Event name: end
> Process instance: c7838280-bd3d-11e9-9703-acde48001122 - Current activity: Start of the process(StartEvent_1) - Event name: take
> Process instance: c7838280-bd3d-11e9-9703-acde48001122 - Current activity: First step(Task_16ksokd) - Event name: start
> Process instance: c7838280-bd3d-11e9-9703-acde48001122 - Current activity: First step(Task_16ksokd) - Event name: end
> Process instance: c7838280-bd3d-11e9-9703-acde48001122 - Current activity: First step(Task_16ksokd) - Event name: take
> Process instance: c7838280-bd3d-11e9-9703-acde48001122 - Current activity: End of the process(EndEvent_0gil19k) - Event name: start
> Process instance: c7838280-bd3d-11e9-9703-acde48001122 - Current activity: End of the process(EndEvent_0gil19k) - Event name: end
> Process instance: c7838280-bd3d-11e9-9703-acde48001122 - Current activity: End of the process(EndEvent_0gil19k) - Event name: end
The process is started by executing runtimeService.startProcessInstanceByKey("…");
For the duplicate entries, the values provided as DelegateExecution are equal; according to the equals method on DelegateExecution.
As you see, the Task behaves as I expect. The start and end process emit duplicate notifications. The same is true for timer events. Those are duplicated as well.
So I understand your answer, but the behavior I encounter is a bit different. I’d expect a start and an end notification (as you described), but I encounter start; then start again and then end. And finally a take transition.
Hope you can help me a bit further with these clarifications.
Regards,
Patrick