PROSLab / BPMN-Redrawer

11 stars 1 forks source link

BPMN Redrawer

BPMN Redrawer is a web application that allows to upload images representing BPMN models to convert them in actual BPMN models stored in .bpmn format.

Table of contents

Functionalities

The user, through the simple and intuitive GUI, can load an image from the local storage in different formats (PNG, JPEG, BMP). The image is then displayed and is ready to be converted. After that, the backend receives the loaded image, extracts the elements and link them togheter in order to obtain the final .bpmn file. At this pont the result comes back to the frontend and, using the GUI, can be downloaded or can be shown and edited thanks to the integration of the bpmn-js library.

Overall, the application is able to provide the following functionalities:

At present the application is able to detect the following BPMN elements with a fair average precision:

| BPMN Nodes | AP |---------------------------------------|----- | Start Event | 96.923 | Start Message Event | 98.796 | Start Timer Event | 100.0 | Start Conditional Event | 99.901 | Start Signal Event | 98.713 | Intermediate Catch Message Event | 94.489 | Intermediate Catch Timer Event | 98.811 | Intermediate Catch Conditional Event | 99.010 | Intermediate Catch Signal Event | 99.010 | Intermediate Catch Link Event | 100.0 | Intermediate Throw Event | 86.139 | Intermediate Throw Message Event | 88.355 | Intermediate Throw Escalation Event | 99.622 | Intermediate Throw Compensation Event | 100.0 | Intermediate Throw Signal Event | 99.586 | Intermediate Throw Link Event | 100.0 | BPMN Nodes | AP |-------------------------|----- | End Event | 96.406 | End Message Event | 80.499 | End Escalation Event | 99.802 | End Compensation Event | 100.0 | End Signal Event | 99.218 | End Error Event | 100.0 | End Terminate Event | 98.803 | Esclusive Gateway | 96.512 | Parallel Gateway | 96.427 | Inclusive Gateway | 93.915 | Event-Based Gateway | 89.109 | Task | 97.653 | Data Object | 96.819 | Data Store | 100.0 | Text Annotation | 72.670 | Pool | 95.870 | BPMN Connecting Objects | AP-box | AP-keypoints| |-------------------------|--------|-------------| | Sequence Flow | 82.988 | 96.865 | | Message Flow | 73.678 | 88.316 | | Data Association | 65.154 | 84.546 |

Quickstart

Our web application is available and ready to use at the following link: BPMN Redrawer.

A tutorial on its usage is available by clicking the image below: Watch the video

The user can perform very simple steps to obtain a .bpmn file starting from an image:

The user can also use the EDITOR page to open, edit and download an existing .bpmn model or to create a BPMN model from scratch, as well as loading an image in the image viewer.

How to run

BPMN Redrawer is available as a Docker image by creating it from this folder or pulling it from DockerHub.

First of all, download the trained detectron2 models from Hugging Face and move them in the detectron_model folder.

In particular these two models are:

This is needed when working with the application without using containers. When using the containers, the models will be downloaded automatically.

To build the image, from the root folder it is sufficient to launch the command:

docker build -t bpmn-redrawer-image .

Once the image has been built, it is possible to run it with the command:

docker run -d -p 5000:5000 -e BACKEND_PORT=5000 -e BACKEND_MODE=production --name bpmn-redrawer-container bpmn-redrawer-image

Otherwise the application can be run with a single command, using the latest image available on DockerHub:

docker run -d -p 5000:5000 -e BACKEND_PORT=5000 -e BACKEND_MODE=production --name bpmn-redrawer-container proslab/bpmn-redrawer

Two variables are available when running the container:

Once launched, the application will be available at http://localhost:5000.

Backend

The Backend README contains more instructions on how to launch/develop the backend.

Frontend

The Frontend README contains more instructions on how to launch/develop the frontend.