MCPcopy Index your code
hub / github.com/bpmn-io/bpmn-js

github.com/bpmn-io/bpmn-js @v18.19.0 sqlite

repository ↗ · DeepWiki ↗ · release v18.19.0 ↗
838 symbols 3,349 edges 364 files 143 documented · 17% 1 cross-repo links
README

bpmn-js - BPMN 2.0 for the web

Build Status

View and edit BPMN 2.0 diagrams in the browser.

bpmn-js screencast

Installation

Use the library pre-packaged or include it via npm into your node-style web-application.

Usage

To get started, create a bpmn-js instance and render BPMN 2.0 diagrams in the browser:

const xml = '...'; // my BPMN 2.0 xml
const viewer = new BpmnJS({
  container: 'body'
});

try {
  const { warnings } = await viewer.importXML(xml);

  console.log('rendered');
} catch (err) {
  console.log('error rendering', err);
}

Checkout our examples for many more supported usage scenarios.

Resources

Build and Run

Prepare the project by installing all dependencies:

npm install

Then, depending on your use-case you may run any of the following commands:

# build the library and run all tests
npm run all

# spin up a single local modeler instance
npm start

# run the full development setup
npm run dev

You may need to perform additional project setup when building the latest development snapshot.

Related

bpmn-js builds on top of a few powerful tools:

  • bpmn-moddle: Read / write support for BPMN 2.0 XML in the browsers
  • diagram-js: Diagram rendering and editing toolkit

It is an extensible toolkit, complemented by many additional utilities.

License

Use under the terms of the bpmn.io license.

Core symbols most depended-on inside this repo

inject
called by 1840
test/helper/index.js
is
called by 596
lib/util/ModelUtil.js
bootstrapModeler
called by 373
test/helper/index.js
getDi
called by 208
lib/util/ModelUtil.js
getBusinessObject
called by 190
lib/util/ModelUtil.js
openPopup
called by 179
test/spec/features/popup-menu/ReplaceMenuProviderSpec.js
queryEntry
called by 108
test/spec/features/popup-menu/ReplaceMenuProviderSpec.js
element
called by 86
test/spec/features/modeling/layout/Helper.js

Shape

Function 828
Class 8
Method 2

Languages

TypeScript100%

Modules by API surface

lib/features/rules/BpmnRules.js46 symbols
lib/import/BpmnTreeWalker.js34 symbols
lib/draw/BpmnRenderer.js33 symbols
lib/features/modeling/BpmnLayouter.js23 symbols
lib/features/modeling/behavior/CompensateBoundaryEventBehavior.js17 symbols
test/spec/draw/BpmnRendererSpec.js13 symbols
lib/features/modeling/BpmnUpdater.js13 symbols
lib/draw/BpmnRenderUtil.js13 symbols
test/helper/index.js11 symbols
lib/util/LabelUtil.js11 symbols
lib/features/snapping/BpmnConnectSnapping.js11 symbols
test/spec/features/modeling/lanes/AddLaneSpec.js10 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

@babel/core8.0.0 · 1×
@bpmn-io/a11y0.1.0 · 1×
@rollup/plugin-commonjs29.0.3 · 1×
@rollup/plugin-json6.1.0 · 1×
@rollup/plugin-node-resolve16.0.3 · 1×
@rollup/plugin-replace6.0.3 · 1×
@rollup/plugin-terser1.0.0 · 1×
babel-loader10.1.1 · 1×
babel-plugin-istanbul8.0.0 · 1×
bio-dts0.15.2 · 1×
bpmn-font0.12.1 · 1×
bpmn-moddle10.0.0 · 1×

For agents

$ claude mcp add bpmn-js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact