Custom meta model in webjar example?


We are testing bpmn-js in webjar mode and let me say it’s amazing! What a great job!

We are customizing the library to make it fit to our needs and we are stuck with one thing… adding a custom meta model.

I’ve seen this example ( but it uses NodeJS.

So, I’m wondering if it can be done if we choose the webjar way.

Ps: we can tune the bpmn-modeler.js if needed.

Thanks in advance!

It can be easily done:

// fetch extension descriptor from back-end or inline
var extensionDescriptorStr;

var qaPackage = JSON.parse(extensionDescriptorStr);

var modeler = new BpmnJS({
  moddleExtensions: {
    qa: qaPackage

// continue as usual

This assumes you integrated the BPMN modeler via webjar into your webapp. It publishes BpmnJS via UMD, either as a global, RequireJS or CommonJS module.

1 Like