How to create and register custom type or node

I’m trying to create a custom type which extends the serviceTask. Based on that, the elementTemplate will be appliedTo custom node.

I’ve referred camunda.json from camunda-bpmn-moddle example to implement the same. The implementation as follow.

Modeler extension with custom moddleExtension:

this.modeler = new RtBpmnModeler({
      container: '#js-canvas',
      moddleExtensions: {
              // registration
              camunda: camundaModdleDescriptor, // <-- imported resources/camunda.json from camunda-bpmn-moddle example. 

The JSON is having a type as ServiceTaskLike which extends bpmn:ServiceTask. The code snippet from camunda.json file below.

      "name": "ServiceTaskLike",
      "extends": [
      "properties": [
          "name": "expression",
          "isAttr": true,
          "type": "String"

I’ve tried to load (drag and drop the custom element to canvas) the types as <ServiceTaskLike> & <bpmn:ServiceTaskLike> both failed to load the task and throws the below issue.


Is this the correct way to register and usage of custom type?

Have a look at this example for hints.

Your implementation should look similar.

@philippfromme The link doesnt work anymore.
@jpremkumar - were you able to resolve the issue?