Associating default Element Template to Service Task

We need to set a default Element Template to a Service Task in the Camunda Modeler. We found the existing link which mentions support for the default task association.

As we are new to Modeler, we are not clear on the steps to achieve this.

a) So far, we have a sample.json file for the Element Templates. One of the Template is “Run Configuration”. Now we need to associate this element template by default to the ServiceTask element when it is dragged from the pallete.
Please let us know the places where we need to make changes.

Thanks

There you go: https://github.com/camunda/camunda-modeler/tree/master/docs/element-templates

Thanks for the link.

I understand that we can associate a default Template by using camunda:modelerTemplate attribute
<bpmn:serviceTask id=“ServiceTask_0oljael” camunda:modelerTemplate=“http-connector” />

However my requirement is to associate the this modelerTemplate at the time of the service Task creation.

For example, if I have customized the pallete(as shown below) to add an explicit ServiceTask
‘create.servicetask’: createAction(
‘bpmn:ServiceTask’, ‘activity’, ‘bpmn-icon-service-task’,translate(‘Create Service Task’)
),

…and drag this now on the modeler, I would get it translated as
<bpmn:serviceTask id=“ServiceTask_0oljael” />

Now, how could I associate the modelerTemplate attribute here to make it translate as below:
<bpmn:serviceTask id=“ServiceTask_0oljael” camunda:modelerTemplate=“http-connector” />

Please let me know.

Thanks…

Same problem here. How do I add camunda:class attribute while createAction for a bpmn:ServiceTask ? The createAction doesnt allow to define in options.

Usage in my application:

createAction( 'bpmn:ServiceTask', '', 'bpmn-icon-service-task', 'someName', { id: "someId", name: "someName", isDisabled: false, "camunda:class": "com.some.class.name"} // Also tried as - "camunda": {"class": "com.some.class.name"} );

Expected Output:
<bpmn:serviceTask id="someId" name="someName" camunda:class="com.some.class.name"/>

Actual Output:
<bpmn:serviceTask id="someId" name="someName"/>