How to integrate token-simulation of bpmn-js with angular 10 application

bpmn-js-token-simulation, bpmn-js-properties-panel, bpmn-js and diagram-js npm packages should be installed.

stylesheets required for tokensimulation and properties-panel should be included in styles:[] of angular.json file.

typescript code:

ngOnInit(): void {
    this.modeler = new Modeler({
      container: '#canvas',
      width: '100%',
      height: '600px',
      propertiesPanel: {
        parent: '#properties'
      },
      additionalModules: [
        tokenSimulation,
        propertiesPanelModule,
        propertiesProviderModule,
      ]
    });
    this.load();
  }

html code:

<div class="modeler"
    <div id="canvas"></div
    <div class="properties-panel" id="properties"</div 
</div>
1 Like