How to Integration bpmn-moddle with bpmn-js-properties-panel without use the example?


#1

How to Integration bpmn-moddle with bpmn-js-properties-panel without use the example?

thanks


#2

Please elaborate: What exactly would you like to do? Why can’t you turn to the example to figure out how things work?


#3

thanks for reply.
i want to Integration bpmn-moddle and bpmn-js-properties-panel in my web application without use the nodejs. i can’t use nodejs to build it work.

help…thanks


#4

NodeJS is only used for creating the pre-built distributions of these libraries. You do not need it for serving or running the properties panel.

I suggest you to do the following:

  • understand how to bundle applications for the web
  • create a pre-built distribution of the properties panel, i.e. by adopting this example
  • serve the pre-built distribution and consume it along with the pre-built bpmn-js distribution in your application

Hope this helps!


#5

I got it…thanks so much.


#6

Uncaught ReferenceError: require is not defined
at moddle:18

error


#7

require is CommonJS module syntax, you can’t use it in the browser as it doesn’t understand it. As @nikku said you’d have to bundle the properties panel first in order to use it in the browser.

<script src="https://unpkg.com/bpmn-js@2.2.1/dist/bpmn-modeler.development.js"></script>

is loading a pre-built distribution of bpmn-js already. So your code might look more like this:

<html>
  <body>
    <div id="canvas"></div>

    <script src="https://unpkg.com/bpmn-js@2.2.1/dist/bpmn-modeler.development.js"></script>
    
    <!-- Load your bundled properties panel here -->
    <script src="./bpmn-js-properties-panel-bundled.js"></script>
  </body>
  <script>
    var modeler = new BpmnJS({
      container: '#canvas',
      additionalModules: [
        propertiesPanelModule, // global exposed by your bundled properties panel
        // ...
      ],
      // ...
    })
  </script>
</html>