Skip to content

process-analytics/bpmn-visualization-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

bpmn-visualization TypeScript library


bpmn-visualization is a TypeScript library for visualizing process execution data on BPMN diagrams, with simplicity.

Based on the customization capability, it provides a set of diagram visualization features that includes additional display options for execution data (highlighting of some elements, adding customizable overlays, and more) as well as personalized interactive capabilities (mouse hover, click, and more).

We hope it will help you to create applications for process visualization and analysis ๐Ÿ™‚

๐ŸŽฎ Demo and examples

Please check the โฉ live environment.

You will find there basic usage as well as detailed examples showing possible rendering customizations.

๐Ÿ”† Project Status

bpmn-visualization is actively developed and maintained.

Before the release of version 1.0.0, there may be some breaking changes. We avoid these as much as possible, and carefully document them in the release notes. As far as possible, we maintain compatibility for some minor versions.

๐Ÿคฉ Why using bpmn-visualization?

  • โœจ True opensource license without watermark display
  • โšก๏ธ Strong identity: the only BPMN viewer with a woman icon in the User Tasks
  • ๐ŸŽธ Fully documented and with a lot of integration examples
  • ๐Ÿ‘“ Highly customizable rendering in a simple way
  • ๐Ÿ”ฅ TypeScript support
  • ๐ŸŽฏ Battle tested: high test coverage, thousands of tests, including tests on all supported browsers for Linux, macOS and Windows

๐ŸŽจ Features

Already available features:

๐Ÿ”ฅ Some add-on features are available through a dedicated package: โฉ bpmn-visualization-addons

Planned new features:

  • Additional BPMN styling capabilities
  • Library extension points

๐ŸŒ Browsers Support

Chrome Chrome Firefox Firefox Safari Safari Edge Edge
โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ

Notes:

  • Chromium based browsers should work (automatic tests are run with Chromium canary releases). In particular, the following desktop browsers are known working with [email protected]:
    • Brave 1.70.126
    • Chromium: 129.0.6668.100
    • Opera 114.0.5282.102
  • Support Chromium Edge but not Legacy Edge
  • The library may work with the other browsers. They must at least support ES2015.

โ™ป๏ธ Usage

The library is available from NPM.
We support various module formats such as:

  • ESM: dist/bpmn-visualization.esm.js
  • IIFE: dist/bpmn-visualization.js and its minified companion dist/bpmn-visualization.min.js

๐Ÿ“Œ Usage in applications and projects

Install bpmn-visualization:

npm i bpmn-visualization

Then use this snippet to load your BPMN diagram in a page:

import { BpmnVisualization } from 'bpmn-visualization';

// initialize `bpmn-visualization` and load the BPMN diagram
// 'bpmn-container' is the id of the HTMLElement that renders the BPMN Diagram
const bpmnVisualization = new BpmnVisualization({ container: 'bpmn-container' });
let bpmnContent; // your BPMN 2.0 XML content
try {
  bpmnVisualization.load(bpmnContent);
} catch (error) {
  console.error('Error loading BPMN content', error);
}

You can set the BPMN content using one of the following ways:

  • Copy/Paste directly the XML content in a variable
  • Load it from an url, like this example
  • Load from your computer, like the demo example

๐Ÿ“œ TypeScript Support

The bpmn-visualization npm package includes type definitions, so the integration works out of the box in TypeScript projects. bpmn-visualization requires TypeScript 4.0 or greater. Past versions had the following requirements:

  • 0.21.0 to 0.27.1: TypeScript 4.5
  • 0.17.1 to 0.20.1: TypeScript 4.3

โ„น๏ธ If you are looking for examples of projects integrating bpmn-visualization with TypeScript, see the bpmn-visualization-examples repository.


NOTE

Prior version 0.27.0, bpmn-visualization required extra configuration for TypeScript projects as explained in the v0.26.2 README.


๐Ÿ’  Browser usage

In the HTML page:

  • Load bpmn-visualization (replace {version} by the recent version)
  • Define the container that displays the BPMN diagram, here bpmn-container
  • Load your BPMN diagram in a page
<script src="https://cdn.jsdelivr.net/npm/bpmn-visualization@{version}/dist/bpmn-visualization.min.js"></script>
...
<div id="bpmn-container"></div>
...
<script>
  // initialize `bpmn-visualization` and load the BPMN diagram
  // 'bpmn-container' is the id of the HTMLElement that renders the BPMN Diagram
  const bpmnVisualization = new bpmnvisu.BpmnVisualization({ container: 'bpmn-container'});
  let bpmnContent; // your BPMN 2.0 XML content
  try {
    bpmnVisualization.load(bpmnContent);
  } catch (error) {
    console.error('Error loading BPMN content', error);
  }
</script>

๐Ÿ‘ค User documentation

The User documentation (with the feature list & the public API) is available in the documentation site.

โš’๏ธ More

๐Ÿ’ก Want to know more about bpmn-visualization usage and extensibility? Have a look at the โฉ live examples site.

For more technical details and how-to, go to the bpmn-visualization-examples repository.

๐Ÿ”ง Contributing

To contribute to bpmn-visualization, fork and clone this repository locally and commit your code on a separate branch.
Please write tests for your code before opening a pull-request:

npm test  # run all tests

You can find more detail in our Contributing guide. Participation in this open source project is subject to a Code of Conduct.

โœจ A BIG thanks to all our contributors ๐Ÿ™‚

๐Ÿ“ƒ License

bpmn-visualization is released under the Apache 2.0 license.
Copyright ยฉ 2020-present, Bonitasoft S.A.

Some BPMN icons used by bpmn-visualization are derived from existing projects. See the BPMN Support documentation for more details:

โšก Powered by

statically.io logo

statically.io (demo and examples live environments)

surge.sh logo

surge.sh (demo and documentation preview environments)