BPMN Visualization
bpmn-visualization
is a TypeScript library for visualizing process execution data on BPMN diagrams with:
- additional display options for execution data (highlight some transitions, counters, and more)
- interactive capacities (mouse hover, click)
🎮 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:
Planned features:
- Additional BPMN styling capabilities
- Library extension points
🌏 Browsers Support
Chrome | Firefox | Safari | Edge |
---|
✔️ | ✔️ | ✔️ | ✔️ |
Notes:
- Chromium based browsers should work (automatic tests are run with Chromium canary releases). In particular, the following
browsers are known working with
bpmn-visualization@0.26.0
:
- Brave 1.42.97
- Chromium 104.0.5112.102
- Opera 90.0.4480.54
- Support Chromium Edge but not Legacy Edge
- The library may work with the other browsers. They must at least support ES6.
♻️ Usage
The library is available from NPM.
We support various module formats such as:
- IIFE:
dist/bpmn-visualization.js
- ESM:
dist/bpmn-visualization.esm.js
- CommonJS:
dist/bpmn-visualization.cjs.js
📌 Project usage
Install bpmn-visualization
in the project:
npm i bpmn-visualization
Then use this snippet to load your BPMN diagram in a page:
import { BpmnVisualization } from 'bpmn-visualization';
let bpmnContent;
const bpmnVisualization = new BpmnVisualization({ container: 'bpmn-container' });
bpmnVisualization.load(bpmnContent);
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
bpmn-visualization
provides type definitions, so the integration should work out of the box in TypeScript projects.
Depending on the build system used by the TypeScript project, it may get the following type errors:
- error TS2688: Cannot find type definition file for 'typed-mxgraph'
- error TS7016: Could not find a declaration file for module 'mxgraph'
In this case, declare the typed-mxgraph
types in the tsconfig.json
as in the following (see the typeRoots documentation for more explanations) 👇
{
"compilerOptions": {
"typeRoots": [
"node_modules/@types",
"node_modules/@typed-mxgraph"
]
}
}
NOTE
This is also mandatory for users who want to extend the mxGraph
integration.
Alternatively, you can set skipLibCheck
to true
in the tsconfig.json
file, but this limits the definition checks.
ℹ️ For more details, see the TypeScript projects in the bpmn-visualization-examples repository.
💠 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>
let bpmnContent;
const bpmnVisualization = new bpmnvisu.BpmnVisualization({ container: 'bpmn-container'});
bpmnVisualization.load(bpmnContent);
</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 run test
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 (demo and examples live environments)
surge.sh (demo and documentation preview environments)