I cannot create custom handler for rules already handled by bpmn-js.
This is because the BpmnRules
implementation for the elements.move
always returns something (never undefined
). Which causes EventBus._invokeListener
to call event.stopPropagation()
and subsequently prevents the next listener from being invoked.
I agree this is a good pattern for event handling. But as I look at this from a rule engine point, I’d expected that the most restrictive rule would be the enforced one.
There’s no given solution, I can think of multiple scenarios when either solution is the preferred way.
But I do belive my work around below is not very pretty and there should be a better way.
(make sure my custom modules are loaded first)
Modeler.prototype._modules = [ customModules ].concat(Modeler.prototype._modules)