bpmn-io / bpmn-auto-layout

Layout BPMN diagrams, generating missing DI information.
https://bpmn-io.github.io/bpmn-auto-layout/
52 stars 41 forks source link
bpmn bpmn-layout layouter

bpmn-auto-layout

CI

Create and layout the graphical representation of a BPMN diagram.

Usage

This library works with Node.js and in the browser.

import { layoutProcess } from 'bpmn-auto-layout';

import diagramXML from './diagram.bpmn';

const diagramWithLayoutXML = await layoutProcess(diagramXML);

console.log(diagramWithLayoutXML);

Limitations

Resources

Build and Run

# install dependencies
npm install

# build and run tests
npm run all

# run example
npm start

Test

We use snapshot testing to verify old and new layout attempts. A mismatch is indicated as a test failure.

# run tests
npm test

# inspect the results
npm run test:inspect

# run update snapshots
npm run test:update-snapshots

Add new test cases to test/fixtures and they will be picked up automatically.

License

MIT