You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

bpmnlint

Package Overview
Dependencies
Maintainers
2
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bpmnlint

[![Build Status](https://travis-ci.org/bpmn-io/bpmnlint.svg?branch=master)](https://travis-ci.org/bpmn-io/bpmnlint)

1.0.0-alpha5
Source
npmnpm
Version published
Maintainers
2
Created
Source

bpmnlint

Build Status

Validate and improve your BPMN diagrams.

Installing

npm install -s bpmnlint

Or:

yarn add bpmnlint

Usage

As a command line tool

Using a local .bpmnlintrc configuration file

  • Make sure to have a .bpmnlintrc configuration file in the directory where you are running the tool:
// .bpmnlintrc  file
{
  "rules": {
    "label-required": "warn",
    "start-event-required": "error",
    "end-event-required": "error"
  }
}
  • Run the following command:
bpmnlint ./sample.bpmn

Using an explicit configuration file

  • e.g.
// some-config.json file
{
  "rules": {
    "label-required": "warn",
    "start-event-required": "error",
    "end-event-required": "error"
  }
}
  • Run the following command:
bpmnlint ./sample.bpmn -c some-config.json

or

bpmnlint ./sample.bpmn --config some-config.json

Note: For more information about the possible flags, run bpmnlint with the --help flag.

Output:

Configuration

The configuration file is a JSON object where the keys represent the rule names and their values provide information about these rules.

These values can be specified in an implicit or explicit way.

Note: bpmnlint comes with a list of built-in rules: label-required, start-event-required, and end-event-required.

Implicit Configuration

If the specified value for a rule is a number, it will hold the rule status flag:

  • 0: the rule is off
  • 1: problems reported by the rule are considered as warnings
  • 2: problems reported by the rule are considerd as errors
{
  "rules": {
    "label-required": "warn"
  }
}

bpmnlint will then look for the rule first in the built-in rules. If not found, bpmnlint will look for the rule in the npm packages installed as **bpmn-**rule-name (e.g. bpmn-no-implicit-parallel-gateway).

Important: if you're referring to a non built-in rule, make sure to have it installed as an npm dependency.

Explicit Configuration

If the specified value for a rule is an object, it will hold the following information:

  • path to the the rule.
  • flag: rule status flag
{
  "plugins": [
    "custom-rules"
  ],
  "rules": {
    "custom-rules/some-custom-rule": "error"
  }
}

Adding Custom Rules

Important: The rule needs to have a suffix of 'bpmnlint-'.

Custom rules can be added in two ways:

As an NPM Module

Please check out the example of no-implicit-parallel-gateway

As a Local Module

{
  "plugins": [
    "custom-rules"
  ],
  "rules": {
    "custom-rules/some-custom-rule": "error"
  }
}

As a Visual Linting Tool

Please check out bpmn-js-bpmnlint.

Keywords

bpmnlint

FAQs

Package last updated on 04 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts