How to open the custom shapes in the modeler

Hi Team,
I have created one custom shape (that is not presented in BPMN palette). I able to created and drag and drop all the functionalities able to do.

But I am not able to render/open the xml which contains the custom shape.

Please suggest me how to achieve this.


<bpmn:baseElement id="BaseElement _07251F77-8B9B-4423-846C-D5F25ED1EC5E">
                   <custom: type">  element Name </ custom: type >
                   <custom: attributes">  element attributes </ custom: attributes >
 </bpmn:baseElement >
  <bpmndi:BPMNShape id="BaseElement _07251F77-8B9B-4423-846C-D5F25ED1EC5E" bpmnElement="BaseElement _07251F77-8B9B-4423-846C-D5F25ED1EC5E">
        <dc:Bounds x="292" y="180" width="100" height="80" />

Hi @Chandishwar,

please share your complete code / project with the custom element support. Without it, it will be hard to help you from outside.

HI Niklas,

below is the sample code we used for custom shape.

function createServiceTask(event) {
 const shape = elementFactory.createShape({ type: 'bpmn:ServiceTask' });

  create.start(event, shape); 
return {
  'create.service-task': {
    group: 'activity',
    className: 'bpmn-icon-service-task',
    title: translate('Create ServiceTask'),
    action: {
      dragstart: createServiceTask,
      click: createServiceTask

Thanks and Regards,

I rearranged your code a bit to make it easier to read.

Is that your full code to create a custom type of element? I’m a bit confused because in your xml you define an element with the type bpmn:baseElement, but your creation code indicates elements with the type bpmn:ServiceTask.

Hi Niklas,

we are not suppose to share the code .Very much thanks for rearranging the code with bpmn:baseElement so I am shared the sample code.

can you please help me how to render the custom elements on the view port.

Thanks and Regards,

Two questions

  • For understanding: what’s your custom elements type. bpmn:baseElement or bpmn:ServiceTask?
  • Did you create a custom Renderer ? Cf. Custom rendering example


Thanks and Regards,

And what about this one?

Thanks , I am working on it .will say once I struck anywhere.

Thanks for your immediate help.


bpmn:baseElement won’t work. BaseElement is the abstract super class for most BPMN elements.

Where’s you custom element? Can you show the moddle extension for it?