Exceptions when including 'Receive event task' in Modeler workflow

I’m having trouble including a Receive Event task in the Modeler. Whenever I add one, there is an exception generated when I try to save it. It can be reproduced with a simplistic workflow that looks as follows. I have not used the event activities before so I’m just trying to ensure that I’m not doing something wrong. I’ve tried this with both 6.6.0 and a build of the latest code from master. If this is in fact a bug I’m happy to file a ticket on it.

Upon saving, I get the following exception:

 java.lang.ArrayIndexOutOfBoundsException: -1
    flowable1          |    at org.flowable.image.impl.DefaultProcessDiagramCanvas.drawConnection(DefaultProcessDiagramCanvas.java:610) ~[flowable-image-generator-6.6.1-SNAPSHOT.jar:6.6.1-SNAPSHOT]
    flowable1          |    at org.flowable.image.impl.DefaultProcessDiagramCanvas.drawSequenceflow(DefaultProcessDiagramCanvas.java:573) ~[flowable-image-generator-6.6.1-SNAPSHOT.jar:6.6.1-SNAPSHOT]
    flowable1          |    at org.flowable.image.impl.DefaultProcessDiagramGenerator.drawActivity(DefaultProcessDiagramGenerator.java:824) ~[flowable-image-generator-6.6.1-SNAPSHOT.jar:6.6.1-SNAPSHOT]
    flowable1          |    at org.flowable.image.impl.DefaultProcessDiagramGenerator.generateProcessDiagram(DefaultProcessDiagramGenerator.java:641) ~[flowable-image-generator-6.6.1-SNAPSHOT.jar:6.6.1-SNAPSHOT]
    flowable1          |    at org.flowable.image.impl.DefaultProcessDiagramGenerator.generateImage(DefaultProcessDiagramGenerator.java:600) ~[flowable-image-generator-6.6.1-SNAPSHOT.jar:6.6.1-SNAPSHOT]
    flowable1          |    at org.flowable.image.impl.DefaultProcessDiagramGenerator.generateImage(DefaultProcessDiagramGenerator.java:607) ~[flowable-image-generator-6.6.1-SNAPSHOT.jar:6.6.1-SNAPSHOT]
    flowable1          |    at org.flowable.image.impl.DefaultProcessDiagramGenerator.generatePngImage(DefaultProcessDiagramGenerator.java:612) ~[flowable-image-generator-6.6.1-SNAPSHOT.jar:6.6.1-SNAPSHOT]
    flowable1          |    at org.flowable.ui.modeler.util.ImageGenerator.createImage(ImageGenerator.java:42) ~[flowable-ui-modeler-logic-6.6.1-SNAPSHOT.jar:6.6.1-SNAPSHOT]
    flowable1          |    at org.flowable.ui.modeler.service.ModelImageService.generateThumbnailImage(ModelImageService.java:73) ~[flowable-ui-modeler-logic-6.6.1-SNAPSHOT.jar:6.6.1-SNAPSHOT]
    flowable1          |    at org.flowable.ui.modeler.service.ModelImageService$$FastClassBySpringCGLIB$$6d09a974.invoke(<generated>) [flowable-ui-modeler-logic-6.6.1-SNAPSHOT.jar:6.6.1-SNAPSHOT]

The BPMN that is generated is invalid, as each of the edges connected to the receiveEvent only has one waypoint (as follows):

      <bpmndi:BPMNEdge bpmnElement="sid-3A34A6D7-EE51-4F5A-9DCD-3FA4CFAFA400" id="BPMNEdge_sid-3A34A6D7-EE51-4F5A-9DCD-3FA4CFAFA400">
        <omgdi:waypoint x="129.94999949366624" y="178.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>

I think this is what leads to the index out of bounds exception above.

This open issue that is exactly what I’m seeing: Flowable 6.6 UI - Missing "<omgdi:waypoint" when using receiveEventTask · Issue #2668 · flowable/flowable-engine · GitHub

Just curious, is this on the roadmap to be fixed for the next release?

Not yet, but we go through issues regularly. However, a PR in this area speeds up everything :wink: