Add modules to bpmn modeler integrated into java web application

Hey all,

I’m currently using the basic bpmn-js functionality into my java web application based on spring boot and primefaces. The usage of the basic bpmn-js module work properly by adding the bpmn-js as a webjar with maven to my project libs. Now I would like to advance the functionality with the cool functions/moduls available for bpmn js. I. e. the coloring of the bpmn elements with the color picker or as well the commenting functionality. How is the best way to do that?

Thanks and best regards,
alfi.

The best way to do this is probably to not use webjars but consume these elements as pre-compiled bundles.

  • Ensure each of the bundles exposes a global
  • Wire BpmnJS and the extensions together
<!-- exposes BpmnJSExtension global -->
<script src="bpmn-js-extension.js" />

<!-- exposes BpmnJS global -->
<script src="bpmn-viewer.js" />

<script>
  var bpmnJS = new BpmnJS({
    additionalModules: [ BpmnJSExtension ]
  });
</script>

To make easier to handle for you, consider bundling your custom BPMN modeler version and consume it like you did consume the webjar bundle.

Hello Alfi, I’am just looking for how to do exactly what you have done: To use the bpmn-js functionalities into my java web application based on spring boot in order to create my own bpmn modeling tool. Can you help by given the basics? I’ve just create a spring bot app that shows the bpmnjs modeler. But it denies drag & drop of model elements from the pallet to the canvas. Thank you.