Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Duplicate events fired when an error boundary is attached #117

Open
juja0 opened this issue Sep 26, 2021 · 1 comment
Open

Duplicate events fired when an error boundary is attached #117

juja0 opened this issue Sep 26, 2021 · 1 comment
Labels

Comments

@juja0
Copy link

juja0 commented Sep 26, 2021

Reactor listeners seem to be called twice when error boundaries are attached (on a service task for example).

This seems to be because the class RegisterAllBpmnParseListener adds execution listeners on both 'parseBoundaryErrorEventDefinition' and 'parseServiceTask' but since both parse* methods will be called on the same activity, the same listener instance is attached twice.

There could be other scenarios where duplicates can be attached since there are other parseBoundary* methods on the listener so I think it's reasonable to perform a check to see if reactor listener is already registered before registering. Right now, we just add the listener without any checks by calling activity.addListener. I would be happy to submit a PR but wanted to discuss and agree on an approach before doing so.

@007souvikdas
Copy link

happening for message event as well,
its "start" and "end" gets triggered twice

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants