My custom platte drag in diagram can not work

I add one custom element (register start event) on the platte and its code like below:

export default class RegisterStartEvent {
  constructor(create, elementFactory, palette, translate) {
    this.create = create;
    this.elementFactory = elementFactory;
    this.translate = translate;


  getPaletteEntries(element) {
    const {
    } = this;
    function createRSE(event) {
      const shape = elementFactory.create('shape', { type: 'bpmn:StartEvent' });
      if ( document.$modeler) {
        const modeler = document.$modeler
        const moddle = modeler.get("moddle");
        const flowableEventType = moddle.create('flowable:EventType',  { values: 'lllll' })
        const extension = elementFactory.create('shape', {type: 'bpmn:ExtensionElements' })
        extension.values = [flowableEventType]
        shape.businessObject.extensionElements = extension
      create.start(event, shape);
    return {
      'create.register-start-event': {
        type: 'bpmn:StartEvent',
        group: 'events',
        className: 'bpmn-icon-start-event-message',
        title: translate('Create RSE'),
        action: {
          dragstart: createRSE,
          click: createRSE

CustomPalette.$inject = [

And its xml constructure like below:



        <flowable:eventType xmlns:flowable=""><![CDATA['lllll]]></flowable:eventType>



When I drag this element from the platte into the diagram, its icon become one StartEvent icon and when I save it to XML, the error from console window is below:

index.esm.js?42c7:1223 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'isGeneric')
    at (index.esm.js?42c7:1223:1)
    at eval (index.esm.js?42c7:1469:1)
    at forEach (index.esm.js?87f2:145:1)
    at eval (index.esm.js?42c7:1457:1)
    at forEach (index.esm.js?87f2:145:1)
    at ElementSerializer.parseContainments (index.esm.js?42c7:1429:1)
    at (index.esm.js?42c7:1244:1)
    at eval (index.esm.js?42c7:1469:1)
    at forEach (index.esm.js?87f2:145:1)
    at eval (index.esm.js?42c7:1457:1)

How to resolve it?
Thank you in advance.

Potentially related to What is metamodel? - #2 by nikku?