Associating default Element Template to Service Task


#1

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


#2

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


#3

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…