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.
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.