image export of running diagram

cancel
Showing results for 
Search instead for 
Did you mean: 
daisuke-yoshimo
Senior Member

Re: image export of running diagram

Jump to solution

I'm sorry that I could not understand your intention.

Please provide the code that you tried and got error.

ajeje93
Active Member II

Re: image export of running diagram

Jump to solution

Sorry if I did not provide code sooner:

https://github.com/ajeje93/activiti-processdiagramgenerator-test/blob/master/ProcessDiagramGenerator...

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.

daisuke-yoshimo
Senior Member

Re: image export of running diagram

Jump to solution

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...

ajeje93
Active Member II

Re: image export of running diagram

Jump to solution

Thank you very much!

daisuke-yoshimo
Senior Member

Re: image export of running diagram

Jump to solution

> 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.

Add auto layout. by daisuke-yoshimoto · Pull Request #2 · ajeje93/activiti-processdiagramgenerator-t... 

ajeje93
Active Member II

Re: image export of running diagram

Jump to solution

You have been of great help. Thank you again!