Home

Awesome

<h1 align="center">bpmn-visualization TypeScript library</h1> <div align="center"> <p align="center"><img title="bpmn-visualization" src="docs/users/images/custom-behavior-path-highlighting.gif" alt="Examples of the bpmn-visualization TypeScript library"></p> <p align="center"> <a href="https://npmjs.org/package/bpmn-visualization"> <img alt="npm package" src="https://img.shields.io/npm/v/bpmn-visualization.svg?color=orange"> </a> <a href="https://github.com/process-analytics/bpmn-visualization-js/releases"> <img alt="GitHub release (latest by date including pre-releases)" src="https://img.shields.io/github/v/release/process-analytics/bpmn-visualization-js?label=changelog&include_prereleases"> </a> <a href="https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/master/examples/index.html"> <img alt="Live Demo" src="https://img.shields.io/badge/demo-online-blueviolet.svg"> </a> <a href="https://github.com/process-analytics/bpmn-visualization-js/actions"> <img alt="Build" src="https://github.com/process-analytics/bpmn-visualization-js/workflows/Build/badge.svg"> </a> <a href="https://sonarcloud.io/dashboard?id=process-analytics_bpmn-visualization-js"> <img alt="Coverage" src="https://sonarcloud.io/api/project_badges/measure?project=process-analytics_bpmn-visualization-js&metric=coverage" title="The code coverage is underestimated. It doesn't count the code that is only tested through HTML page."> </a> <a href="https://gitpod.io/#https://github.com/process-analytics/bpmn-visualization-js" target="_blank"> <img alt="Gitpod" src="https://img.shields.io/badge/Gitpod-ready--to--code-chartreuse?logo=gitpod"> </a> <br> <a href="CONTRIBUTING.md"> <img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square"> </a> <a href="CODE_OF_CONDUCT.md"> <img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg"> </a> <a href="LICENSE"> <img alt="License" src="https://img.shields.io/github/license/process-analytics/bpmn-visualization-js?color=blue"> </a> </p> </div> <br>

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?

🎨 Features

Already available features:

đŸ”Ĩ Some add-on features are available through a dedicated package: ⏊ bpmn-visualization-addons

Planned new features:

🌏 Browsers Support

<img src="https://www.google.com/chrome/static/images/chrome-logo.svg" alt="Chrome" width="18px" height="18px" /> Chrome<img src="http://blog.mozilla.org/design/files/2019/10/Fx-Browser-icon-fullColor.svg" alt="Firefox" height="18px" /> Firefox<img src="https://upload.wikimedia.org/wikipedia/commons/5/52/Safari_browser_logo.svg" alt="Safari" width="18px" height="18px" /> Safari<img src="https://avatars0.githubusercontent.com/u/11354582?s=200&v=4" alt="Edge" width="18px" height="18px" /> Edge
✔ī¸âœ”ī¸âœ”ī¸âœ”ī¸

Notes:

â™ģī¸ Usage

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

📌 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:

📜 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:

ℹī¸ 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:

<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 (<kbd>demo</kbd> and <kbd>examples</kbd> live environments)

<img src="https://surge.sh/images/logos/svg/surge-logo.svg" alt="surge.sh logo" title="surge.sh" width="110"/>

surge.sh (<kbd>demo</kbd> and <kbd>documentation</kbd> preview environments)