fedd
January 26, 2018, 9:57pm
1
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]},
camundaExtensionModule
]
});
But the xml created does not contain the camunda namespace.
Iāve seen this
In general Missing namespace information is the hint that you did not provide the camunda namespace information to the model:
xmlns:camunda=āhttp://camunda.org/schema/1.0/bpmnā
Refer to this test case to learn how to manually supply it.
You mentioned the diagram already contains the information. If that is the case, we may look at a bug. Please open a ticket in bpmn-moddle , including a minimal test case and we may be able to have a look.
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 https://github.com/bpmn-io/bpmn-js/blob/master/lib/Modeler.js somehow?
nikku
January 28, 2018, 6:34pm
2
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: [
camundaExtensionModule
],
moddleExtensions: {
camunda: camundaModdle
}
});
Refer to this example or the camunda-bpmn-moddle
README for more details.
3 Likes
fedd
January 28, 2018, 8:59pm
3
thanks, sorry, missed it. works ok