How to create a BPMN 2.0 xml manually from input from database


#1

Hi,

My requirement is to create BPMN diagram based process flow values from database tables and save to local system.

my approach was to create the BPMN 2.0 xml file based on the database table values for the processes flow and load the same to the BPMN viewer and save the the diagram as SVG format to local drive.

it is possible to create the BPMN 2.0 XML file manually? if yes, how we will able to create the position of the “BPMNShape”? and “BPMNEdge”? as below:

<bpmndi:BPMNEdge id=“SequenceFlow_1csnl5k_di” bpmnElement=“SequenceFlow_1csnl5k”>
<di:waypoint x=“602” y=“150”** />
<di:waypoint x=“568” y=“188” />
<di:waypoint x=“326” y=“188” />
<di:waypoint x=“315” y=“150” />
bpmndi:BPMNLabel

please help me out on this. Thanks In advance…


#2

To answer your question, yes, you can create a BPMN diagram programmatically using bpmn-js. The easiest way to get started would probably be the bpmn-js-cli.

Hope that helps.


#3

Thanks Philip for the response.

Actually as per my requirement, i have to create a extraction module which will get process related information from Database table and generates the BPMN 2.0 xml file based on the information and this module will be a c# console application and there will be no javascript file involved.

main issue i am facing on creating the position of the BPMNShapes , BPMNEdge and sequence flow coordinates like we have in BPMN2.0 xml as below:

<bpmndi:BPMNEdge id=“SequenceFlow_1csnl5k_di” bpmnElement=“SequenceFlow_1csnl5k”>
<di:waypoint x=“602” y=“150”** />
<di:waypoint x=“568” y=“188” />
<di:waypoint x=“326” y=“188” />
<di:waypoint x=“315” y=“150” />

any suggestion on above scenario and how to achieve it will help.

Regards


#4

If your issue is not related to our toolkit this is the wrong place to ask.