Add new namespaces in definitions

I need to add other namespaces in the definitions xml tag but I don’t know the best way to do so.
I need to add the following namespaces:

xmlns:camunda=“http://activiti.org/bpmn
xmlns:activiti=“http://activiti.org/bpmn

Any hints or suggestions to do that?

What did you try (code wise) and what would you like to achive?

Adding custom elements (with their namespaces) will automatically add these name spaces to the diagram header if the diagram gets serialized.

var foo = model.createAny('activity:Foo', 'http://activiti.org/bpmn', {
  bar: 'BAR'
});

businessObject.extensionElements[0].values.push(foo);
1 Like