xref: /plugin/bpmnio/vendor/bpmn-js/README.md (revision 033061be24b61e2ca1dcf4d5ade55358f0bb0818)
1# bpmn-js - BPMN 2.0 for the web
2
3[![Build Status](https://github.com/bpmn-io/bpmn-js/workflows/CI/badge.svg)](https://github.com/bpmn-io/bpmn-js/actions?query=workflow%3ACI)
4
5View and edit BPMN 2.0 diagrams in the browser.
6
7[![bpmn-js screencast](./resources/screencast.gif "bpmn-js in action")](http://demo.bpmn.io/s/start)
8
9## Installation
10
11Use the library [pre-packaged](https://github.com/bpmn-io/bpmn-js-examples/tree/main/pre-packaged)
12or include it [via npm](https://github.com/bpmn-io/bpmn-js-examples/tree/main/bundling)
13into your node-style web-application.
14
15## Usage
16
17To get started, create a [bpmn-js](https://github.com/bpmn-io/bpmn-js) instance
18and render [BPMN 2.0 diagrams](https://www.omg.org/spec/BPMN/2.0.2/) in the browser:
19
20```javascript
21const xml = '...'; // my BPMN 2.0 xml
22const viewer = new BpmnJS({
23  container: 'body'
24});
25
26try {
27  const { warnings } = await viewer.importXML(xml);
28
29  console.log('rendered');
30} catch (err) {
31  console.log('error rendering', err);
32}
33```
34
35Checkout our [examples](https://github.com/bpmn-io/bpmn-js-examples) for many
36more supported usage scenarios.
37
38## Resources
39
40* [Demo](http://demo.bpmn.io)
41* [Issues](https://github.com/bpmn-io/bpmn-js/issues)
42* [Examples](https://github.com/bpmn-io/bpmn-js-examples)
43* [Forum](https://forum.bpmn.io)
44* [Changelog](./CHANGELOG.md)
45
46## Build and Run
47
48Prepare the project by installing all dependencies:
49
50```sh
51npm install
52```
53
54Then, depending on your use-case you may run any of the following commands:
55
56```sh
57# build the library and run all tests
58npm run all
59
60# spin up a single local modeler instance
61npm start
62
63# run the full development setup
64npm run dev
65```
66
67You may need to perform [additional project setup](./docs/project/SETUP.md) when
68building the latest development snapshot.
69
70## Related
71
72bpmn-js builds on top of a few powerful tools:
73
74* [bpmn-moddle](https://github.com/bpmn-io/bpmn-moddle): Read / write support for BPMN 2.0 XML in the browsers
75* [diagram-js](https://github.com/bpmn-io/diagram-js): Diagram rendering and editing toolkit
76
77It is an extensible toolkit, complemented by many [additional utilities](https://github.com/bpmn-io/awesome-bpmn-io).
78
79## License
80
81Use under the terms of the [bpmn.io license](http://bpmn.io/license).
82