Using templates
Applying Templates​
If a template matches a selected diagram element, the template catalog button will be shown in the properties panel.
Clicking the Catalog
button will bring up a modal menu allowing to browse and search available templates for the selected element.
Applying a template will store it via the modelerTemplate
property and the optional modelerTemplateVersion
property on the selected element:
Camunda Platform
<bpmn:serviceTask id="MailTask"
camunda:modelerTemplate="com.mycompany.MailTask"
camunda:modelerTemplateVesion="1" />
Camunda Cloud
<bpmn:serviceTask id="MailTask"
zeebe:modelerTemplate="com.mycompany.MailTask"
zeebe:modelerTemplateVesion="1" />
It will also setup custom fields on the diagram element and make these available to the user for inspection and editing. Properties which were not configured in the element template using custom fields, will not be available for editing for the user.
Removing Templates​
To remove an applied template from an element, either the Unlink or Remove function can be used:
- Remove: Remove the element template from the
modelerTemplate
property and also reset all properties of the respective element. - Unlink: Remove the element template from the
modelerTemplate
property but keep the properties which were set.
Updating Templates​
If a template is applied and a new version of the template is found you can update the template.
Templates are updated according to the following rules:
- If property is set in new template it will override unless property was set by old template and changed afterwards
- If property is not defined in new template it will unset
- Sub-properties of complex properties (e.g. camunda:In, camunda:Out, camunda:ExecutionListener) will be handled according to these rules if they can be identified
Missing Templates​
If a template is applied to an element but the respective template cannot be found on the system, the editing of the element will be disabled. Unlinking or removing the template for the element or adding the element template config will enable the editing again.