This project defines the Zeebe namespace extensions for BPMN 2.0 as a moddle descriptor.
Use it together with bpmn-moddle to validate Zeebe BPMN 2.0 extensions.
var BpmnModdle = require('bpmn-moddle');
var zeebeModdle = require('zeebe-bpmn-moddle/resources/zeebe.json');
var moddle = new BpmnModdle({ zeebe: zeebeModdle });
var taskDefinition = moddle.create('zeebe:TaskDefinition', {
type: 'payment-service',
retries: '5'
});
var serviceTask = moddle.create('bpmn:ServiceTask', {
extensionElements: [ taskDefinition ]
});
Execute the test via
npm test
Perform a complete build of the application via
npm run all
bpmn-js Extension
We include an extension that makes bpmn-js copy and replace mechanisms aware of Zeebe properties.
var BpmnJS = require('bpmn-js/lib/Modeler'),
zeebeExtensionModule = require('zeebe-bpmn-moddle/lib'),
zeebeModdle = require('zeebe-bpmn-moddle/resources/zeebe');
var modeler = new BpmnJS({
additionalModules: [
zeebeExtensionModule
],
moddleExtensions: {
zeebe: zeebeModdle
}
});
This extension hooks into the copy mechanism provided by the BPMN editor and ensures Zeebe properties are kept and or dropped on copy and element replace.
Use under the terms of the MIT license.