• Stars
    star
    125
  • Rank 286,335 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Validate BPMN diagrams based on configurable lint rules.

bpmnlint

CI

Validate your BPMN diagrams based on configurable lint rules.

Installation

Install the utility via npm:

npm install -g bpmnlint

Usage

Validate your diagrams via the commandline:

> bpmnlint invoice.bpmn

/Projects/process-application/resources/invoice.bpmn
  Flow_1    error    Sequence flow is missing condition  conditional-flows
  Process   error    Process is missing end event        end-event-required
  Task_13   warning  Element is missing label/name       label-required
  Event_12  warning  Element is missing label/name       label-required
  Event_27  warning  Element is missing label/name       label-required
  Process   error    Process is missing start event      start-event-required

✖ 6 problems (6 errors, 0 warnings)

Rules

Our documentation lists all currenty implemented rules, the ./rules folder contains each rules implementation.

Do you miss a rule that should be included? Propose a new rule.

Configuration

Create a .bpmnlintrc file in your working directory and inherit from a common configuration using the extends block:

{
  "extends": "bpmnlint:recommended"
}

Add or customize rules using the rules block:

{
  "extends": "bpmnlint:recommended",
  "rules": {
    "label-required": "off"
  }
}

API

Invoke the tool directly from NodeJS:

import Linter from 'bpmnlint';
import NodeResolver from 'bpmnlint/lib/resolver/node-resolver';

import BpmnModdle from 'bpmn-moddle';

const linter = new Linter({ 
  config: {
    extends: 'bpmnlint:recommended'
  },
  resolver: new NodeResolver()
});

const xmlStr = `
  <?xml version="1.0" encoding="UTF-8"?>
  <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" 
                     id="definitions" 
                     targetNamespace="http://bpmn.io/schema/bpmn">
    <bpmn:process id="process" />
  </bpmn:definitions>
`;

const {
  rootElement: definitions
} = await moddle.fromXML(xmlStr);

const reports = linter.lint(definitions);

// {
//    "end-event-required": [
//      {
//        "id": "process",
//        "message": "Process is missing end event"
//      }
//    ],
//    ...
// }

Writing a Plug-in

Create your first plug-in using the plugin creator:

npm init bpmnlint-plugin {PLUGIN_NAME}

Checkout the bpmnlint-plugin-example for details on how to define, test, and consume custom lint rules. Use the bpmnlint playground to implement new rules with quick visual feedback.

Bundling

For browser usage include your linting configuration using your favorite bundler plug-in (Rollup, Webpack).

Visual Feedback

Integrate the linter via bpmn-js-bpmnlint into bpmn-js and get direct feedback during modeling.

To try out visual validation, checkout the bpmnlint playground.

Related

License

MIT

More Repositories

1

bpmn-js-examples

Examples how to use bpmn-js
JavaScript
1,641
star
2

diagram-js

A toolbox for displaying and modifying diagrams on the web.
JavaScript
1,472
star
3

form-js

View and visually edit JSON-based forms.
JavaScript
408
star
4

bpmn-moddle

Read and write BPMN 2.0 XML from JavaScript.
JavaScript
391
star
5

dmn-js

View and edit DMN diagrams in the browser.
JavaScript
294
star
6

bpmn-js-properties-panel

A properties panel for bpmn-js.
JavaScript
293
star
7

bpmn-js-token-simulation

A BPMN 2.0 specification compliant token simulator.
JavaScript
249
star
8

vue-bpmn

Display BPMN 2.0 diagrams in Vue.js
HTML
245
star
9

react-bpmn

Display BPMN 2.0 diagrams in React.
HTML
187
star
10

awesome-bpmn-io

A curated list of bpmn.io related projects and resources.
180
star
11

bpmn.io

The bpmn.io website sources.
Handlebars
148
star
12

vs-code-bpmn-io

View and edit BPMN diagrams in VSCode. Powered by bpmn.io tools.
TypeScript
116
star
13

bpmn-font

A BPMN 2.0 symbol font
110
star
14

path-intersection

Computes the intersection between two SVG paths.
JavaScript
105
star
15

bpmn-js-nyan

bpmn-js, nyan cat style 🌈 🐱
JavaScript
92
star
16

moddle

Meta-model based data structures for those who need it
JavaScript
85
star
17

cmmn-js

A CMMN 1.1 rendering toolkit and web modeler.
JavaScript
78
star
18

bpmn-to-image

Convert BPMN 2.0 diagrams to PDF documents or PNG files.
JavaScript
62
star
19

bpmn-js-i18n

Internationalization resources for bpmn-js
JavaScript
61
star
20

bpmn-js-example-angular

An example how to integrate bpmn-js with an Angular application.
TypeScript
58
star
21

bpmn-auto-layout

Layout BPMN diagrams, generating missing DI information.
JavaScript
50
star
22

bpmn-js-bpmnlint

A bpmnlint plug-in for bpmn-js.
JavaScript
50
star
23

bpmn-js-cli

A command line interface for bpmn-js. BPMN 2.0 modeling that just works!
JavaScript
49
star
24

tiny-svg

A minimal toolbelt for builing fast SVG-based applications
JavaScript
48
star
25

bpmn-js-example-custom-elements

An example of how to support custom elements in bpmn-js while ensuring BPMN 2.0 compatibility.
JavaScript
47
star
26

bpmn-js-differ

A diffing utility for BPMN 2.0 documents.
JavaScript
45
star
27

moddle-xml

Read and write XML documents described with moddle.
JavaScript
45
star
28

bpmn-js-example-react-properties-panel

An example how to build a simple properties panel for bpmn-js using React
JavaScript
40
star
29

dmn-js-examples

Some examples on how to use dmn-js
HTML
33
star
30

diagram-js-minimap

A minimap for diagram-js
JavaScript
32
star
31

bpmn-js-example-custom-shapes

Creating custom elements in bpmn-js that live outside a BPMN 2.0 diagram.
JavaScript
31
star
32

bpmn-js-seed

[DISCONTINUED] A project to quickly get started with bpmn-js
HTML
30
star
33

properties-panel

Library for creating bpmn-io properties panels.
JavaScript
30
star
34

bpmn-js-example-model-extension

An example of creating a model extension for bpmn-js
JavaScript
27
star
35

bpmn-js-sketchy

A sketchy renderer for bpmn-js.
JavaScript
27
star
36

form-js-examples

A collection of form-js examples.
JavaScript
26
star
37

diagram-js-examples

JavaScript
25
star
38

bpmn-js-color-picker

A simple color picker for your BPMN elements.
JavaScript
25
star
39

bpmnlint-playground

A place to try out bpmnlint rules 🚀.
JavaScript
24
star
40

table-js

A blazing fast library for viewing and editing tables
JavaScript
20
star
41

dmn-testing-plugin

Camunda Modeler plugin that allows testing of a DMN decision.
JavaScript
19
star
42

camunda-transaction-boundaries

Visualize all Camunda transaction boundaries in a BPMN diagram.
JavaScript
15
star
43

bpmn-js-diffing

Visual diffs for BPMN 2.0 diagrams
JavaScript
15
star
44

bpmn-js-embedded-comments

Simple comments for bpmn-js
JavaScript
15
star
45

diagram-js-direct-editing

Direct editing support for diagram-js
JavaScript
14
star
46

feel-editor

Editor for FEEL expressions.
JavaScript
14
star
47

bpmn-io-chrome

A offline modeler for BPMN 2.0 diagrams based on bpmn-js
JavaScript
14
star
48

bpmn-js-example-custom-controls

An example how to add custom editor controls to bpmn-js
JavaScript
14
star
49

min-dash

Minimum utility toolbelt
JavaScript
13
star
50

dmn-moddle

Read and write DMN XML from JavaScript.
JavaScript
13
star
51

element-template-chooser

A simple element template chooser for properties-panel >= 1.
JavaScript
13
star
52

bpmn-io-callbacks-to-promises

Promises are heaven. Callbacks are hell.
12
star
53

dmn-js-properties-panel

A properties panel for dmn-js.
JavaScript
11
star
54

feelers

A text templating solution built on top of FEEL
JavaScript
11
star
55

bpmn-js-connectors-extension

An element templates everywhere bpmn-js extension.
JavaScript
11
star
56

bpmn-js-task-priorities

Define the priorities of BPMN activities via size and color
JavaScript
10
star
57

bower-bpmn-js

[DISCONTINUED] Pre-packaged version of bpmn-js
HTML
10
star
58

cmmn-js-examples

Some examples how to use cmmn-js
HTML
10
star
59

drag-tabs

A tiny tab dragging utility
JavaScript
10
star
60

bpmn-properties-panel

Properties panel for bpmn-js, built on top of @bpmn-io/properties-panel.
JavaScript
10
star
61

min-dom

A minimal DOM utility toolbelt. Library friendly and based on utilities provided by component.
JavaScript
10
star
62

bpmn-js-create-append-anything

A create/append anything bpmn-js extension.
JavaScript
10
star
63

element-template-playground

A playground to edit element templates
JavaScript
9
star
64

bpmn-js-example-custom-rendering

An example of creating custom rendering for bpmn-js
JavaScript
9
star
65

diagram-js-origin

A point of origin crosshair for diagram-js
JavaScript
8
star
66

docs.bpmn.io

bpmn.io Toolkit Documentation
SCSS
8
star
67

json-schema-validator

Validate JSON based on JSON Schema files
JavaScript
8
star
68

scroll-tabs

A tiny tab scrolling utility
JavaScript
8
star
69

diagram-js-grid

A visual grid for diagram-js
JavaScript
7
star
70

element-templates

The home of bpmn.io element templates
7
star
71

svelte-bpmn

Embed BPMN 2.0 diagrams in your Svelte app
Svelte
7
star
72

ids

Simple id generation and caching
JavaScript
7
star
73

bpmnlint-plugin-example

A example bpmnlint plug-in
JavaScript
6
star
74

bpmn-js-guideline-validation

A guideline checker extension for bpmn-js
JavaScript
6
star
75

bpmn-questionnaire

A library for questionnaires on BPMN 2.0.
JavaScript
5
star
76

bpmn-questionnaire-example

Example project that makes use of the bpmn-questionnaire library.
JavaScript
5
star
77

element-template-icon-renderer

A bpmn-js extension to render element template icons.
JavaScript
5
star
78

bpmn-js-element-templates

The element template extension for bpmn-js
JavaScript
5
star
79

element-templates-validator

Validate element templates based on JSON Schema.
JavaScript
5
star
80

bpmn-js-integration

Integration test infrastructure for bpmn-js (MIWG, custom)
HTML
5
star
81

object-refs

Minimal bi-directional object references for JavaScript
JavaScript
4
star
82

tasks

The bpmn.io task board
JavaScript
4
star
83

design-principles

The design principles that guide our tool UX
4
star
84

diagram-js-ui

Reactive UI utilities for diagram-js and extensions
JavaScript
4
star
85

bpmn-js-executable-fix

bpmn-js extension which makes sure that `isExecutable` is set on `bpmn:Process`
JavaScript
4
star
86

dmn-migrate

Migrate your DMN diagrams to the latest DMN version
JavaScript
4
star
87

cmmn-js-properties-panel

A properties panel for cmmn-js.
JavaScript
4
star
88

refactorings

BPMN refactoring suggestions powered by AI.
JavaScript
4
star
89

bpmn-js-collapse-subprocess

bpmn-js extension which enhances subprocess modeling with replace menu
JavaScript
4
star
90

properties-panel-async-example

Example properties panel extension with asynchronous data.
JavaScript
3
star
91

bpmn-in-color-moddle

JavaScript
3
star
92

bpmn-js-tracking

A bpmn-js extension that provides a framework for tracking diagram editing events.
JavaScript
3
star
93

align-to-origin

Nicely align your diagrams to the coordinate origin.
JavaScript
3
star
94

eslint-plugin-bpmn-io

Common lint rules for bpmn.io projects
JavaScript
3
star
95

dmnlint

Validate DMN diagrams based on configurable lint rules.
JavaScript
3
star
96

dmn-js-syntax-highlighting

FEEL syntax highlighting for dmn-js
JavaScript
3
star
97

bpmn-js-signavio-compat

Interoperate with Signavio exported diagrams
JavaScript
3
star
98

sr

A simple setup and run tool for bpmn.io based projects
JavaScript
3
star
99

issue-labels

Documentation and synchronization utilities for issue and pull request labels used across our projects.
HTML
3
star
100

cmof-parser

A parser for CMOF meta-model descriptor files
JavaScript
3
star