Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.39 KB

File metadata and controls

34 lines (25 loc) · 1.39 KB

Quick start

Javascript example to demonstrate how to integrate bpmn-visualization in a html page.

♻️ Usage

Load the library

Load the browser bundle from jsdelivr, unpkg or any other location:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/bpmn-visualization.min.js"></script>

💡 During the development step, you can use the non-minified version:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/bpmn-visualization.js"></script>

Use the library

Initialize bpmn-visualization and then load a BPMN Diagram.
The library is bundled as an IIFE style script and binds itself to the global bpmnvisu variable.

In the following, the HTML page defined a div identified by the bpmn-container id, where the BPMN diagram is rendered.

// initialize bpmn-visualization
const bpmnVisualization = new bpmnvisu.BpmnVisualization({ container: 'bpmn-container' });
// load the BPMN diagram
bpmnVisualization.load(bpmnDiagram());