Hi there,
I am wondering if there is a way to change the type of a shape (ie bpmn:Task, bpmn:CallActivity…) using javascript. I read Edit id attribute of element which works to change the ID, but running the function below does not seem to change the type. Is there something I am missing?
changeType(modeler.get('elementRegistry'), 'Task1234', 'bpmn:CallActivity');
function changeType(elementRegistry, taskId, typeDesired){
modeler.get('modeling').updateProperties(elementRegistry.get(taskId),{
'type': typeDesired
});
}