Create Subprocess with Error StartEvent

Hello everyone,

I would like to modifiy the default palette entry for sub-processes to start with an Error-StartEvent instead of a StartEvent. I have created my own palette and know that the function to modify is createSubprocess:

  function createSubprocess(event) {
  var subProcess = elementFactory.createShape({
    type: 'bpmn:SubProcess',
    x: 0,
    y: 0,
    isExpanded: true,
  subProcess.businessObject.triggeredByEvent = true;

  var startEvent = elementFactory.createShape({
    type: 'bpmn:StartEvent',
    x: 40,
    y: 82,
    parent: subProcess,
    eventDefinitionType: 'bpmn:ErrorEventDefinition'

  create.start(event, [ subProcess, startEvent ], {
    hints: {
      autoSelect: [ startEvent ]

As you can see I am setting the ErrorEventDefinition in the createShape-Method for StartEvent. This does have the effect that I can see an Error-StartEvent when dragging the SubProcess into the diagram and hovering. However, when I drop it, it turns into a normal StartEvent.

I presume what happens is that the StartEvent is created, notices that it is not part of a SubProcess and reverts to a standard StartEvent, similar to what happens when you drop an Error-StartEvent into an empty diagram. However, this is obviously not the behaviour I am looking for.

Is this a bug, or should I be setting the eventDefinitionType elsewhere?

I have (at least it looks like) the same situation with non-interrupting Message StartEvent.
If I’ve fill everything as it should, MessageStartEvent converts to the stadard StartEvent when SubProcess is placed.

But there is a little bit different configuration differences and as a result, different workarounds.
But I guess, the root of the problem is the same.