Skip to content

aivinog1/zeebe-bpmn-moddle

Repository files navigation

zeebe-bpmn-moddle

CI

This project defines the Zeebe namespace extensions for BPMN 2.0 as a moddle descriptor.

Usage

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 ]
});

Building the Project

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.

License

Use under the terms of the MIT license.

About

Zeebe moddle extensions for BPMN 2.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%