Element Templates
Element templates allow teams to define reusable configurations for BPMN elements. Once applied to a task or event, a template pre-fills its properties with curated defaults, reducing repetition and enforcing standards.
What Are Element Templates?
An element template is a JSON descriptor that maps a set of pre-configured properties to a specific BPMN element type. Examples include:
- A “Send Email” Service Task pre-configured with connector type, input/output variables, and documentation
- A “REST Call” connector template for external HTTP integrations
- A company-specific “Approval Task” User Task with standard form and listeners
CIB seven Modeler supports loading element templates from a backend service or bundled as custom templates.
Using an Element Template
- Select a BPMN element on the canvas (e.g., a Service Task)
- In the Properties Panel, click the Template section
- Browse the available templates and click one to preview its properties
- Click Apply to bind the template to the element
After applying, the element’s properties are populated from the template. Some fields may be editable, others locked per the template definition.
Template Sources
Templates are loaded from the backend service and served from the /services/v1/element-templates endpoint.
Custom Templates
To provide organisation-specific element templates, implement or configure the /services/v1/element-templates endpoint to return your custom template JSON array. The format follows the Camunda 7 element templates schema.
Template JSON Format
[
{
"id": "com.example.my-template",
"name": "My Custom Task",
"description": "Calls the internal approval service",
"version": 1,
"appliesTo": ["bpmn:ServiceTask"],
"elementType": { "value": "bpmn:ServiceTask" },
"properties": [
{
"label": "Service URL",
"type": "String",
"binding": { "type": "camunda:inputParameter", "name": "serviceUrl" }
}
]
}
]
Template Filtering
In the template browser you can:
- Search by name or description
- Filter by element type (service task, user task, etc.)
- Preview the full property list before applying
Template Icons
A template can declare an icon that is displayed in two places:
- Diagram canvas — the icon is rendered on the element itself, making it easy to identify templated elements at a glance
- Template chooser modal — the icon appears next to the template name and
id:versionin the selection list
To add an icon, include an icon object in the template JSON:
{
"id": "com.example.my-template",
"name": "My Custom Task",
"icon": {
"contents": "data:image/svg+xml;base64,..."
},
...
}
The contents field accepts a data URI (SVG or raster image encoded as base64).
Property Groups in Scopes
When a template uses a <camunda:Connector> or another scope, properties inside that scope can be organised into named sub-groups using the group field. The sub-group labels are taken from the template’s top-level groups definition.
{
"groups": [
{ "id": "endpoint", "label": "Endpoint" },
{ "id": "auth", "label": "Authentication" }
],
"properties": [
{
"label": "URL",
"group": "endpoint",
"binding": { "type": "camunda:inputParameter", "name": "url" }
},
{
"label": "Token",
"group": "auth",
"binding": { "type": "camunda:inputParameter", "name": "token" }
}
]
}
Properties without a recognised group are displayed under the scope’s default label.
Auto-Loading Templates from Files
The backend can seed the element templates database at startup from JSON files on the classpath or filesystem. This is useful for bundling a standard set of templates with your deployment.
Configure one or more Spring Resource patterns under cibseven.webclient.modeler.templates.paths:
cibseven:
webclient:
modeler:
templates:
paths:
- classpath:/element-templates/*.json
- file:/opt/cibseven/templates/*.json
On startup, every JSON file matched by these patterns is read and its templates are upserted into the database — existing templates with the same ID are updated, new ones are inserted. Requires cibseven.webclient.modeler.enabled: true.