How to update element-id of shapes and connectors?


I want to update the id of shape and connectors, How can i do this?

I want to update the below higlhlighted ID

 <bpmn:startEvent **id="StartEvent_07eipeb"**>

#2 :wine_glass:


Here I’m trying to update the BPMN ShapeID (hightlighted below ),
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement=“StartEvent_1”>

//code which i written
this.bpmnJS = new BpmnJS();
this.bpmnJS.get(‘eventBus’).on(‘shape.move.end’, (event) => {
const elementshapeID =;
const modeling = this.bpmnJS.get(‘modeling’);
modeling.updateProperties(, "myCustomeID_2’);

I would like to know how to update the BPMNShape id

Thanks in advance

modeling.updateProperties(myElement, {
  di: {
    id: 'foo'

There you go.