This repository contains a BPMN modeler (using bpmn-js) with continuous integrated control-flow analysis, error visualization, and potential quick-fixes using my rust_bpmn_analyzer, see detailed description on my website.
A demo version of the application is hosted here (fully client-side compiling Rust to WebAssembly).
The following screenshot shows a simple situation where the control flow in BPMN can get stuck (violates the Option To Complete property).
A counter-example shows the token flow in the diagram leading to this situation.
The setup is standard for projects using npm.
npm i
The following command will start the application ready to be used.
npm start
Model checking is provided using the WebAssembly module cross-compiled from the rust_bpmn_analyzer.
As an alternative, one can use the rust_bpmn_analyzer natively to provide a model checking web service on port 3001.
To switch between the implementations one can change the AnalysisClientModule
import in app.js
.
There are two ways to run the rust_bpmn_analyzer webservice for this project:
Pull the container image (image is only 4MB compressed):
docker pull tkra/rust_bpmn_analyzer
Run a container on port 3001:
docker run -p 3001:8080 tkra/rust_bpmn_analyzer
Clone the rust_bpmn_analyzer and run the following command in the webserver subdirectory:
cargo run -- -p 3001
You need to have Rust installed.
To build the application for the rust_bpmn_analyzer, you can run the following command:
npm run build:rust
This builds the application for the rust_bpmn_analyzer, which is expected to be located next to this project (/../rust_bpmn_analyzer
).
For linting I use eslint and to maintain a consistent code style I use prettier. Both are checked using GitHub actions on every code change.
Run eslint and prettier using the following command:
npm run all
I heavily use the excellent bpmn.io ecosystem, i.e., bpmn-js and bpmn-js-token-simulation.