Prevent to disable change Intermediate events to boundary events

Hello,

is possible to prevent change the intermediate event to boundary event if i move to intermediate event over some activity box ?

Is possible to prevent this operation ?

Thank you.

This behavior is defined through a rule. You can override this rule to disallow the behavior. Here’s an example of how you’d go about implementing your own rules: bpmn-js-examples/custom-modeling-rules at master · bpmn-io/bpmn-js-examples · GitHub

@philippfromme Ok thank you for your reply. I tried it, but unsuccessfully. This is my simple *.ts class.

Should i use name of rule canReplace ? This is the name of function, where is part of code, which i should replace it. But i don’t see logs in console, if is this function called. If i tried shape remove, it works, i saw log in console. And if i should disallow here:

should i copy all function to this my rule without this part ? Thank you.

I don’t know about any canReplace event. Do you mean shape.replace?

I’m not sure what rule i have to override. Your colleague sent me this link bpmn-js/BpmnRules.js at v8.2.2 · bpmn-io/bpmn-js · GitHub to override this rule and i don’t know what name i have to use. I thought that i have to use name of function. Thank you.

I need to use event when i take an intermediate event and move it to over activity (task) and it change this event to boundary event. And i want to disable it. But i don’t know what event should i to use.

I just checked, and unfortunately, this is a known issue with overriding rules: Custom rules ignored · Issue #933 · bpmn-io/bpmn-js · GitHub

Since we’re using canReplace directly there’s no chance for your custom rule to override the default rule.

Until this gets fixed, you have to override the BpmnRules module itself, which of course is inconvenient, but it’s the only workaround at the moment. :frowning_face:

Ok thank you for your reply.