09-12-2014 09:15 AM
<process id="myProcess" name="My process" isExecutable="true">
<startEvent id="startevent1" name="Start"></startEvent>
<manualTask id="manualtask1" name="Manual 1 Task"></manualTask>
<manualTask id="manualtask2" name="Manual 2 Task"></manualTask>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow1" name="flow 1" sourceRef="startevent1" targetRef="manualtask1"></sequenceFlow>
<sequenceFlow id="flow2" name="flow 222" sourceRef="manualtask1" targetRef="manualtask2"></sequenceFlow>
<sequenceFlow id="flow3" name="flow 33333333" sourceRef="manualtask2" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
<bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="100.0" y="200.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="manualtask1" id="BPMNShape_manualtask1">
<omgdc:Bounds height="55.0" width="105.0" x="330.0" y="190.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="manualtask2" id="BPMNShape_manualtask2">
<omgdc:Bounds height="55.0" width="105.0" x="580.0" y="190.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="810.0" y="200.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="135.0" y="217.0"></omgdi:waypoint>
<omgdi:waypoint x="330.0" y="217.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="13.0" width="100.0" x="179.0" y="217.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="435.0" y="217.0"></omgdi:waypoint>
<omgdi:waypoint x="580.0" y="217.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="13.0" width="100.0" x="469.0" y="217.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="685.0" y="217.0"></omgdi:waypoint>
<omgdi:waypoint x="810.0" y="217.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="13.0" width="100.0" x="719.0" y="217.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
@Test
public void generateProcessImage() throws IOException {
InputStream inputStream = repositoryService.getProcessDiagram(processDefinition.getId());
int someByte;
FileOutputStream fos = new FileOutputStream(new File("target/processImage.png"));
while ((someByte = inputStream.read()) != -1) {
fos.write(someByte);
}
fos.close();
inputStream.close();
}
09-15-2014 07:48 AM
09-15-2014 07:49 AM
09-15-2014 07:55 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.