Update Process ID when in bpmn:Participant

Hello dear friends,

I need to change the process ID inside the tag “bpmn:Participant” but I can’t find the way to do it. When updating the process ID inside the tag “bpmn:Process” works perfectly.

WORKS (when “bpmn:Process”):
modeling.updateProperties(element, {
id: ‘NewID’
});

I TRIED AND DOES NOT WORK (when: “bpmn:Participant”):
modeling.updateProperties(element, {
businessObject: {
processRef: {
id: ‘NewID’
}
}

I obtain the elment using the following events [‘selection.changed’, ‘elements.changed’].
element = context.elements[0];

First of all: https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax#quoting-code

Unfortunately, you can’t use modeling.udpateProperties for nested properties like the ID of a referenced process. If you want to change the ID in a way that allows undoing and redoing you have to introduce a new command handler. The bpmn-js properties panel has a handler for this purpose: https://github.com/bpmn-io/bpmn-js-properties-panel/blob/master/lib/cmd/UpdateBusinessObjectHandler.js

You can use this handler or create your own.