Hello, I’m trying to create a BPMN Diagram using JSON data that I convert to XML but I’ve run into a problem and that is the position of the elements. I want the layout of the BPMN to be readable from the get-go and not modify the diagram myself.
When using BPMNShape two of the main parameters for are “x” and “y” which I haven’t defined in the JSON as I won’t pass always the same diagram. I would like to ask if there is some way to solve this within the library or any way this has been done before.
Thank you for your answer, yeah I found that exact extension not long after posting the first message but I run into a problem as I don’t know how to exactly install it.
I don’t know which .JS I have to import as the installation guide is not correctly explained
<script src="Script/Layouter.js"></script>
I tried doing a simple this but I think I’m not doing what is needed, could you give me a proper explanation on how to do it?
The library exports a ESM module, which you can either use directly in NodeJS or bundle in your Frontend application with a bundler, such as parcel.
As your use-case is quite complex, I would recommend to get accustomed to the JS ecosystem and how to build applications with npm modules so you can use libraries properly.