cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong flow label layout for process definition image

bkonrad
Champ in-the-making
Champ in-the-making
Hi Actitiviti community,

i have following simple process definition:

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

With Activiti Designer, everything looks nice, the flows have labels which are attached direct to the arrows.
When I generate the process image

@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();
   }

the label positions are completly wrong, they are somewhere in the picture and not layouted as in the Activiti Designer, in this case, all three labels are positioned between start and manual task 1.

Any ideas???
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
Which version of Activiti? Recently, some changes have been made in that area.

jbarrez
Star Contributor
Star Contributor
(and which version of the designer?)

bkonrad
Champ in-the-making
Champ in-the-making
I am using Activiti 5.16.0 and Activiti Eclipse BPMN 2.0 Designer 5.15.0.