Adding Camunda moddle

Hi, I added Camunda moddle like this,

global.BpmnEditor = require('bpmn-js/lib/Modeler');
global.camundaExtensionModule = require('camunda-bpmn-moddle/lib');

            editor.bpmn = new BpmnEditor({
                container: '#bpmn-editor-canvas',
                additionalModules: [
                    { contextPadProvider: ['type', MyPropertiesContextPadProvider]},

But the xml created does not contain the camunda namespace.

I’ve seen this

but find this method a bit confusing in my case… for example, I don’t have extensionModel object. How do I provide the camunda namespace with what I have - the Modeler class and the Moddle? Probably override the ‘initialDiagram’ from somehow?

You’re missing the model extension:

var BpmnJS = require('bpmn-js/lib/Modeler'),
    camundaExtensionModule = require('camunda-bpmn-moddle/lib'),
    camundaModdle = require('camunda-bpmn-moddle/resources/camunda');

var modeler = new BpmnJS({
    additionalModules: [
    moddleExtensions: {
      camunda: camundaModdle

Refer to this example or the camunda-bpmn-moddle README for more details.


thanks, sorry, missed it. works ok