Renderer export two elements at once

Hello everyone,

I have a question regarding the BPMNRenderer. I saw in PaletteProvider that the subprocess is exported with a start event. I want to achieve the same thing through the BPMNRenderer so that a subprocess always contains a start event. For that I implemented a CustomRenderer but as far as I saw only one element can be exported.

[consts.SUBPROCESS]: function(self, parentGfx, element) {
        var subprocess = self.renderer('bpmn:SubProcess')(parentGfx, element);
        var elementTask = element;
        elementTask.x = element.x + 50;
        var event = self.renderer('bpmn:StartEvent')(parentGfx, elementTask);
        return [subprocess, event];

Would be nice if someone can give me directions or tips to achieve my goal:)
Where is it specified that the start event is in an expanded subprocess ?

So you want to render a start event that doesn’t exist?

I actually found a solution. I extended the Rules so if the action “shape.replace” is triggered I add the second element.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.