Hi All,
I am trying to add a custom rule that doesn’t allow when an element or shape of type Task is moved from inside the subProcess in canvas.I have tried this =>
this.addRule("shape.move.executed", 2000, function (context) {
var target = context.target,
typeOfElementSelected = context.shape.type;
if (typeOfElementSelected === 'bpmn:Task' && target.type === 'bpmn:Process') {
return false;
} else {
// not returning anything means other rule
// providers can still do their work
//
// this allows us to reuse the existing BPMN rules
}
})
Also have tried to replace the event in this.addRule with - commandStack.shape.move.executed,shape.move.elements.move but it doesn’t apply as a rule.
Another rule as shape.create works fine but not the one that i have described.
Some infos would help me a lot.
Thank you