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

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

thanks

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

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

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!

I got it…thanks so much.

image

Uncaught ReferenceError: require is not defined
at moddle:18

error

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>