1.0.0 • Published 9 months ago

bpmn-auto-layout v1.0.0

Weekly downloads
357
License
MIT
Repository
github
Last release
9 months ago

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

  • Given a collaboration only the first participant's process will be laid out
  • Sub-processes will be laid out as collapsed sub-processes
  • The following elements are not laid out:
    • Groups
    • Text annotations
    • Associations
    • Message flows

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

1.0.0

9 months ago

0.5.0

1 year ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

6 years ago