How to set the value of the property panel programmatically?


#1

For example, get or set the ID. Will I do this?
O%24%5BCJ)SOR0%5B~%5BL0%25YXYI59N
I now need to set ID and Name. What should I do? Thank you!


#2

Hi @hyj,

if you want to change the properties of bpmn elements programmatically, you can do this by manipulating the xml. Check this to get an better understanding how bpmn.io handles XML imports.


#3

Changing properties is possible using the modeling API that is being used by the properties panel as well:

modeling.updateProperties(myElement, {
  id: 'foo',
  name: 'Foo'
});

This will result in a command being executed that can be reverted.