I'm sorry that I could not understand your intention.
Please provide the code that you tried and got error.
Sorry if I did not provide code sooner:
This is my example, suppose that in the original code I retrieved the BpmnModel variable from a process instance. However, the error is the same as in my case.
Thank you for your reply and your test code.
I see that you want to create a dynamic process and generate it's diagram image.
But, it is difficult to generate dynamic process's diagram because it have no graphic information like the following.
You should make the graphic information of dynamic process.
<bpmndi:BPMNDiagram id="BPMNDiagram_test">
<bpmndi:BPMNPlane bpmnElement="test" id="BPMNPlane_test">
<bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start">
<omgdc:Bounds height="35.0" width="35.0" x="70.0" y="170.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="task1" id="BPMNShape_task1">
<omgdc:Bounds height="55.0" width="105.0" x="180.0" y="160.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
<omgdc:Bounds height="35.0" width="35.0" x="370.0" y="170.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="105.0" y="187.0"></omgdi:waypoint>
<omgdi:waypoint x="180.0" y="187.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="285.0" y="187.0"></omgdi:waypoint>
<omgdi:waypoint x="370.0" y="187.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
I have no idea to make the properly placed process diagram.
I maked the sample code that generate a process diagram aligned in line and made pull request to your repo.
https://github.com/ajeje93/activiti-processdiagramgenerator-test/pull/1
https://github.com/daisuke-yoshimoto/activiti-processdiagramgenerator-test/blob/master/ProcessDiagra...
Thank you very much!
> I have no idea to make the properly placed process diagram.
I'm sorry that I did not know that there was a standard solution to decide the layout arbitrarily.
You can use org.activiti.bpmn.BpmnAutoLayout.class and you do not need to forcibly create the graphic information.
new BpmnAutoLayout(model).execute();
I made new pull request to add auto layout.
You have been of great help. Thank you again!
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.