process-analytics / bpmn-visualization-pm4py Goto Github PK
View Code? Open in Web Editor NEWExample of integration between bpmn-visualization and pm4py
License: GNU General Public License v3.0
Example of integration between bpmn-visualization and pm4py
License: GNU General Public License v3.0
Is your feature request related to a problem? Please describe.
Currently there's one panel for displaying the results of both "discovery" and "conformance checking". As a result, it's not possible to switch between different visualizations. For example, if we're in the "conformance checking" visualization, it's not possible to switch back to the "discovery" visualization. The only solution we have is to press on "discover BPMN" button and to resend the request to the backend.
Describe the solution you'd like
Add two panels, one for "discovery" and a second for "conformance". The panels' content are updated only if the buttons "discover BPMN" or "compute conformance" are clicked.
Prior to pm4py 2.6.1, it was not possible to get the statistics related to edges from the Petri net corresponding to the BPMN.
The fix has been introduced in 2.6.1: pm4py/pm4py-core@84e85c6
Update the code to take into account this fix.
Describe the bug
When clicking on "Discover BPMN" or "Compute conformance" buttons, a request is sent to the backend even if there's no file uploaded.
To Reproduce
Two possible ways:
Expected behavior
For "discover BPMN" button: check if the file is uploaded. If not, show a popup message asking the user to upload an event log
For "Compute conformance": Two checks must be performed:
In both cases, show a popup message to explain to the the user.
We should tag and create a GitHub release for this demo.
This lets easily track the changes and clearly bookmark the code.
I suggest we tag the first version as v1.0.0
to state this is not an experimental demo.
Currently, the demo uses custom code to get elements by name, then the retrieved ids are passed to the API of bpmn-visualization
.
We could use the API provided by bv-experimental-add-ons
that directly use names as parameters:
Done at least in:
bpmn-visualization-pm4py/frontend/src/utils.js
Lines 3 to 8 in ff8e970
see example layout in this PR
To reduce the size of the repository and to ease upgrade,
This could be done at project setup: download the jar and store it at the right place in the directory.
The jar is available in https://github.com/process-analytics/bpmn-layout-generators, in dedicated branches related to releases
In v1.0.0, the favicon is missing.
Please ensure that we use the new colors of the website (the examples repository may not use it). See also process-analytics/bpmn-visualization-examples#465
We could use the same file as in the other repositories
bpmn-visualization-examples
repository, for example: https://github.com/process-analytics/bpmn-visualization-examples/blob/v0.31.0/examples/favicon.svgCurrently, the demo uses custom mxGraph
code to style elements.
process-analytics/bpmn-visualization-js#2458 will provide a new way to reset the style the BPMN Elements. So, we should use it here when it is available.
This is at least used in
bpmn-visualization-pm4py/frontend/src/conformance.js
Lines 34 to 44 in ff8e970
As a team decision, we choose to have reviewer optional on the PR for the demo repositories.
The mxgraph context object is currently retrieved with custom code. See
0.30.0
.In the first implementation (#19), a dedicated BPMN file is stored in the repository, but it is not used.
Instead, the content is directly stored in a constant.
The BPMN file can easily be edited to add new elements if needed. So this is why it should be used instead of the constant.
With description : May not necessarily be of the highest quality
Currently, when developing the front part of the demo, the Python server must be up.
This requires that "frontend" contributors setup it which is not very convenient (Java must also be configured).
To simplify the development process, I suggest we develop a fake JavaScript server that will replicate the Python server behavior.
If needed, this will also let easily test some edge cases: API errors, slow or fast responses, ....
The server has to replicate 2 API:
We could use Express, Fastify, NestJS, Next.js, or others.
This will help investigating #15 for instance
In the first implementation (#19), the returned data does not match what the frontend expects
So the display is incorrect.
We could also generate the data based on a template to return dozen or hundreds of lines.
In #28, I restored the original formatting. It changed by mistake after a merge during the development of #27.
We should use a consistent linting configuration and apply it automatically. We could try to share the configuration with the backend-mock-server
. It uses prettier and eslint (for TypeScript).
Currently, the demo uses custom mxGraph
code to style elements.
process-analytics/bpmn-visualization-js#1030 will provide a new way to style the BPMN Elements. So, we should use it here when it is available.
This is currently done at least in:
Currently, the demo uses custom mxGraph
code to style elements.
process-analytics/bpmn-visualization-js#1030 will provide a new way to style the BPMN Elements. So, we should use it here when it is available.
This is currently done at least in:
bpmn-visualization-pm4py/frontend/src/discovery.js
Lines 67 to 81 in f75046e
bpmn-visualization-pm4py/frontend/src/conformance.js
Lines 38 to 44 in f75046e
Describe the bug
BPMN tasks must be rendered with rounded corners per BPMN Specification.
bpmn-visualization enforces this, but in this demo, once the custom fill color is applied to tasks, the rounded corner are dropped, and the diagram display raw rectangles instead.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The BPMN tasks should display rounded corners.
Frequency data
https://www.youtube.com/watch?v=qmWcnZ4Ffn0&t=22s
Conformance data
https://www.youtube.com/watch?v=qmWcnZ4Ffn0&t=66s
Desktop (please complete the following information):
This is probably due to an issue in the code calling the mxGraph native function and should be fixed with #3 and #12.
In v0.30.0, the mxgraph
context is exported so that is can be directly used from bpmn-visualization
.
Update the dependency version, delete the mxgraph-initializer.ts
file and fix the corresponding code.
Use process-analytics/bpmn-visualization-js#2577 when available to avoid having to keep all elements that have overlays.
In the first implementation (#19), the response is received almost immediately. This doesn't correctly simulate the backend which can take several seconds to process. It also prevent to display the spinner while waiting for the response.
We should introduce a way to configure or hard code a delay before the response is sent to the client.
In the first implementation (#19), the API returns data but nothing is displayed on the diagram.
There is probably an issue with the returned content.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.