Add Message Start Event (non-interrupting) inside SubTask by-default

Hi. I’m trying to add Message Start Event (non-interrupting) together with SubTask to the diagram in the following way:

    const subProcessBO = this.bpmnFactory.create('bpmn:SubProcess')
    subProcessBO.triggeredByEvent = true

    const subProcess = this.elementFactory.createShape({
      type: 'bpmn:SubProcess',
      x: 0,
      y: 0,
      isExpanded: true,
      businessObject: subProcessBO
    })

    const startEvent = this.elementFactory.createShape({
      type: 'bpmn:StartEvent',
      x: 40,
      y: 82,
      parent: subProcess,
      isInterrupting: 'false',
      businessObject: this.bpmnFactory.create('bpmn:StartEvent'),
      eventDefinitionType: 'bpmn:MessageEventDefinition'
    })

    const endEvent = this.elementFactory.createShape({
      type: 'bpmn:EndEvent',
      x: 280,
      y: 82,
      parent: subProcess
    })

    const sequenceFlow = this.elementFactory.createConnection({
      type: 'bpmn:SequenceFlow',
      source: startEvent,
      target: endEvent,
      parent: subProcess,
      waypoints: this.getWaypoints(startEvent.businessObject, startEvent, endEvent)
    })

    this.create.start(event, [subProcess, startEvent, endEvent, sequenceFlow], {
      hints: {
        autoSelect: [startEvent]
      }
    })

The problem is the “MessageStartEvent (non-interruptig)” visually looks like “MessageStartEvent”, but actually, it’s not. I’ve compared the XML in both cases and they are the same. And after I’ve reimported the XML, everything is ok, I mean, MessageStartEvent gets the correct shape.
So, step-by-step:
Subtask was added:
image
XML reopened (in my case - page was reloaded):
image

My question is: what I’m doing wrong? Why in the first case, it looks like MessageStartEvent (non-interrupting), and in the second case - it looks like a non-interrupting event?

And here is diff between XML versions (before / after reload)

Please note, that I’ve passed ‘false’ to the ‘isInterrupting’ property as string, because otherwise it’s not recognized (I mean, as a boolean value) for some reasons.

Thanks

Make sure the value of isInterrupting is a boolean, not a string. 'false' will be interpreted as true. A roundtrip involving export and import will fix the issue since all attributes will be serialized as string but parsed depending on the data type which is boolean in the case of isInterrupting.

In this case (isInterrupting: false instead of isInterrupting: ‘false’):
When I dragging (ie not placed yet) the SubTask, it looks like:
image
And when I placed it looks like:
image
In XML:
image
Currently I’m using following versions:

    "bpmn-js": "8.1.0",
    "bpmn-js-properties-panel": "0.38.1",
    "camunda-bpmn-moddle": "4.5.0",
    "diagram-js": "7.1.0",

So, as you can see, if I pass to the “isInterrupting” property “false” as a boolean value, it even won’t write to the XML. “eventDefinitionType” too, has no effect. It looks like a bug.
Here is the full listing:

And fun note:
If I’ll pass “0” (as a number) to the “isInterrupting” property, everything is working as it should (except the fact, that there is 0 instead of false (0 == false in terms of JS)).
Just try (if you can) the following code:

    const startEvent = this.elementFactory.createShape({
      type: 'bpmn:StartEvent',
      x: 40,
      y: 82,
      name: '',
      parent: subProcess,
      isInterrupting: 0,
      businessObject: this.bpmnFactory.create('bpmn:StartEvent'),
      eventDefinitionType: 'bpmn:MessageEventDefinition'
    })

But in this case, zero will be writed to the XML as well, and it’s not ok for the backend side.
I guess, there is issue with type recognition / casting.

Not sure why it’s not working for you but as you can see in this example it’s definitely working: Event Sub Process Example - CodeSandbox

So, seems like it’s a bug.
In the sandbox you’ve provided, bpmn-js@8.2.0 was used.
In my example, I’ve used bpmn-js@8.1.0
I’ve tried to downgrade the version and yes, it’s not working.

(for some reason codesandbox forces latest version to be installed, idk, you may try to install 8.1.0 by yourself in the clean sandbox)

Thankyou for your support