Hey,
I’m using a custom metamodel, in which different types with overlapping properties exist. In a custom property panel, it is possible to set values for those properties (modeling.updateProperties
).
In a next step, I added a select field to change the type of the element using the solution provided in https://forum.bpmn.io/t/changing-task-to-usertask-by-code/1865/2:
changedType (type) {
const newElementData = {
type
}
const replace = this.bpmnModeler.get('replace')
this.element = replace.replaceElement(this.element, newElementData)
}
It is possible to keep the already set properties during replacement (e.g., by sending them within newElementData
?) or do I have to add them manually after replacement using modeling.updateProperties
?
My goal is to end up with just one undo
| redo
event when the type is changed.