diff --git a/docs/components/best-practices/cicd-guidelines/element-templates-at-scale.md b/docs/components/best-practices/cicd-guidelines/element-templates-at-scale.md index 4c56e7b5c3e..1bf70761109 100644 --- a/docs/components/best-practices/cicd-guidelines/element-templates-at-scale.md +++ b/docs/components/best-practices/cicd-guidelines/element-templates-at-scale.md @@ -6,7 +6,7 @@ description: "Learn how to provision element templates at runtime and make them To effectively manage large libraries of reusable building blocks ([element templates](/components/concepts/element-templates.md)), you can create a pipeline that: -- Provisions the [dependencies of element templates](/components/modeler/element-templates/element-template-with-dependencies.md) to required clusters. +- Provisions the [dependencies of element templates](/components/modeler/element-templates/create/element-templates-with-dependencies.md) to required clusters. - Makes templates available at design time to multiple Web Modeler [shared projects](/components/modeler/web-modeler/collaboration/use-shared-project-for-organization-wide-collaboration.md) within an organization. ![Pipeline goal](./img/pipeline-goal.png) diff --git a/docs/components/best-practices/development/local-development-with-element-templates.md b/docs/components/best-practices/development/local-development-with-element-templates.md index 5adcc45979d..8cd1668a9d5 100644 --- a/docs/components/best-practices/development/local-development-with-element-templates.md +++ b/docs/components/best-practices/development/local-development-with-element-templates.md @@ -13,7 +13,7 @@ This guide explains how to set up element templates in your local environment. ## Prerequisites - [Camunda 8 Run](/self-managed/quickstart/developer-quickstart/c8run.md) installed on your local machine. -- Basic knowledge of [element templates with dependencies](/components/modeler/element-templates/element-template-with-dependencies.md). +- Basic knowledge of [element templates with dependencies](/components/modeler/element-templates/create/element-templates-with-dependencies.md). - Familiarity with [custom connectors](/components/connectors/manage-connector-templates.md). ## Provisioning secrets @@ -118,6 +118,6 @@ To make your element templates available in Desktop Modeler, see the [configurat ## Additional resources and next steps -- [Using element templates in Desktop Modeler](/components/modeler/desktop-modeler/element-templates/using-templates.md) +- [Using element templates in Desktop Modeler](/components/modeler/desktop-modeler/element-templates/configuring-templates.md) - [Run your first local Camunda 8 project](/guides/getting-started-example.md) - [Available connectors](/components/connectors/out-of-the-box-connectors/available-connectors-overview.md) diff --git a/docs/components/concepts/element-templates.md b/docs/components/concepts/element-templates.md index 01231050694..ee7f04564be 100644 --- a/docs/components/concepts/element-templates.md +++ b/docs/components/concepts/element-templates.md @@ -1,15 +1,24 @@ --- id: element-templates title: Element templates -description: An element template is a way to extend the Modeler with domain-specific diagram elements. +description: An element template extends the Modeler with reusable, domain-specific configuration for BPMN elements. --- import propertiesNoTemplate from './assets/element-templates/properties-no-template.png' import propertiesWithTemplate from './assets/element-templates/properties-with-template.png' -An **element template** extends the [Modeler](../modeler/about-modeler.md) with domain-specific diagram elements, such as service and user tasks. They allow you to customize how a BPMN element is displayed and how it can be configured by process developers. +An **element template** defines a reusable, domain-specific configuration for BPMN elements in the [Modeler](../modeler/about-modeler.md). -The example below shows how a generic service task can be transformed into a customized user interface that guides users through its configuration: +Templates shape both **how an element is configured** and **how its properties appear in the UI**, helping modelers apply consistent technical settings without needing to understand engine-level details. + +Element templates are commonly used to: + +- Ensure consistent configuration of service and user tasks +- Predefine input/output mappings, headers, authentication, or runtime types +- Provide structured, validated UI fields in the properties panel +- Encapsulate best practices into reusable building blocks + +The example below illustrates how a generic service task becomes easier and safer to configure once a template is applied: | Without an element template | With an element template | | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | @@ -17,13 +26,12 @@ The example below shows how a generic service task can be transformed into a cus | Properties panel without an element template | Properties panel with an element template | :::tip -[Connector templates](../connectors/custom-built-connectors/connector-templates.md) are a specific type of element template. +A **connector template** is a specialized element template used for configuring connectors. All connector templates are element templates, but not all element templates represent a connector. ::: ## Next steps -Read more about element templates and how to use them: +Learn more about working with element templates: -- [Element templates in Modeler](/components/modeler/element-templates/about-templates.md) -- [Using element templates in Web Modeler](/components/modeler/web-modeler/element-templates/using-templates.md) -- [Using element templates in Desktop Modeler](/components/modeler/desktop-modeler/element-templates/using-templates.md) +- [Overview: Element templates in Modeler](/components/modeler/element-templates/about-templates.md) +- [Using element templates in Desktop Modeler](/components/modeler/element-templates/getting-started/using-templates-in-desktop-modeler.md) diff --git a/docs/components/connectors/custom-built-connectors/build-connector.md b/docs/components/connectors/custom-built-connectors/build-connector.md index 27b65673566..65964dcef6c 100644 --- a/docs/components/connectors/custom-built-connectors/build-connector.md +++ b/docs/components/connectors/custom-built-connectors/build-connector.md @@ -69,7 +69,7 @@ and how it can be configured by process developers. Connector templates are a sp

Connector templates

Create a connector task and start using connector secrets.

- + Generate a connector template

Generate a connector template

Automatically generate a custom connector template in Web Modeler.

diff --git a/docs/components/connectors/custom-built-connectors/connector-templates.md b/docs/components/connectors/custom-built-connectors/connector-templates.md index 814abb180ce..6a03807c7b4 100644 --- a/docs/components/connectors/custom-built-connectors/connector-templates.md +++ b/docs/components/connectors/custom-built-connectors/connector-templates.md @@ -1173,7 +1173,7 @@ You can, for example, allow the user to model and configure the following **REST ## Develop connector templates -You can develop connector templates using the [`element template` feature](/components/modeler/element-templates/defining-templates.md). You can also look at existing [examples](https://github.com/camunda/camunda-modeler/blob/master/resources/element-templates/cloud-samples.json). +You can develop connector templates using the [`element template` feature](/components/modeler/element-templates/create/defining-templates.md). You can also look at existing [examples](https://github.com/camunda/camunda-modeler/blob/master/resources/element-templates/cloud-samples.json). ## Providing and using connector templates diff --git a/docs/components/connectors/manage-connector-templates.md b/docs/components/connectors/manage-connector-templates.md index 2508c0e0d87..b3ec4ac8092 100644 --- a/docs/components/connectors/manage-connector-templates.md +++ b/docs/components/connectors/manage-connector-templates.md @@ -4,4 +4,4 @@ title: Manage connector templates description: Manage your connector templates in Web Modeler. --- -Connector templates are a specific type of [element template](/components/concepts/element-templates.md). To manage them, see the [Manage element templates](/components/modeler/web-modeler/element-templates/manage-element-templates.md) documentation. +Connector templates are a specific type of [element template](/components/concepts/element-templates.md). To manage them, see [the element templates documentation](/components/modeler/element-templates/about-templates.md). diff --git a/docs/components/connectors/out-of-the-box-connectors/agentic-ai-aiagent-tool-definitions.md b/docs/components/connectors/out-of-the-box-connectors/agentic-ai-aiagent-tool-definitions.md index eb9e1ed7085..bbdeb705e0b 100644 --- a/docs/components/connectors/out-of-the-box-connectors/agentic-ai-aiagent-tool-definitions.md +++ b/docs/components/connectors/out-of-the-box-connectors/agentic-ai-aiagent-tool-definitions.md @@ -198,7 +198,7 @@ When serializing the tool call response to JSON, document references are transfo Gateway tools are activities that expose multiple tools from an external source, such as an MCP server or an A2A agent. Unlike static tool definitions, gateway tools discover their available tools dynamically during agent initialization by calling the external source. -To configure an activity as a gateway tool, set the [extension property](../../modeler/element-templates/defining-templates.md#zeebeproperty) `io.camunda.agenticai.gateway.type` on the activity. The property value specifies which gateway implementation to use (for example, `mcpClient`). The agent must also have access to a handler for the specified gateway type. Custom implementations can be made available to the agent in self-managed or hybrid setups. +To configure an activity as a gateway tool, set the [extension property](../../modeler/element-templates/create/defining-templates.md) `io.camunda.agenticai.gateway.type` on the activity. The property value specifies which gateway implementation to use (for example, `mcpClient`). The agent must also have access to a handler for the specified gateway type. Custom implementations can be made available to the agent in self-managed or hybrid setups. For more details, see the available gateway tool implementations: diff --git a/docs/components/connectors/out-of-the-box-connectors/agentic-ai-mcp-client-tool-discovery.md b/docs/components/connectors/out-of-the-box-connectors/agentic-ai-mcp-client-tool-discovery.md index de2d315195e..1e434c1da9f 100644 --- a/docs/components/connectors/out-of-the-box-connectors/agentic-ai-mcp-client-tool-discovery.md +++ b/docs/components/connectors/out-of-the-box-connectors/agentic-ai-mcp-client-tool-discovery.md @@ -53,7 +53,7 @@ sequenceDiagram ## Tool discovery -To mark an activity tool as a gateway tool definition, the agent expects an [extension property](../../modeler/element-templates/defining-templates.md#zeebeproperty) named `io.camunda.agenticai.gateway.type` with the value `mcpClient`. This is automatically applied by the provided [MCP connectors](./agentic-ai-mcp-client-connector.md#mcp-connectors), but it also allows for more advanced use cases, such as tool calling with human-in-the-loop interaction, when added to other activities, like an intermediate event. +To mark an activity tool as a gateway tool definition, the agent expects an [extension property](../../modeler/element-templates/create/defining-templates.md#zeebeproperty) named `io.camunda.agenticai.gateway.type` with the value `mcpClient`. This is automatically applied by the provided [MCP connectors](./agentic-ai-mcp-client-connector.md#mcp-connectors), but it also allows for more advanced use cases, such as tool calling with human-in-the-loop interaction, when added to other activities, like an intermediate event. When the AI agent connector [resolves its available tools](./agentic-ai-aiagent-tool-definitions.md#tool-resolution), it also resolves gateway tool definitions. If required by the gateway tool type, it initiates a tool discovery feedback loop through the ad-hoc sub-process. diff --git a/docs/components/modeler/desktop-modeler/element-templates/using-templates.md b/docs/components/modeler/desktop-modeler/element-templates/using-templates.md deleted file mode 100644 index 89a800c82ba..00000000000 --- a/docs/components/modeler/desktop-modeler/element-templates/using-templates.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -id: using-templates -title: Using templates -description: "Learn how to apply, remove, update, and replace templates." ---- - -## Applying templates - -If an [element template](/components/modeler/element-templates/about-templates.md) matches a selected diagram element, the template catalog button is shown in the properties panel on the right side of the screen. - -![Template Chooser](./img/chooser.png) - -Clicking **Select** opens a modal menu, allowing you to browse and search available templates for the -selected element. - -![Modal Menu](./img/modal.png) - -Applying a template stores it via the `modelerTemplate` property and the optional `modelerTemplateVersion` property -on the selected element: - -```xml - - -``` - -It also sets up custom fields on the diagram element and makes these available for inspection and editing. -Properties which were not configured in the element template using custom fields will not be available for editing. - -## 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 reset all properties of the respective element. -- **Unlink**: Remove the element template from the `modelerTemplate` property but keep the properties which were set. - -![Unlink or Remove](./img/unlink-remove.png) - -## Updating templates - -If a template is applied and a new version of the template is found you can _update_ the template. - -![Update Template](./img/update-template.png) - -Templates are updated according to the following rules: - -- If the property is set in the new template, it will override the existing value — unless the value was originally set by the old template and has been manually changed since. -- If the property is not defined in the new template, it will unset. -- Sub-properties of complex properties (for example, `zeebe:input`, `zeebe:output`) are handled - according to these rules if they can be identified. - -### Replacing templates - -If a template is deprecated with a new element template and you want to keep the same input values as in the -deprecated template, you can: - -1. **Unlink**: Remove the current template that is deprecated from the `modelerTemplate` property, but keep the properties - which - were set. -2. **Select** and apply the new element template. - -## 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 is disabled. _Unlinking_ or _removing_ the template for the element or adding the element template config -enables the editing again. - -![Template not Found](./img/template-not-found.png) diff --git a/docs/components/modeler/desktop-modeler/install-the-modeler.md b/docs/components/modeler/desktop-modeler/install-the-modeler.md index d1284508a27..c67438ee521 100644 --- a/docs/components/modeler/desktop-modeler/install-the-modeler.md +++ b/docs/components/modeler/desktop-modeler/install-the-modeler.md @@ -4,6 +4,7 @@ title: Install Desktop Modeler sidebar_label: Installation description: "Learn how to install Camunda Desktop Modeler, a desktop application for modeling BPMN, DMN, and Forms and support building executable diagrams with Camunda." --- + import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; @@ -27,15 +28,19 @@ To install [Desktop Modeler](./index.md) for Windows, macOS, and Linux, visit th Ensure the installation is owned by `root` and accessible to all users of the machine by following the steps below. 1. Unpack the zip archive using the `tar` command: + ```shell cd /usr/bin sudo tar xvfz ~/Downloads/camunda-modeler-5.41.0-linux-x64.tar.gz ``` + 2. Ensure the access permissions of the `chrome-sandbox` file are correct and create a link to this version: + ```shell sudo chmod 4755 camunda-modeler-5.41.0-linux-x64/chrome-sandbox sudo ln -s camunda-modeler-5.41.0-linux-x64/camunda-modeler camunda-modeler ``` + ## Wire file associations diff --git a/docs/components/modeler/element-templates/about-templates.md b/docs/components/modeler/element-templates/about-templates.md index dabd0a43c8f..a44b4a785ef 100644 --- a/docs/components/modeler/element-templates/about-templates.md +++ b/docs/components/modeler/element-templates/about-templates.md @@ -1,27 +1,80 @@ --- id: about-templates -title: Element templates in Modeler -description: "Element templates can be used in Camunda Web Modeler and Desktop Modeler." +title: Element templates +description: Learn how element templates standardize BPMN elements in both Web Modeler and Desktop Modeler, enable reusable building blocks, and support consistent modeling. --- -:::note -Element templates are available only in BPMN diagrams. -::: +Element templates let you define reusable configurations for BPMN elements so modelers can apply consistent properties, behavior, and UI patterns across diagrams in both Web Modeler and Desktop Modeler. -Element templates let you extend [Modeler](https://camunda.org/bpmn/tool/) with domain-specific diagram elements, such as service and user tasks. +## What element templates are -## Creating and editing element templates +Element templates are JSON descriptors that standardize how a BPMN element behaves and appears in the properties panel. They define: -Element templates are defined in template descriptor files using JSON format. Connector templates are a specific type of element template. +- Which BPMN element types the template applies to +- Which fields appear in the properties panel and how they are validated +- How user inputs map to BPMN 2.0 XML and Camunda extension elements +- Default values, constraints, FEEL support, and optional fields +- Icons, descriptions, versioning, and compatibility information -You can edit element templates in any text editor or in Web Modeler's built-in template editor. Depending on the editor, the [JSON schema](defining-templates.md#json-schema-compatibility) may be recognized to provide additional editing support, such as formatting, code completion, and error highlighting. +Templates are stored and discovered differently in Web vs Desktop Modeler, but the JSON structure and behavior remain consistent. -To learn more about customizing your templates, see [defining templates](./defining-templates.md). +## Element templates and connector templates -## Next steps +A _connector template_ is a specific type of element template tailored for outbound or inbound connectors. Connector templates follow the same schema as element templates but typically bundle: -Read more about using element templates in Web and Desktop Modeler: +- Authentication fields +- Input/output mappings +- Required headers or task definitions +- Predefined runtime behaviors through the connector SDK -- [Using element templates in Web Modeler](/components/modeler/web-modeler/element-templates/using-templates.md) -- [Using element templates in Desktop Modeler](/components/modeler/desktop-modeler/element-templates/using-templates.md) -- [Element templates with dependencies](./element-template-with-dependencies.md) +Connector templates are discoverable as first-class resources in Web Modeler. In Desktop Modeler, they appear as regular element templates shipped with or added to the local installation. + +| Topic | Element template | Connector template | +| ------------------- | ------------------------------------------------- | ------------------------------------------------------- | +| Definition | Reusable configuration for any BPMN element | Element template specifically for an outbound connector | +| Used in | Web & Desktop Modeler | Web & Desktop Modeler | +| Runtime dependency | Optional | Always backed by a job worker or connector runtime | +| Behavior configured | Inputs, outputs, headers, properties, constraints | Inputs, outputs, authentication, connector operations | +| File form | JSON template | JSON template | +| Is subset? | Parent concept | Subset of element templates | + +## Where templates can be used + +Element templates are supported anywhere BPMN is modeled: + +- **Web Modeler**: Templates are managed, imported, published, and applied directly in the browser. Users can also create templates from existing properties. +- **Desktop Modeler**: Templates are read from local file system search paths and loaded at startup. + +Templates apply to BPMN elements such as tasks, events, subprocesses, gateways, call activities, and more. They cannot be used in non-BPMN diagrams. + +## Why use element templates + +Templates help you: + +- Improve modeling consistency across teams +- Reduce user error through validation and UI guidance +- Abstract complex technical mappings behind simple inputs +- Standardize connector usage, user task forms, decisions, or subprocess patterns +- Version configurations safely and support migration paths +- Reuse building blocks across diagrams and projects + +## How element templates fit into modeling + +When a user applies a template to a BPMN element: + +1. The template's metadata determines whether the element is eligible. +2. The properties panel switches to show only the fields defined in the template. +3. User inputs are validated and written to BPMN XML using template bindings. +4. The element is marked as using a specific template (and version, if defined). +5. If updated templates become available, Modeler can suggest upgrades. + +Templates do not execute anything themselves—they configure the BPMN model so the engine and connector runtimes behave correctly. + +## What’s next + +Use the navigation on the left to learn how to: + +- Apply templates in Web and Desktop Modeler +- Create, edit, and version template JSON +- Follow best practices for UI, naming, and field design +- Manage advanced use cases such as dependencies, resource binding, and CI/CD workflows diff --git a/docs/components/modeler/element-templates/additional-resources.md b/docs/components/modeler/element-templates/additional-resources.md deleted file mode 100644 index 0b576d74755..00000000000 --- a/docs/components/modeler/element-templates/additional-resources.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -id: additional-resources -title: Additional resources ---- - -Try playing around with custom elements and [our example templates](https://github.com/camunda/camunda-modeler/tree/master/resources/element-templates/cloud-samples.json). - -If you get stuck, ask for help in our [forums](https://forum.camunda.org/c/modeler). diff --git a/docs/components/modeler/element-templates/best-practices/contributor-guide.md b/docs/components/modeler/element-templates/best-practices/contributor-guide.md new file mode 100644 index 00000000000..07314a3e400 --- /dev/null +++ b/docs/components/modeler/element-templates/best-practices/contributor-guide.md @@ -0,0 +1,189 @@ +--- +id: contributor-guide +title: Contributor guide for element templates +description: Learn how to create, review, and maintain high-quality element templates as an internal or external contributor. +--- + +Use this guide to create, review, and maintain high-quality element templates for Web Modeler and Desktop Modeler. It applies to contributors building reusable templates for connectors, subprocesses, user tasks, and any other BPMN element type. + +## Who this guide is for + +This guide is designed for: + +- Template authors (internal and external) +- Connector developers +- Partner integrators +- Modeling experts maintaining shared libraries +- Community contributors + +## Before you start + +Before building or updating an element template: + +- Understand the use case and the target users. +- Confirm which BPMN element types the template applies to. +- Check for existing templates that may overlap with your contribution. +- Review the best practices and UI guidance (link where appropriate). +- Verify compatibility requirements (Camunda version, engine constraints). + +## Design principles + +High-quality templates follow these principles: + +- **Clarity:** Users should instantly understand what the template does. +- **Minimal configuration:** Ask for as little input as possible. +- **Convention over configuration:** Sensible defaults reduce user effort. +- **Predictability:** Applying or updating the template should never produce unexpected results. +- **Consistency:** Follow established naming, grouping, and behavior patterns. + +## Steps to create a template + +### 1. Define the scope + +Clarify: + +- What problem the template solves. +- Which BPMN element it targets. +- Whether the user needs to provide inputs or only reuse a preset configuration. +- Whether the template will be part of a connector, a reusable subprocess, or a domain-specific building block. + +### 2. Gather dependencies + +Identify all dependencies that the template requires, such as: + +- DMN decisions +- Subprocesses +- Forms +- RPA scripts +- Job workers +- Secrets + +Confirm that the necessary resources exist and are deployed (or will be deployed) where the template will run. + +### 3. Start from a blank or generated template + +Use one of the following: + +- Web Modeler → **Element template generator** +- Web Modeler → **Save as template** +- Desktop workflow → Create JSON manually + +For advanced templates, prefer starting from a minimal JSON skeleton to avoid unnecessary fields. + +### 4. Add metadata + +Include: + +- Name (sentence case) +- Description (concise and value-focused) +- Version (start at 1; increment on changes) +- Category (optional but recommended) +- Keywords (recommended for search) +- Icon (8 KB max, SVG preferred) + +### 5. Add properties + +Apply best practices: + +- Hide technical or static fields. +- Use dropdowns where appropriate. +- Add constraints for required fields. +- Use optional bindings for optional values. +- Follow consistent naming and grouping conventions. + +### 6. Validate JSON structure + +Check: + +- JSON schema compliance +- Group ordering that matches UI ordering +- FEEL variable references appear after their definitions +- No unused or redundant properties + +### 7. Test in Web Modeler + +Verify: + +- The template loads without errors. +- Applying the template configures the element correctly. +- Required fields show validation errors. +- Optional fields do not persist empty values. +- Hidden fields do not appear but produce correct BPMN XML. +- FEEL expressions resolve correctly. + +### 8. Test in Desktop Modeler (if applicable) + +For Desktop Modeler, ensure: + +- Templates load from the correct folder. +- Updating templates behaves consistently. +- Multi-template JSON files load and update correctly. + +## Contributor responsibilities + +A contributor should: + +- Follow naming, UI, and structural best practices. +- Ensure templates are maintainable long term. +- Use comments or documentationRef to explain non-obvious behaviors. +- Maintain backwards compatibility when updating existing templates. +- Increment version numbers when changes affect behavior. + +## Reviewer checklist + +When reviewing a template contribution, validate: + +- Metadata correctness (ID, name, version, category) +- Proper grouping and ordering +- Correct bindings (input/output/task headers/properties) +- Required fields marked with constraints +- Optional fields using optional bindings +- Hidden fields used appropriately +- FEEL expressions validated +- Icons properly sized and licensed +- Dependencies clearly explained +- Upgrade behavior (versioning) implemented +- JSON structure readable and consistent + +## Common pitfalls to avoid + +Avoid: + +- Requiring unnecessary user input. +- Exposing technical configuration fields. +- Hardcoding values that vary across environments. +- Storing secrets in plain text. +- Using ambiguous labels or placeholder text. +- Creating multiple templates that solve nearly the same problem. +- Forgetting to increment template versions. + +## Contribution workflow + +1. Fork the relevant repository or project. +2. Create or update the element template. +3. Validate with Web Modeler and Desktop Modeler (if applicable). +4. Add or update documentation and examples. +5. Include test scenarios or expected outcomes where useful. +6. Submit a pull request. +7. Respond to reviewer feedback. + +## Maintaining templates over time + +When evolving templates: + +- Do not change existing versions—create a new version instead. +- Provide changelog details in the description field. +- Maintain compatibility unless a breaking change is unavoidable. +- Align naming, grouping, and UX patterns across all templates in a library. +- Periodically review templates for outdated fields, dependencies, or defaults. + +## Summary + +Following these guidelines helps contributors: + +- Build templates that integrate smoothly with both Modelers. +- Reduce user confusion and support burden. +- Create reusable, maintainable, scalable building blocks. +- Improve consistency across the ecosystem. + +High-quality element templates enable teams to model faster, avoid errors, and share standardized building blocks across projects and organizations. diff --git a/docs/components/modeler/element-templates/best-practices/element-template-guidelines.md b/docs/components/modeler/element-templates/best-practices/element-template-guidelines.md new file mode 100644 index 00000000000..d1671d5627d --- /dev/null +++ b/docs/components/modeler/element-templates/best-practices/element-template-guidelines.md @@ -0,0 +1,214 @@ +--- +id: element-template-guidelines +title: Best practices for custom-built element templates +description: Learn the best practices for creating and managing custom-built element templates in Web Modeler and Desktop Modeler. +--- + +When creating custom-built element templates, use the following guidelines to ensure they are clear, maintainable, and provide a consistent modeling experience across Web Modeler and Desktop Modeler. + +:::note +Connector templates are a specific type of element template. +::: + +## Naming, description, and icon + +### Use sentence case + +- ❌ GitHub Webhook Intermediate Catch Event connector +- ✅ GitHub webhook intermediate catch event connector + +### Choosing a name + +Use a clear, easily understandable name. +Include the brand name if the template connects to a service; otherwise, describe its main feature. + +Names and descriptions appear in the template catalog and the properties panel. + +### Description + +Keep descriptions short, clear, and user-friendly. +Describe what the template does and why it is useful. + +## Icon + +- Prefer **SVG** format; PNG or JPEG is acceptable if necessary. +- Maximum size: **8 KB**. +- Recommended resolution for PNG/JPEG: **512×512 px**. +- Icons render at **18×18 px** on the canvas and **32×32 px** in the properties panel. +- Use an official logo where possible. +- Ensure licensing permits commercial use (Public Domain, CC0, or CC BY). + +## Properties panel UI + +Element templates define which fields appear and how they behave in the properties panel. Follow these guidelines to ensure clarity and consistency. + +### Property naming + +- Use readable, user-friendly labels. +- Use sentence case. +- Reserve technical identifiers for IDs within the JSON, not labels. + +Example: + +- ID: `addQueueItem` +- Label: + - ✅ Add queue item + - ❌ addQueueItem + +### Property description + +- Ensure accuracy. +- Provide short explanations. +- Use tooltips where appropriate. +- Link to external documentation when needed. + +Example: + +- ❌ “Your application's Client ID from the OAuth client.” +- ✅ “UIPath OAuth Client ID. Retrieve this value from your UIPath external apps configuration.” + +### Placeholders + +Use placeholders to show expected formats or examples. +Avoid repeating the label. + +### Variable naming + +Variables are internal to the template JSON and should follow: + +- **lower camelCase** +- No leading underscores (`_myVar` ❌) + +Method-specific exceptions may use underscores: + +- `chatCompletion_apiVersion` +- `completion_apiVersion` + +## Versioning + +If you plan to evolve a template, include a version number starting at `1`. + +```json +{ + "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", + "name": "My Connector", + "id": "org.my.connector", + "version": 1 +} +``` + +### Provide meaningful upgrade paths + +Updates should: + +- Preserve user-modified values where possible +- Apply new defaults only to untouched fields +- Remove obsolete fields automatically + +This ensures template evolution remains safe and predictable. + +## JSON structure + +- Structure the JSON in the same order fields appear in the UI. +- Keep hidden properties grouped logically. +- If a FEEL expression depends on variables, define the variables before the expression. + +## Secret handling + +- Never store secret values directly inside the template JSON. +- Use the platform’s secret-handling mechanisms. +- Bind fields to secrets according to connector rules. + +## Field types + +Use field types that match the input expectations and avoid unnecessary complexity for users. + +### Hidden vs. visible fields + +Make static or technical values hidden. + +Examples of fields that should typically be hidden: + +- HTTP method +- Static endpoint paths +- Static headers +- Runtime worker type +- Fixed version tags + +### Required vs. optional fields + +Use: + +- **Not empty constraint** → for required fields +- **Optional bindings** → to avoid persisting empty values in BPMN XML + +### Mandatory FEEL vs. optional FEEL + +- Require FEEL only when necessary. +- Optional FEEL can be used for flexible inputs. + +More information: [FEEL editor support](/components/modeler/element-templates/create/template-properties.md). + +### Free input vs. dropdown vs. constraints + +- Use dropdowns for predefined choices. +- Use free input with validation for flexible user-defined values. + +**Example:** + +```json +{ + "label": "Priority", + "id": "priority", + "group": "input", + "description": "The priority to apply to the queue item.", + "value": "Low", + "type": "Dropdown", + "choices": [ + { "name": "Low", "value": "Low" }, + { "name": "Normal", "value": "Normal" }, + { "name": "High", "value": "High" } + ], + "binding": { "type": "zeebe:input", "name": "priority0" }, + "condition": { "property": "operationType", "oneOf": ["addQueueItem"] } +} +``` + +## Accessibility and usability guidelines + +- Group related fields into clear sections (for example, **Request**, **Authentication**, **Advanced**). +- Use consistent naming across all templates. +- Avoid exposing technical runtime fields unless necessary. +- Provide tooltips for fields that require explanation. + +## Local development recommendations + +- Use a JSON-schema-aware editor (VS Code recommended). +- Validate against the element template schema. +- Test templates in both Web Modeler and Desktop Modeler when applicable. +- Use version control for template management. + +## QA guidelines + +Before publishing a template, verify: + +- Bindings generate correct BPMN or Zeebe extension elements. +- Required fields show proper validation. +- Optional properties do not persist empty values. +- FEEL behavior (required vs optional) is accurate. +- Hidden fields produce correct XML output. +- Versioning and upgrade paths function as expected. +- Dependencies (forms, DMN, subprocesses, secrets, job workers) exist and are accessible. +- The icon loads correctly. +- The properties panel is usable and logically organized. + +## Summary + +These guidelines help ensure that element templates: + +- Provide a consistent user experience +- Reduce modeling errors +- Are easy to maintain and evolve +- Work reliably across Web Modeler and Desktop Modeler + +Following these conventions supports high-quality, reusable building blocks across the Camunda ecosystem. diff --git a/docs/components/modeler/element-templates/best-practices/qa-checklist.md b/docs/components/modeler/element-templates/best-practices/qa-checklist.md new file mode 100644 index 00000000000..526626897a9 --- /dev/null +++ b/docs/components/modeler/element-templates/best-practices/qa-checklist.md @@ -0,0 +1,146 @@ +--- +id: qa-checklist +title: QA checklist for element templates +description: Validate correctness, usability, and compatibility of element templates before publishing. +--- + +Use this checklist to verify that an element template behaves correctly in both Web Modeler and Desktop Modeler. This list ensures template quality, reliability, and a consistent modeling experience. + +## Functional validation + +Confirm that the template: + +- Loads without errors in Web Modeler. +- Loads without errors in Desktop Modeler (if applicable). +- Applies to the correct BPMN element types defined under `appliesTo`. +- Correctly applies default values. +- Correctly replaces element types when `elementType` is used. +- Produces valid BPMN XML and Zeebe extension elements. + +## Binding verification + +Ensure that bindings: + +- Use the correct binding types (`zeebe:input`, `zeebe:output`, `zeebe:taskHeader`, etc.). +- Correctly map values to BPMN XML. +- Do not conflict with each other. +- Are not duplicated (duplicate bindings lead to undefined behavior). +- Respect required vs optional configuration (for example, `optional: true` removes empty values). + +Validate each binding type: + +- Inputs create `` elements. +- Outputs create `` elements. +- Headers produce correct `` entries. +- Properties map to the correct extension elements. +- Runtime configurations (`taskDefinition`, `userTask`, `formDefinition`, etc.) appear only when appropriate. + +## Field validation and behavior + +Check that: + +- Required fields use constraints such as `notEmpty`. +- Optional fields do not persist empty values. +- Dropdowns include valid `name/value` pairs. +- FEEL fields behave correctly (required vs optional vs static). +- Hidden fields do not appear in the UI but serialize correctly. +- Conditional fields appear or disappear based on referenced inputs. + +## UI and usability checks + +Confirm: + +- Fields appear in a logical order. +- Groups (if used) are clear, labeled, and expand correctly. +- Tooltips and descriptions are accurate. +- No technical fields are exposed accidentally. +- Placeholders are meaningful and match expected formats. +- Default values are sensible and domain-appropriate. +- The template icon loads correctly and is distinguishable in the selection modal. + +## Versioning and upgrade behavior + +Validate: + +- Template includes a `version` number. +- Upgrading from a previous version retains user-entered values when possible. +- New defaults apply only to fields the user has not modified. +- Deprecated or removed fields behave correctly and do not break existing diagrams. +- `id` + `version` match expected upgrade paths. + +## Dependency verification + +If the template relies on external resources: + +- Confirm DMN decisions exist and are deployed. +- Confirm subprocesses exist and match version tags. +- Confirm forms referenced by form definitions are available. +- Verify that worker types, secrets, or task types exist in the runtime environment. +- Ensure the binding type (`versionTag`, `latest`) is correct and intentional. + +## Metadata validation + +Check that template metadata: + +- Uses correct `$schema`. +- Defines `name`, `id`, and `version`. +- Includes a clear description. +- Uses keywords for better searchability. +- Uses a valid icon (small, optimized, supported format). +- Includes category, if applicable. + +## Error handling and resilience + +Validate that: + +- Invalid user input produces meaningful error messages. +- FEEL validation errors appear correctly in the Modeler. +- No hidden errors appear in the console. +- Templates with invalid fields fail gracefully and show warnings. + +## Cross-modeler compatibility + +If the template is expected to work in both Web and Desktop Modeler: + +- Confirm Web Modeler accepts the template schema without warnings. +- Confirm Desktop Modeler ignores unsupported schema fields gracefully. +- Validate differences in features (such as multi-template files vs Web Modeler’s one-template-per-file requirement). + +## Documentation and maintainability + +Verify: + +- Description is clear and helpful to end users. +- `documentationRef` is accurate if provided. +- JSON is formatted and structured consistently. +- Hidden fields are grouped logically. +- Comments (if included) are helpful and minimal. +- Template aligns with naming and UI conventions. + +## Final publishing checklist + +Before submitting or publishing: + +- [ ] Template schema validated successfully. +- [ ] Template loads and applies in Web Modeler. +- [ ] Template loads and applies in Desktop Modeler (if applicable). +- [ ] All bindings verified. +- [ ] All required fields validated. +- [ ] All FEEL editors behave correctly. +- [ ] Dependency resources confirmed. +- [ ] Versioning and upgrade path tested. +- [ ] Metadata correct and complete. +- [ ] Icon verified. +- [ ] Documentation or description updated. +- [ ] Peer review completed. + +## Summary + +Use this checklist to ensure that element templates: + +- Are stable and predictable. +- Provide a positive modeling experience. +- Interact correctly with BPMN and runtime components. +- Can be safely reused, upgraded, and scaled across teams. + +High-quality templates reduce modeling errors and support consistent process design across the Camunda ecosystem. diff --git a/docs/components/modeler/element-templates/best-practices/ui-guidance.md b/docs/components/modeler/element-templates/best-practices/ui-guidance.md new file mode 100644 index 00000000000..c68e51b8fbc --- /dev/null +++ b/docs/components/modeler/element-templates/best-practices/ui-guidance.md @@ -0,0 +1,182 @@ +--- +id: ui-guidance +title: UI guidance for element templates +description: Learn UI-focused best practices to design clear, consistent, and intuitive element templates across Web Modeler and Desktop Modeler. +--- + +Use these guidelines to design clear, consistent, and intuitive element templates in Modeler. + +## Provide a predictable user experience + +Users should always understand: + +- What each field does. +- Which fields are required. +- Which fields can be safely ignored. +- How updates affect existing configurations. + +Design templates so that applying or editing them feels consistent and intuitive. + +## Group fields into clear sections + +Group related fields into meaningful sections, such as: + +- **Authentication** +- **Request** +- **Response** +- **Error handling** +- **Advanced** + +Follow these guidelines: + +- Keep group names short and descriptive. +- Avoid placing more than five or six fields in one group where possible. +- Avoid unnecessary groups; only group when it improves clarity. + +## Use visible fields for user input only + +Use visible fields only when user input is required. + +Hide static or system-managed values, such as: + +- HTTP method. +- Fixed endpoint paths. +- Static headers. +- Runtime worker type. +- Fixed version tags. +- Internal or technical configuration values. + +Visible fields should contain user-facing information, not implementation details. + +## Choose appropriate input types + +### Dropdowns + +Use dropdowns when values are predictable or limited to a known list, such as: + +- Priority: Low, Normal, or High. +- Format: JSON or XML. +- Environment: Sandbox or production. + +### Free-text input + +Use free-text inputs when values must be flexible. + +Follow these rules: + +- Provide meaningful placeholders that indicate format or example input. +- Do not repeat the label as a placeholder. +- Use descriptions or tooltips if users need additional context. + +### FEEL input + +Require FEEL only when necessary, for example: + +- Dynamic or computed values. +- Expressions based on variables. + +Avoid FEEL for simple static inputs where a plain value is clearer. + +## Validate input and surface errors clearly + +### Required fields + +Use the **Not empty** constraint for required fields. Required inputs must: + +- Show clear validation errors. +- Include tooltips when needed. +- Explain why the field is required and how to fix the issue. + +### Optional fields + +Use **optional bindings** so empty values: + +- Are not persisted in BPMN XML. +- Do not clutter the properties panel. +- Do not confuse users with “empty but present” configuration. + +### Error messages + +Write actionable error messages: + +- ✅ “API key is required. Enter the secret name where the key is stored.” +- ❌ “Invalid value.” + +## Handle template application and updates carefully + +### Applying a template + +When a user applies a template: + +- Default values should populate automatically where helpful. +- Grouping should match the JSON structure. +- Hidden fields should not appear in the properties panel. + +### Updating to a new version + +When updating to a new version, ensure the UI behavior is predictable: + +- Preserve user-modified values wherever possible. +- Apply new defaults only to fields the user has not changed. +- Remove obsolete fields automatically. +- Clearly indicate when an update is available and what it changes. + +## Use icons consistently + +Follow these icon guidelines: + +- Prefer **SVG** icons. +- Keep file size under **8 KB**. +- Use minimum dimensions of **512 × 512 pixels**. +- Choose simple, recognizable symbols. +- Ensure licensing permits use of any brand or product logos. + +If no meaningful icon exists, use a neutral or generic glyph. + +## Improve accessibility and clarity + +To keep templates accessible and easy to understand: + +- Use sentence case for labels, group names, and descriptions. +- Keep labels short, descriptive, and jargon-free. +- Provide tooltips for fields that need additional explanation. +- Avoid relying on color alone to communicate meaning. +- Maintain consistent naming across templates (for example, “Result variable” vs. “ResultVariable”). + +## Example layout for a connector-style template + +A well-structured template might appear as: + +### Authentication + +- API key (required). +- API key header name. + +### Request + +- Endpoint URL. +- HTTP method (hidden with a fixed value). +- Custom headers (optional). + +### Response + +- Result variable. +- Error mapping (optional). + +### Advanced + +- Timeout (optional). +- Retry policy (optional). + +This structure separates essential configuration from advanced or technical options, reducing noise for most users. + +## Summary + +Following these UI guidelines helps element templates: + +- Provide a consistent modeling experience. +- Reduce user confusion and configuration errors. +- Remain maintainable as they evolve. +- Work well across Web Modeler and Desktop Modeler. + +Good UI design turns templates into reliable, reusable building blocks across the Camunda ecosystem. diff --git a/docs/components/modeler/element-templates/create/defining-templates.md b/docs/components/modeler/element-templates/create/defining-templates.md new file mode 100644 index 00000000000..899af04149f --- /dev/null +++ b/docs/components/modeler/element-templates/create/defining-templates.md @@ -0,0 +1,234 @@ +--- +id: defining-templates +title: Define element templates +description: Learn how to define element templates using the JSON schema, configure metadata, and structure editable properties for BPMN elements. +--- + +Define element templates using a JSON descriptor file that describes how the template behaves, how its fields appear in the properties panel, and how values map to BPMN XML. + +## Template structure + +An element template is a JSON object containing required and optional keys. Each key determines how the template is discovered, displayed, validated, or mapped to BPMN or Camunda extension elements. + +Element templates are validated against the element template JSON schema. Web Modeler displays errors directly in the template editor, and Desktop Modeler reports validation issues on load. + +## Required keys + +The following keys must be included: + +- **`$schema`**: URL pointing to the JSON schema. +- **`id`**: Unique identifier for the template. +- **`name`**: User-facing name displayed in Modeler. +- **`appliesTo`**: Array of BPMN element types the template can be applied to. +- **`properties`**: Array of property definitions exposed (or hidden) in the properties panel. + +### Example + +```json +{ + "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", + "id": "my.connector.example", + "name": "My example template", + "appliesTo": ["bpmn:ServiceTask"], + "properties": [] +} +``` + +## Optional keys + +Optional keys enhance usability, versioning, compatibility, or discoverability. + +These keys allow you to describe the template more clearly, support upgrades, group fields, or define compatibility rules. + +Common optional keys include: + +- **`version`**: Supports template versioning and upgrade paths. +- **`description`**: User-facing description shown in Modeler. +- **`keywords`**: Improves template searchability. +- **`category`**: Groups the template inside the selection dialog. +- **`documentationRef`**: URL to external documentation. +- **`icon`**: Icon displayed in the selection dialog and properties panel. +- **`engines`**: Compatibility with Camunda versions. +- **`elementType`**: Replaces the BPMN element type on apply. +- **`groups`**: Organizes property inputs into structured UI groups. +- **`deprecated`**: Marks the template as deprecated. + +See [template metadata](./template-metadata.md) for detailed descriptions. + +## Properties + +The `properties` array defines the fields shown in the properties panel after applying a template. Each property controls: + +- how the field appears in the UI +- whether the user can edit it +- how the value is validated +- how the value is written to BPMN XML + +Each property object can define: + +**Core fields** + +- `label`: User-facing field label +- `type`: Input type (`String`, `Dropdown`, `Boolean`, etc.) +- `value`: Default value +- `binding`: Required mapping that writes the value to BPMN XML + +**Optional fields** + +- `placeholder`: Helpful UI hint +- `editable`: Whether the user can modify the value +- `group`: UI grouping +- `constraints`: Validation rules +- `condition`: Determines when the field is shown +- `feel`: Whether FEEL expressions are supported +- `optional`: Prevents empty values from being persisted +- `generatedValue`: Automatically generated value + +Detailed definitions appear in [template properties](./template-properties.md). + +## Supported input types + +Templates support several property input types: + +- **String** +- **Text** +- **Number** +- **Boolean** +- **Dropdown** +- **Hidden** + +Each type changes how the field behaves in the properties panel. For example: + +- `Hidden` fields store technical values that should not be user-editable. +- `Dropdown` fields restrict users to predefined choices. +- `Boolean` fields appear as toggles or checkboxes. + +## Supported bindings + +Bindings determine how property values are written to BPMN or Camunda extension elements. + +Supported binding types include: + +- `zeebe:input` +- `zeebe:output` +- `zeebe:taskHeader` +- `zeebe:taskDefinition` +- `zeebe:property` +- `property` (BPMN attributes) +- `bpmn:Message#property` +- `bpmn:Message#zeebe:subscription#property` +- `bpmn:Signal#property` +- `zeebe:calledElement` +- `zeebe:userTask` +- `zeebe:formDefinition` +- `zeebe:assignmentDefinition` +- `zeebe:taskSchedule` +- `zeebe:priorityDefinition` +- `zeebe:calledDecision` +- `zeebe:script` +- `zeebe:adHoc` + +Each binding type has specific rules. See examples in [template properties](./template-properties.md). + +## Schema validation + +The `$schema` key determines which version of the element template schema is used. Modelers validate templates automatically: + +- **Web Modeler** supports only the latest schema version. +- **Desktop Modeler** supports older schema versions but may show warnings. + +Most modern text editors (including VS Code) automatically validate against the schema and provide autocomplete, highlighting, and error detection. + +:::info +If a template fails schema validation, Web Modeler will not load it. +::: + +## Element type and appliesTo + +The `appliesTo` key defines which BPMN element types a user may apply the template to. Common examples include: + +- `bpmn:Task` +- `bpmn:ServiceTask` +- `bpmn:UserTask` +- `bpmn:StartEvent` +- `bpmn:MessageEvent` + +If you want applying the template to automatically convert the BPMN element to a different type, you can define: + +```json +"elementType": { + "value": "bpmn:BusinessRuleTask" +} +``` + +This is useful when a user selects a generic task and the template needs it to become a more specific task type. + +## Defining multiple templates in a single file + +You may define multiple templates in one JSON file by placing them inside an array: + +```json +[ + { "id": "template.a", "name": "Template A", ... }, + { "id": "template.b", "name": "Template B", ... } +] +``` + +:::warning +This is supported only in **Desktop Modeler**. +Web Modeler requires **one template per file**. +::: + +## Editing templates + +You can edit templates in: + +- **Any text editor**, such as VS Code, IntelliJ, or WebStorm +- **Web Modeler’s built-in template editor**, which offers: + - JSON validation + - Live UI preview + - Error highlighting + - Schema-aware autocomplete + - Real-time binding checks + - Validation for unsupported or unknown fields + +The Web Modeler editor continuously validates templates to ensure they load correctly and can be applied without errors. + +## Example template + +A simple example showing common keys: + +```json +{ + "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", + "name": "Template 1", + "id": "sometemplate", + "description": "some description", + "keywords": ["search alias", "create action"], + "version": 1, + "engines": { + "camunda": "^8.6" + }, + "appliesTo": ["bpmn:Task"], + "elementType": { + "value": "bpmn:ServiceTask" + }, + "properties": [ + { + "label": "Input variable", + "type": "String", + "value": "myVariable", + "binding": { + "type": "zeebe:input", + "name": "anInputVariable" + } + } + ] +} +``` + +## Next steps + +- Explore advanced metadata options in [template metadata](./template-metadata.md). +- Review available property types and bindings in [template properties](./template-properties.md). +- Learn how to manage related resources in [element templates with dependencies](./element-templates-with-dependencies.md). diff --git a/docs/components/modeler/element-templates/create/element-templates-with-dependencies.md b/docs/components/modeler/element-templates/create/element-templates-with-dependencies.md new file mode 100644 index 00000000000..1247264fbf7 --- /dev/null +++ b/docs/components/modeler/element-templates/create/element-templates-with-dependencies.md @@ -0,0 +1,186 @@ +--- +id: element-templates-with-dependencies +title: Element templates with dependencies +description: "Learn how templates can depend on external resources such as processes, decisions, and forms, and how to manage those dependencies safely." +--- + +Element templates may depend on other resources—such as processes, forms, or decisions—when configuring tasks that call or reference external assets. + +This page explains how dependencies work, how to define them safely, and how to manage versioning using binding types. + +## When templates require dependencies + +Some BPMN elements reference external resources, and templates for those elements must include the correct metadata. Common examples include: + +- **Call activities** that invoke a sub-process or callable element. +- **Business rule tasks** that call DMN decisions. +- **User tasks** that reference form resources. +- **Script tasks** that depend on reusable expression logic. +- **Reusable sub-process patterns** that must bind to a specific version of a model. + +In these cases, templates help ensure consistent configuration and prevent designers from accidentally breaking integrations. + +## Specifying dependencies with bindings + +Templates reference external resources using specific bindings. Each binding maps UI fields to BPMN or Zeebe extension properties. + +### Example dependency bindings + +| Resource type | Binding type | +| -------------- | ---------------------- | +| Called process | `zeebe:calledElement` | +| Decision (DMN) | `zeebe:calledDecision` | +| Form | `zeebe:formDefinition` | + +Each binding requires its own set of properties, such as `processId`, `decisionId`, `formId`, or `versionTag`. + +### Example: A call activity referencing a sub-process + +```json +{ + "label": "Subprocess ID", + "type": "String", + "binding": { + "type": "zeebe:calledElement", + "property": "processId" + }, + "value": "invoice-process" +}, +{ + "type": "Hidden", + "value": "versionTag", + "binding": { + "type": "zeebe:calledElement", + "property": "bindingType" + } +}, +{ + "type": "Hidden", + "value": "v1", + "binding": { + "type": "zeebe:calledElement", + "property": "versionTag" + } +} +``` + +Here, the template ensures the call activity always invokes the correct subprocess version. + +## Why binding type matters + +Resource binding determines **which version** of a dependent resource is used at runtime. Camunda recommends using: + +- `versionTag` when stability and compatibility are important. +- `latest` only when you want the design to always use the newest deployable version—though this can break existing templates. + +Binding types help prevent scenarios where: + +- A process is updated but the template isn’t. +- Input/output mappings no longer match the updated resource. +- Designers unknowingly deploy incompatible versions. + +### Supported binding types + +- `"latest"` — always uses the newest deployed version +- `"version"` — pins an exact version number +- `"versionTag"` — uses a meaningful semantic tag such as `v1` or `stable` +- `"deployment"` — binds to resources deployed in the same deployment batch + +`versionTag` is preferred for most template authors because it provides a predictable upgrade path without forcing users into accidental breaking changes. + +## Versioning dependencies in templates + +When templates reference external resources, authors should: + +1. Assign a **template version** to track changes in dependency configuration. +2. Use **`versionTag`** for stable, tested resource references. +3. Create a **new template version** whenever a dependent resource changes. +4. Keep dependency metadata hidden unless users need to modify it. + +This enables editors to offer upgrade suggestions when a newer template version is available. + +### Example upgrade workflow + +| Scenario | Recommended action | +| --------------------------------------- | -------------------------------------------------------- | +| A DMN decision changes inputs/outputs | Create a new template version with a new versionTag | +| A form adds required fields | Update template mappings, release a new version | +| A subprocess changes expected variables | Update template bindings and mappings | +| A resource becomes deprecated | Add template deprecation metadata and link a replacement | + +## Hiding dependency configuration + +Technical bindings usually should not be changed by users. Use hidden fields to reduce mistakes and keep templates focused on meaningful inputs. + +```json +{ + "type": "Hidden", + "value": "v2", + "binding": { + "type": "zeebe:calledDecision", + "property": "versionTag" + } +} +``` + +Hidden metadata prevents misconfiguration while preserving stability. + +## Best practices for dependency management + +- **Use hidden fields** for dependency configuration (`ids`, `versionTag`, `bindingType`). +- **Prefer `versionTag` over `latest`** to avoid unintentional breaking changes. +- **Document dependencies clearly** using the template `description` or `documentationRef`. +- **Validate dependent resources** before publishing a template. +- **Create new template versions** rather than mutating old versions. +- **Ensure input/output mappings** match the latest definitions for dependent resources (forms, DMN decisions, subprocesses). +- **Avoid exposing technical fields** unless users genuinely need to configure them. + +## Example: Template depending on multiple resources + +```json +{ + "id": "invoiceAutomation", + "name": "Invoice Automation Task", + "appliesTo": ["bpmn:ServiceTask"], + "properties": [ + { + "label": "Decision ID", + "type": "String", + "binding": { + "type": "zeebe:calledDecision", + "property": "decisionId" + }, + "value": "invoice-decision" + }, + { + "type": "Hidden", + "value": "v3", + "binding": { + "type": "zeebe:calledDecision", + "property": "versionTag" + } + }, + { + "type": "Hidden", + "value": "http", + "binding": { + "type": "zeebe:taskDefinition", + "property": "type" + } + } + ] +} +``` + +This template: + +- Calls a DMN decision. +- Locks usage to decision version tag `v3`. +- Sets the technical task type using a hidden field. + +## Next steps + +- Learn how [template metadata](./template-metadata.md) works. +- Explore [property configuration](./template-properties.md). +- See a complete [working example](./template-example.md). +- Return to the [main overview](../about-templates.md). diff --git a/docs/components/modeler/element-templates/create/generate-element-template.md b/docs/components/modeler/element-templates/create/generate-element-template.md new file mode 100644 index 00000000000..61924e16419 --- /dev/null +++ b/docs/components/modeler/element-templates/create/generate-element-template.md @@ -0,0 +1,96 @@ +--- +id: generate-element-template +title: Generate an element template +description: Learn how to generate an element template using Web Modeler's template generator or by exporting templates from Desktop Modeler. +--- + +Generate element templates automatically to speed up template creation and reduce manual JSON editing. + +Web Modeler includes a built-in template generator, and Desktop Modeler allows exporting the current element configuration as a template file. + +## Generate a template in Web Modeler + +Web Modeler provides a built-in generator that produces a draft template based on a selected BPMN element. This is helpful when creating templates for existing connectors, service tasks, user tasks, or custom configurations. + +### How to generate a template + +1. Open your BPMN diagram in Web Modeler. +2. Select a BPMN element (for example, a service task). +3. Open the properties panel. +4. Navigate to the **Template** section. +5. Select **Generate template**. + +Web Modeler creates a new template file pre-filled with: + +- The element type +- Task headers +- Input and output mappings +- Form references +- Decision references +- Script expression bindings +- Hidden technical fields +- Any user-configured properties supported by the element template schema + +The generated template appears in the template editor, where you can customize metadata, groups, constraints, binding types, and visibility. + +### When to use generation vs. saving + +Web Modeler provides two related features: + +- **Save as template**: Captures _exactly_ what is currently configured on the element. +- **Generate template**: Produces a _schema-structured draft_ template that you can extend and refine. + +Use generation when you want a clean template scaffold with clear property definitions. +Use “Save as template” when you want to capture a fully configured element as-is. + +## Generate a template in Desktop Modeler + +Desktop Modeler does not include a template generator, but you can create templates by exporting the configuration of an existing BPMN element. + +### Export a template + +1. Select a BPMN element in your diagram. +2. Open the properties panel. +3. Select **Save as**. +4. Provide a name and metadata for your template. +5. Save the generated JSON file to: + - The local project directory (`.camunda/element-templates`), or + - The global template directory (`resources/element-templates`) + +This method creates a full template based on the element’s current configuration and is functionally similar to Web Modeler’s **Save as template** flow. + +## What is included in generated templates + +Both Web Modeler and Desktop Modeler create templates with: + +- BPMN element type +- Default values for supported fields +- Input and output mappings +- Task definition properties +- Form and decision bindings +- Job worker headers and metadata +- Supported BPMN properties such as message names, signal names, or script expressions +- Hidden static fields or generated values + +Generated templates always adhere to the element template JSON schema. + +For details, see: + +- [Template metadata](./template-metadata.md) +- [Template properties](./template-properties.md) + +## When generation is not available + +Generation may be unavailable if: + +- The element contains validation errors +- The element type does not support templates +- You do not have permission to create or edit templates +- You are not in implementation mode (Web Modeler only) + +If generation is unavailable, resolve any errors or verify the element type before trying again. + +## Next steps + +- Explore how to [define templates manually](./defining-templates.md) +- Review [best practices for creating templates](../best-practices/element-template-guidelines.md) diff --git a/docs/components/modeler/element-templates/create/template-example.md b/docs/components/modeler/element-templates/create/template-example.md new file mode 100644 index 00000000000..40220b742fa --- /dev/null +++ b/docs/components/modeler/element-templates/create/template-example.md @@ -0,0 +1,126 @@ +--- +id: template-example +title: Example element template +description: "A complete example showing how to define an element template, its fields, and how each field maps to BPMN XML." +--- + +This page shows a complete element template example and explains how each field is mapped to BPMN XML and Camunda extension elements. + +## REST connector template example + +The following JSON defines a simple template that configures a service task to call a REST API: + +```json +{ + "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", + "name": "REST connector", + "id": "io.camunda.examples.RestConnector", + "description": "A REST API invocation task.", + "appliesTo": ["bpmn:ServiceTask"], + "properties": [ + { + "type": "Hidden", + "value": "http", + "binding": { + "type": "zeebe:taskDefinition", + "property": "type" + } + }, + { + "label": "REST endpoint URL", + "description": "Specify the URL of the REST API.", + "type": "String", + "binding": { + "type": "zeebe:taskHeader", + "key": "url" + }, + "constraints": { + "notEmpty": true, + "pattern": { + "value": "^https?://.*", + "message": "Must be an http(s) URL." + } + } + }, + { + "label": "REST method", + "description": "Specify the HTTP method to use.", + "type": "Dropdown", + "value": "get", + "choices": [ + { "name": "GET", "value": "get" }, + { "name": "POST", "value": "post" }, + { "name": "PATCH", "value": "patch" }, + { "name": "DELETE", "value": "delete" } + ], + "binding": { + "type": "zeebe:taskHeader", + "key": "method" + } + }, + { + "label": "Request body", + "description": "Data to send to the endpoint.", + "value": "", + "type": "String", + "optional": true, + "binding": { + "type": "zeebe:input", + "name": "body" + } + }, + { + "label": "Result variable", + "description": "Name of variable to store the response data in.", + "value": "response", + "type": "String", + "optional": true, + "binding": { + "type": "zeebe:output", + "source": "= body" + } + } + ] +} +``` + +## How this example works + +This template defines five fields and maps each one to a specific BPMN or Zeebe extension: + +- **Task type**: A hidden property that sets the `zeebe:taskDefinition type` to `http`. This prevents users from altering the required job type. +- **REST endpoint URL**: Mapped to a task header named `url`, with validation to ensure it begins with `http://` or `https://`. +- **REST method**: Mapped to a task header named `method`, using a dropdown to limit available HTTP verbs. +- **Request body**: Mapped to a `zeebe:input` parameter named `body`. Because the field is marked as optional, nothing is persisted if left empty. +- **Result variable**: Mapped to a `zeebe:output` parameter so the response body is captured in a process variable. + +## Visual result + +When this template is applied to a service task, Modeler hides the technical configuration and surfaces only the user-editable fields. + +![Custom Fields](../img/overview.png) + +## Key concepts demonstrated + +This example highlights several core template techniques: + +- Hidden properties for technical configuration +- Validation constraints for user input +- Dropdown choices for structured input +- Optional fields that omit empty values in XML +- Input and output mappings for variable handling + +## When to use this example + +Use this example as a baseline when you need to: + +- Standardize how REST-based service tasks are configured +- Expose only safe, user-friendly fields to process designers +- Learn how UI fields translate into BPMN and Zeebe XML bindings + +## Next steps + +- Learn about [template metadata](./template-metadata.md). +- Explore how [properties work](./template-properties.md). +- [Understand dependencies](./element-templates-with-dependencies.md). +- Return to the [overview](../about-templates.md). diff --git a/docs/components/modeler/element-templates/create/template-metadata.md b/docs/components/modeler/element-templates/create/template-metadata.md new file mode 100644 index 00000000000..51d2d60a4f0 --- /dev/null +++ b/docs/components/modeler/element-templates/create/template-metadata.md @@ -0,0 +1,180 @@ +--- +id: template-metadata +title: Template metadata +description: Learn how to define identifiers, discoverability, compatibility, and type information for your element templates. +--- + +Element template metadata defines how a template is identified, displayed, categorized, and validated in the Modeler. Metadata also helps ensure compatibility across environments and supports versioning. + +## Identification: ID and version + +### `id` (required) + +A unique identifier for the template. + +- Must remain stable across versions. +- Changing the `id` creates a new template lineage. +- Use a reverse-DNS format when possible (for example, `com.example.myTemplate`). + +### `version` (optional) + +Defines a template version to support upgrade paths. + +- Must be an integer. +- Templates with the same `id` but different `version` values are considered different versions of the same template. +- Required if you want to allow updating applied templates. + +```json +{ + "id": "com.example.httpRequest", + "version": 2 +} +``` + +## Discoverability: name, description, keywords, icon, documentationRef, category + +### `name` (required) + +Human-friendly label shown in the selection menu and properties panel. + +- Use sentence case. +- Avoid technical identifiers in the name. + +### `description` (optional) + +Short explanation of what the template does and when to use it. + +- Keep concise. +- Avoid jargon. + +### keywords (optional) + +An array of search terms to improve discoverability. + +```json +"keywords": ["email", "notification", "smtp"] +``` + +Keywords are not shown in the UI but are included in search. + +### `icon` (optional) + +Defines the icon shown in the selection modal and properties panel. + +```json +"icon": { + "contents": "..." +} +``` + +For icon guidelines, see the best practices section. + +### `documentationRef` (optional) + +A URL pointing to external documentation. + +Displayed in the properties panel. + +```json +"documentationRef": "https://example.com/docs/send-email" +``` + +### `category` (optional) + +Groups templates in the selection modal under a labeled heading. + +```json +"category": { + "id": "messaging", + "label": "Messaging" +} +``` + +## Supported BPMN types: `appliesTo` and `elementType` + +### `appliesTo` (required) + +A list of BPMN element types the template can be applied to. + +```json +"appliesTo": ["bpmn:ServiceTask", "bpmn:Task"] +``` + +- `"bpmn:TimerEventDefinition"`: Use this value when you template a timer event. + +### `elementType` (optional) + +Defines which BPMN element type the element becomes when the template is applied. + +Useful when you want a generic task to become a more specific type, such as a service task. + +```json +"elementType": { + "value": "bpmn:ServiceTask" +} +``` + +## Engine compatibility + +### `engines` (optional) + +Specifies which environments and versions are compatible with the template. + +Use semantic version ranges. + +```json +"engines": { + "camunda": "^8.6" +} +``` + +If omitted, the template is assumed to be compatible with all supported versions. + +## Grouping properties + +### `groups` (optional) + +Defines sections in the properties panel, helping organize complex templates. + +```json +"groups": [ + { + "id": "authentication", + "label": "Authentication" + } +] +``` + +Assign properties to groups by referencing their `group` ID inside the property definition. + +## Putting metadata together + +Example template metadata block: + +```json +{ + "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", + "id": "com.example.sendEmail", + "name": "Send email", + "description": "Send an email using SMTP.", + "version": 1, + "keywords": ["email", "smtp"], + "category": { + "id": "messaging", + "label": "Messaging" + }, + "documentationRef": "https://example.com/docs/send-email", + "icon": { + "contents": "..." + }, + "appliesTo": ["bpmn:ServiceTask"], + "elementType": { "value": "bpmn:ServiceTask" }, + "engines": { "camunda": "^8.6" } +} +``` + +## Next steps + +- Define template behavior and user-facing fields in [template properties](./template-properties.md). +- Explore a [complete working example](./template-example.md). +- Learn how to handle external references and required resources in [element templates with dependencies](./element-templates-with-dependencies.md). diff --git a/docs/components/modeler/element-templates/template-properties.md b/docs/components/modeler/element-templates/create/template-properties.md similarity index 96% rename from docs/components/modeler/element-templates/template-properties.md rename to docs/components/modeler/element-templates/create/template-properties.md index d3e017c3d8d..7de54296675 100644 --- a/docs/components/modeler/element-templates/template-properties.md +++ b/docs/components/modeler/element-templates/create/template-properties.md @@ -155,7 +155,7 @@ The `Dropdown` type allows users to select from a number of pre-defined options The resulting properties panel control looks like this: -![properties panel drop down](./img/field-dropdown.png) +![properties panel drop down](../img/field-dropdown.png) ## Setting a default value: `value` @@ -304,7 +304,7 @@ Square brackets, `[]`, are used to indicate what the binding parameters are mapp | **Binding parameters** | `name`: The name of the input parameter | | **Mapping result** | `` | -Configures a [task header](../../bpmn/service-tasks/#task-headers). +Configures a [task header](/components/modeler/bpmn/service-tasks/service-tasks.md#task-headers). ```json { @@ -373,7 +373,7 @@ Configures a [task header](../../bpmn/service-tasks/#task-headers). | **Binding parameters** | `property`: The name of the task definition property. Can be `type` or `retries`. | | **Mapping result** | `` | -Configures the [task](../../bpmn/service-tasks/#task-definition) for a service or user task. +Configures the [task](/components/modeler/bpmn/service-tasks/service-tasks.md#task-definition) for a service or user task. ```json [ @@ -409,7 +409,7 @@ Configures the [task](../../bpmn/service-tasks/#task-definition) for a service o | **Binding parameters** | | | **Mapping result** | `` | -Configures the [task type](../../bpmn/service-tasks/#task-definition) for a service or user task. +Configures the [task type](/components/modeler/bpmn/service-tasks/service-tasks.md#task-definition) for a service or user task. ```json { @@ -563,7 +563,7 @@ This binding is only valid for templates of events with `bpmn:SignalEventDefinit | **Binding parameters** | `name`: The name of the property.
Supported properties: `timeDate`, `timeCycle`, and `timeDuration`. | | **Mapping result** | `[userInput]` | -The `bpmn:TimerEventDefinition#property` binding allows you to configure [timer event definitions](../../bpmn/timer-events/) for timer events. +The `bpmn:TimerEventDefinition#property` binding allows you to configure [timer event definitions](/components/modeler/bpmn/timer-events/timer-events.md) for timer events. This binding is only valid for templates of events with `bpmn:TimerEventDefinition` set via `elementType.eventDefinition`. Only one of `timeDate`, `timeCycle`, or `timeDuration` can be defined per template. @@ -599,7 +599,7 @@ Only one of `timeDate`, `timeCycle`, or `timeDuration` can be defined per templa | **Binding parameters** | `name`: The name of the property.
Supported property: `condition`. | | **Mapping result** | `[userInput]` | -The `bpmn:ConditionalEventDefinition#property` binding allows you to configure the condition expression for [conditional events](../../bpmn/conditional-events/). +The `bpmn:ConditionalEventDefinition#property` binding allows you to configure the condition expression for [conditional events](/components/modeler/bpmn/conditional-events/conditional-events.md). This binding is only valid for templates of events with `bpmn:ConditionalEventDefinition` set via `elementType.eventDefinition`. ```json @@ -627,7 +627,7 @@ The `condition` property requires a FEEL expression. When using `String` or `Tex | **Binding parameters** | `name`: The name of the property.
Supported properties: `variableEvents`. | | **Mapping result** | `` | -The `bpmn:ConditionalEventDefinition#zeebe:conditionalFilter#property` binding allows you to configure the conditional filter for [conditional events](../bpmn/conditional-events/conditional-events.md). The conditional filter controls which variable changes trigger the condition evaluation. +The `bpmn:ConditionalEventDefinition#zeebe:conditionalFilter#property` binding allows you to configure the conditional filter for [conditional events](/components/modeler/bpmn/conditional-events/conditional-events.md). The conditional filter controls which variable changes trigger the condition evaluation. ```json [ @@ -663,7 +663,7 @@ When `bpmn:ConditionalEventDefinition#zeebe:conditionalFilter#property` is used, The `zeebe:calledElement` binding allows you to configure a process called by a call activity. -You can set the value of the property `bindingType` to control the [resource binding type](../../../best-practices/modeling/choosing-the-resource-binding-type). +You can set the value of the property `bindingType` to control the [resource binding type](/components/best-practices/modeling/choosing-the-resource-binding-type.md). We recommend setting the property `bindingType` to the value `"versionTag"` and setting the property `versionTag` to the value of the version tag of the process you want to call. ```json @@ -754,9 +754,9 @@ The `zeebe:userTask` binding allows you to configure the implementation type for | **Binding parameters** | `property`: The name of the property.
Supported properties: `formId`, `externalReference`, `bindingType`, and `versionTag`. | | **Mapping result** | `` | -The `zeebe:formDefinition` binding allows you to configure the [user task form](../../bpmn/user-tasks/#user-task-forms) used by a user task. +The `zeebe:formDefinition` binding allows you to configure the [user task form](/components/modeler/bpmn/user-tasks/user-tasks.md#user-task-forms) used by a user task. -When setting the `formId` property, you can set the value of the property `bindingType` to control the [resource binding type](../../../best-practices/modeling/choosing-the-resource-binding-type). +When setting the `formId` property, you can set the value of the property `bindingType` to control the [resource binding type](/components/best-practices/modeling/choosing-the-resource-binding-type.md). We recommend setting the property `bindingType` to the value `"versionTag"` and setting the property `versionTag` to the value of the version tag of the form you want to link. @@ -806,7 +806,7 @@ The property `externalReference` cannot be used together with `bindingType`. | **Binding parameters** | `property`: The name of the property.
Supported properties: `assignee`, `candidateGroups`, and `candidateUsers`. | | **Mapping result** | `` | -The `zeebe:assignmentDefinition` binding allows you to configure the [user task assignment](../../bpmn/user-tasks/#assignments). +The `zeebe:assignmentDefinition` binding allows you to configure the [user task assignment](/components/modeler/bpmn/user-tasks/user-tasks.md#assignments). ```json [ @@ -852,7 +852,7 @@ When `zeebe:assignmentDefinition` is used, [`zeebe:userTask`](#user-task-impleme | **Binding parameters** | `property`: The name of the property.
Supported properties: `dueDate` and `followUpDate`. | | **Mapping result** | `` | -The `zeebe:taskSchedule` binding allows you to configure the [user task scheduling](../../bpmn/user-tasks/#scheduling). +The `zeebe:taskSchedule` binding allows you to configure the [user task scheduling](/components/modeler/bpmn/user-tasks/user-tasks.md#scheduling). ```json [ @@ -889,7 +889,7 @@ If the template sets a static `value` for `dueDate` or `followUpDate`, it must b | **Binding parameters** | `property`: The name of the property.
Supported property: `priority`. | | **Mapping result** | `` | -The `zeebe:priorityDefinition` binding allows you to configure the [user task priority](../../bpmn/user-tasks/#define-user-task-priority). +The `zeebe:priorityDefinition` binding allows you to configure the [user task priority](/components/modeler/bpmn/user-tasks/user-tasks.md#define-user-task-priority). ```json @@ -918,9 +918,9 @@ If the template sets a static `value` for `priority`, it must be between 0 and 1 | **Binding parameters** | `property`: The name of the property.
Supported properties: `decisionId`, `resultVariable`, `bindingType`, and `versionTag`. | | **Mapping result** | `` | -The `zeebe:calledDecision` binding allows you to configure the [called decision](../../bpmn/business-rule-tasks/#defining-a-task) used by a business rule task. +The `zeebe:calledDecision` binding allows you to configure the [called decision](/components/modeler/bpmn/business-rule-tasks/business-rule-tasks.md#defining-a-task) used by a business rule task. -You can set the value of the property `bindingType` to control the [resource binding type](../../../best-practices/modeling/choosing-the-resource-binding-type). +You can set the value of the property `bindingType` to control the [resource binding type](/components/best-practices/modeling/choosing-the-resource-binding-type.md). We recommend setting the property `bindingType` to the value `"versionTag"` and setting the property `versionTag` to the value of the version tag of the decision you want to call. @@ -974,7 +974,7 @@ When `zeebe:calledDecision` is used, `zeebe:taskDefinition` cannot be used on th | **Binding parameters** | `property`: The name of the property.
Supported properties: `expression` and `resultVariable`. | | **Mapping result** | `` | -The `zeebe:script` binding allows you to configure the [FEEL expression](../../bpmn/script-tasks/#defining-a-task) used by a script task. +The `zeebe:script` binding allows you to configure the [FEEL expression](/components/modeler/bpmn/script-tasks/script-tasks.md#defining-a-task) used by a script task. ```json [ @@ -1218,7 +1218,7 @@ As you can see in the example above, the properties `bindingType` and `versionTa This is because these properties should generally not be changed by the user, unless the template author has very good reasons to allow this. Should an update to the resource be necessary, you can create a new version of the template that uses a different version tag. -For further information, see the section on [element templates with dependencies](./element-template-with-dependencies.md). +For further information, see the section on [element templates with dependencies](./element-templates-with-dependencies.md). ## Preventing persisting empty values: `optional` diff --git a/docs/components/modeler/element-templates/defining-templates.md b/docs/components/modeler/element-templates/defining-templates.md deleted file mode 100644 index 1a73ef8203e..00000000000 --- a/docs/components/modeler/element-templates/defining-templates.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -id: defining-templates -title: Defining templates -description: "Learn how to define an element template" ---- - -An element template is defined in a template descriptor files as a JSON object. -The element template object is divided into required and optional key-value pairs: - -## Required keys - -- [`$schema : String`](./template-metadata.md#validation-schema): URI pointing towards the [JSON schema](https://json-schema.org/) which defines the structure of the element template `.json` file. Element template schemas are maintained in the [element templates JSON schema](https://github.com/camunda/element-templates-json-schema) repository. -- [`id : String`](./template-metadata.md#identification-id-and-version): Identifier of the template. -- [`name : String`](./template-metadata.md#discoverability-name-description-keywords-icon-documentationref-and-category): Name of the template. Shown in the element template selection modal and in the properties panel on the right side of the screen (after applying an element template). -- [`appliesTo : Array`](./template-metadata.md#supported-bpmn-types-appliesto-and-elementtype): List of BPMN element types the template can be applied to. -- [`properties : Array`](./template-properties.md): List of properties that the template applies to the BPMN element. Each property object defines the type of input and how its value is bound to a BPMN or Camunda extension property. - -## Optional keys - -- [`version : Integer`](./template-metadata.md#identification-id-and-version): Property to support template versioning and upgrading. If you add a version to a template, it is considered unique based on its ID and version. -- [`description : String`](./template-metadata.md#discoverability-name-description-keywords-icon-documentationref-and-category): Description of the template. Shown in the element template selection modal and in the properties panel (after applying an element template). -- [`keywords : Array`](./template-metadata.md#discoverability-name-description-keywords-icon-documentationref-and-category): List of keywords. Helps users find the template through search. Keywords are used for search and filtering but are not displayed in the UI. -- [`category : Object`](./template-metadata.md#discoverability-name-description-keywords-icon-documentationref-and-category): Category for the template. The template appears under the category name in the element template selection modal. -- [`documentationRef : String`](./template-metadata.md#discoverability-name-description-keywords-icon-documentationref-and-category): URL pointing to the template's documentation. Shown in the properties panel (after applying an element template). -- [`icon : Object`](./template-metadata.md#discoverability-name-description-keywords-icon-documentationref-and-category): Sets the template's icon. The icon is shown in the element template selection modal and in the properties panel (after applying an element template). -- [`engines : Object`](./template-metadata.md#engine-compatibility-engines): Dictionary of environments compatible with the template. The environment version is specified using a semantic version range. -- [`elementType : Object`](./template-metadata.md#supported-bpmn-types-appliesto-and-elementtype): Sets the type of the element. The element is replaced with the specified type when a user applies the template. -- [`groups : Object`](./template-metadata.md#grouping-properties-groups): Defines groups of property input fields. Groups are sections in the properties panel. Properties can be assigned a group. - -Some keys and values require other keys to be set. If your editor supports the [JSON schema](https://json-schema.org/), it will flag missing keys as errors. -The Web Modeler's editor will also show these errors in the template editor problems panel. - -Below you find a simple example of an element template with the most commonly used keys: - -```json -{ - "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", - "name": "Template 1", - "id": "sometemplate", - "description": "some description", - "keywords": ["search alias", "create action"], - "version": 1, - "engines": { - "camunda": "^8.6" - }, - "appliesTo": ["bpmn:Task"], - "elementType": { - "value": "bpmn:ServiceTask" - }, - "properties": [ - { - "label": "Input Variable", - "type": "String", - "value": "someProcessVariable", - "binding": { - "type": "zeebe:input", - "name": "anInputVariable" - } - } - ] -} -``` - -## Creating multiple templates in one file - -You can define multiple templates in one JSON file by wrapping them in an array. - -:::warning -This is a Desktop Modeler-specific feature. Web Modeler requires each template to be in a separate file. -::: - -```json -[ - { - ... - "name": "Template 1", - "id": "some-template-id", - "description": "some description", - ... - }, - { - ... - "name": "Template 2", - "id": "another-template-id", - "description": "another description", - ... - } -] -``` - -## Creating and editing templates - -You can create and edit element templates in the text editor of your choice. -Connector templates are a specific type of element template, so the same applies to them. -If your editor supports the [JSON schema](https://json-schema.org/), it will recognize the structure of the template and provide additional editing support, such as formatting, code completion, and error highlighting. - -The [Web Modeler](/components/connectors/manage-connector-templates.md) offers a built-in template editor with validation and error highlighting, as well as a live preview of the properties panel with the applied template. - -## Further reading - -For detailed information about specific aspects of template development, see: - -- **[Template metadata](./template-metadata.md)** - Learn more about template key-value pairs that help you version your template, make it discoverable, and allow you to define compatability. -- **[Template properties](./template-properties.md)** - The properties array is the heart of the element template. Here you can define what properties should be applied to the BPMN element and how these properties should be shown and validated in the properties panel. -- **[Example template](./template-example.md)** - A complete example showing how to create an element template. diff --git a/docs/components/modeler/element-templates/element-template-with-dependencies.md b/docs/components/modeler/element-templates/element-template-with-dependencies.md deleted file mode 100644 index 5c915dfe750..00000000000 --- a/docs/components/modeler/element-templates/element-template-with-dependencies.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: element-templates-with-dependencies -title: Element templates with dependencies -description: "Learn what you need to consider when handling template dependencies." ---- - -When creating element templates, you may want to link to a resource like a [form](/components/modeler/forms/camunda-forms-reference.md), or pre-populate a [secret](/components/connectors/use-connectors/index.md#using-secrets) expression. Your template might require a specific [job worker](/components/concepts/job-workers.md) to execute an action. These are all examples of dependencies. - -![Element template dependencies](./img/element-template-dependencies.png) - -Element templates can depend on: - -- [Camunda forms](/components/modeler/forms/camunda-forms-reference.md): used in user tasks. -- [RPA scripts](/components/rpa/overview.md): used in service tasks. -- [BPMN process](/components/modeler/bpmn/bpmn.md): used in a call activity. This may introduce nested dependencies (e.g., a called process may depend on other processes and/or resources). -- [DMN decisions](/components/modeler/dmn/dmn.md): used in business rule tasks. -- [Job workers](/components/concepts/job-workers.md): provide behavior for service tasks such as message send events, send tasks, service tasks, business rule tasks, or custom connector runtime. -- Secrets: used in connector elements to access sensitive values (see [secrets in self-managed](/self-managed/components/connectors/connectors-configuration.md#secrets) and [secrets in SaaS](/components/console/manage-clusters/manage-secrets.md)). - -To make a template available for use, complete two key steps: - -1. **Provision dependencies at runtime**: Make dependencies available in the clusters that need them. - - - For job workers, ensure the runtime is started and connected to the cluster (see [hosting custom connectors](/components/connectors/custom-built-connectors/host-custom-connector.md)). - - Secrets must be configured beforehand. - - Other dependency types (e.g., Camunda forms, RPA scripts, DMN decisions) need to be deployed to the cluster. - -2. **Make the template available at design time**: Ensure Web Modeler or Desktop Modeler can access the template for use in your projects. - -## Next steps - -- [Defining element templates](./defining-templates.md) -- [Publishing an element template in Web Modeler](/components/modeler/web-modeler/element-templates/manage-element-templates.md#publish-an-element-template) -- [Using element templates in Web Modeler](/components/modeler/web-modeler/element-templates/using-templates.md) -- [Configuring element templates in Desktop Modeler](/components/modeler/desktop-modeler/element-templates/configuring-templates.md) -- [Using element templates in Desktop Modeler](/components/modeler/desktop-modeler/element-templates/using-templates.md) diff --git a/docs/components/modeler/element-templates/getting-started/save-as-element-template.md b/docs/components/modeler/element-templates/getting-started/save-as-element-template.md new file mode 100644 index 00000000000..40c8110da52 --- /dev/null +++ b/docs/components/modeler/element-templates/getting-started/save-as-element-template.md @@ -0,0 +1,116 @@ +--- +id: save-as-element-template +title: Save an element as a reusable template +description: Learn how to save configured BPMN elements as reusable element templates in Web Modeler and Desktop Modeler. +--- + +Use the **Save as template** feature to convert a configured BPMN element into a reusable element template. This helps standardize modeling patterns and reduce repetitive configuration work. + +Both Web Modeler and Desktop Modeler support saving templates from an element's properties panel. + +## When you can save a template + +You can save a template when: + +- The BPMN element type supports element templates +- The element has no validation errors +- You have permission to create or upload templates +- You are in the correct editing mode (Web Modeler: implementation mode) + +You can also save a template from an element that already has a template applied, allowing you to version, extend, or modify existing template behavior. + +### Supported BPMN elements + +You can save templates for the following BPMN element types. + +**Tasks** + +- Manual task +- Call activity + +:::note +You cannot create a template for the [undefined task type](../../bpmn/undefined-tasks/undefined-tasks.mdx). +::: + +**Events** + +- Message events +- Signal events +- Timer events +- Conditional events + +## Save a template in Web Modeler + +To save a template from a BPMN element: + +1. Select the element in your diagram. +2. In the properties panel, select **Save as**. +3. Enter a template name and description. +4. Save the template to your project or organization workspace. +5. (Optional) Immediately edit the template in the built-in template editor. + +Saving a template automatically generates a template file containing all supported properties, mappings, headers, and configuration. + +### Save an already applied template in Web Modeler + +If an element already uses a template: + +1. Select the element. +2. Open the template section in the properties panel. +3. Select **Save as** to generate a _new_ template based on the currently applied and modified values. +4. Provide a new name, version, or category. + +This is useful when branching template variations or creating improved versions. + +## Save a template in Desktop Modeler + +Desktop Modeler allows you to export the current configuration of an element as a reusable JSON template file. + +1. Select the element. +2. In the properties panel, select **Save as**. +3. Provide the template metadata (name, description, categories). +4. Save the resulting JSON template file to: + - A local project template directory (`.camunda/element-templates`), or + - A global template directory (`resources/element-templates`) + +### Save an already applied template in Desktop Modeler + +If a template is applied to the element: + +1. Select **Save as**. +2. Desktop Modeler generates a new template based on the element’s current state, including any user-made changes. +3. Save the template under a new file name so it can be discovered as a separate template. + +## What is included when saving a template + +When you save a template from an element, the template generator captures all supported configuration: + +- Input and output mappings +- Task headers +- Job worker configuration +- Decision or process references +- Form references +- Message or signal metadata +- Element type and implementation +- Default values and hidden properties + +Unsupported or dynamic BPMN configuration remains visible in the properties panel after the template is applied. + +For details on supported fields, see [template properties](../create/template-properties.md). + +## Best practices when saving templates + +When creating templates from model elements: + +- Create focused, single-purpose templates +- Hide technical fields using the `Hidden` type +- Use constraints to validate user input +- Prefer version-tag bindings for external resources +- Use clear and descriptive template names +- Test the template by applying it to a new element + +## Next steps + +- Learn how to [use templates in Web Modeler](./using-templates-in-web-modeler.md) +- Learn how to [use templates in Desktop Modeler](./using-templates-in-desktop-modeler.md) +- Explore how to customize templates in [defining templates](../create/defining-templates.md) diff --git a/docs/components/modeler/element-templates/getting-started/using-templates-in-desktop-modeler.md b/docs/components/modeler/element-templates/getting-started/using-templates-in-desktop-modeler.md new file mode 100644 index 00000000000..595cd9684a7 --- /dev/null +++ b/docs/components/modeler/element-templates/getting-started/using-templates-in-desktop-modeler.md @@ -0,0 +1,73 @@ +--- +id: using-templates-in-desktop-modeler +title: Using templates in Desktop Modeler +description: Learn how to apply, remove, update, and replace element templates in Desktop Modeler. +--- + +Use element templates in Desktop Modeler to apply reusable configuration to BPMN elements. Templates help standardize modeling behavior and simplify complex input, output, and header mappings. + +## Apply a template + +When the selected BPMN element matches one or more available templates, the template catalog button appears in the properties panel. + +Click **Select** to open the template menu. From here, you can: + +- Browse available templates +- Search by name or keyword +- Review descriptions and categories + +When a template is applied, Desktop Modeler stores the template identifier (and version, if present) on the BPMN element and updates the properties panel to display the fields defined by the template. + +## Remove a template + +Desktop Modeler supports two removal options: + +- **Remove**: Removes the template and resets all properties associated with it. +- **Unlink**: Removes the template but retains the current property values on the element. + +Use Unlink if you want to keep existing values but detach the template. + +## Update a template + +If the applied template has a newer version available, Desktop Modeler provides an option to update it. + +Update behavior follows standard element template lifecycle rules: + +- Properties defined in the new version overwrite the old version unless the user has modified them. +- Properties removed from the new version are also removed from the element. +- Complex properties (such as input and output mappings) are migrated where identifiable. + +## Replace a deprecated template + +If a template has been deprecated and a new template should be used instead: + +1. Unlink the deprecated template to retain current values. +2. Apply the new template from the template catalog. + +This helps maintain continuity while adopting the updated template. + +## Handle missing templates + +If a BPMN element references a template that Desktop Modeler cannot find, the properties panel disables editing. + +To restore editing: + +- Unlink or remove the template, or +- Add the missing template file to a valid search path. + +Learn more about search paths in [configuring templates for Desktop Modeler](../../desktop-modeler/element-templates/configuring-templates.md). + +## Save an applied template + +If a BPMN element supports templating, Desktop Modeler displays a **Save as** option next to the element header. + +Using this function, you can: + +- Save the current element configuration as a reusable template +- Assign a name and description +- Store the template as a JSON file that can be reused locally or shared across projects + +## Next steps + +- Learn how to [use templates in Web Modeler](./using-templates-in-web-modeler.md) +- Understand the structure of template files in [defining templates](../create/defining-templates.md) diff --git a/docs/components/modeler/element-templates/getting-started/using-templates-in-web-modeler.md b/docs/components/modeler/element-templates/getting-started/using-templates-in-web-modeler.md new file mode 100644 index 00000000000..5db1fd1be7a --- /dev/null +++ b/docs/components/modeler/element-templates/getting-started/using-templates-in-web-modeler.md @@ -0,0 +1,79 @@ +--- +id: using-templates-in-web-modeler +title: Using templates in Web Modeler +description: Learn how to apply, update, replace, and remove element templates in Web Modeler, including how to manage missing templates and saved templates. +--- + +Use element templates in Web Modeler to apply reusable configurations to BPMN elements. Templates help you standardize modeling behavior, enforce validation rules, and simplify complex mappings. + +## Apply a template + +When a selected BPMN element matches one or more available templates, the properties panel displays a template catalog button. + +Click **Select** to browse templates that apply to the selected element. The template chooser allows you to: + +- Search and filter templates +- View categories, descriptions, and icons +- Open the Camunda Marketplace when available + +When you apply a template, Web Modeler adds the template identifier (and version, if present) to the BPMN XML. The properties panel then displays only the fields defined by the template. + +## Remove a template + +You can remove a template from an element using two actions: + +- **Unlink**: Removes the template but keeps the values currently set on the element. +- **Remove**: Removes the template and resets all properties associated with it. + +Use Unlink when you want to migrate or experiment without losing user-defined values. + +## Update a template + +If a newer version of a template is available, Web Modeler prompts you to update it. + +Update behavior follows these rules: + +- Values defined in the new template override the previous version unless explicitly changed by the user. +- Values removed in the new template are removed from the element. +- Sub-properties such as input and output mappings are updated when safely identifiable. + +Modeler preserves user-provided input whenever possible as part of the template evolution lifecycle. + +## Replace a deprecated template + +If the applied template has been deprecated and replaced by a newer template: + +1. Unlink the deprecated template to keep existing values. +2. Apply the new template from the catalog. + +This process helps maintain backward compatibility while adopting improved templates. + +## Handle missing templates + +If a BPMN element references a template that is not available in Web Modeler: + +- The properties panel disables editing. +- A notification appears indicating that the template is missing. + +To restore editing: + +- Unlink or remove the missing template, or +- Re-add the template by importing or publishing it at the project or organization level. + +## Save an applied template + +Web Modeler allows you to create a new element template from an already configured BPMN element. + +If the element supports templating, a **Save as template** option appears in the properties panel header. + +Saving an applied template allows you to: + +- Capture current properties as a reusable template +- Assign a name and description +- Publish the new template to a project or organization + +## Next steps + +- Learn how to [use templates in Desktop Modeler](./using-templates-in-desktop-modeler.md) +- Create or edit templates using the [Element Template Generator](../create/generate-element-template.md) +- Explore template metadata, properties, and schema in [defining templates](../create/defining-templates.md) diff --git a/docs/components/modeler/element-templates/sidebar-schema.js b/docs/components/modeler/element-templates/sidebar-schema.js index 6f6331f5ea1..be8b91c34bc 100644 --- a/docs/components/modeler/element-templates/sidebar-schema.js +++ b/docs/components/modeler/element-templates/sidebar-schema.js @@ -1,20 +1,53 @@ module.exports = { "Element templates": [ - "components/modeler/element-templates/about-templates", { type: "category", - label: "Defining templates", + label: "Element templates", link: { type: "doc", - id: "components/modeler/element-templates/defining-templates", + id: "components/modeler/element-templates/about-templates", }, items: [ - "components/modeler/element-templates/template-metadata", - "components/modeler/element-templates/template-properties", - "components/modeler/element-templates/template-example", + // Getting Started + { + type: "category", + label: "Getting started", + items: [ + "components/modeler/element-templates/getting-started/using-templates-in-web-modeler", + "components/modeler/element-templates/getting-started/using-templates-in-desktop-modeler", + "components/modeler/element-templates/getting-started/save-as-element-template", + ], + }, + + // Create templates + { + type: "category", + label: "Create templates", + link: { + type: "doc", + id: "components/modeler/element-templates/create/defining-templates", + }, + items: [ + "components/modeler/element-templates/create/generate-element-template", + "components/modeler/element-templates/create/template-metadata", + "components/modeler/element-templates/create/template-properties", + "components/modeler/element-templates/create/template-example", + "components/modeler/element-templates/create/element-templates-with-dependencies", + ], + }, + + // Best practices + { + type: "category", + label: "Best practices", + items: [ + "components/modeler/element-templates/best-practices/element-template-guidelines", + "components/modeler/element-templates/best-practices/ui-guidance", + "components/modeler/element-templates/best-practices/contributor-guide", + "components/modeler/element-templates/best-practices/qa-checklist", + ], + }, ], }, - "components/modeler/element-templates/element-templates-with-dependencies", - "components/modeler/element-templates/additional-resources", ], }; diff --git a/docs/components/modeler/element-templates/template-example.md b/docs/components/modeler/element-templates/template-example.md deleted file mode 100644 index 2753fd83352..00000000000 --- a/docs/components/modeler/element-templates/template-example.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -id: template-example -title: Example template -description: "A complete example showing how to create an element template." ---- - -This page provides a complete example of an element template that demonstrates how to define user-editable fields and their mapping to BPMN 2.0 XML and Camunda extension elements. - -## REST connector template - -Let us consider the following example that defines a template for invoking a REST API via a service task: - -```json -{ - "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", - "name": "REST connector", - "id": "io.camunda.examples.RestConnector", - "description": "A REST API invocation task.", - "appliesTo": ["bpmn:ServiceTask"], - "properties": [ - { - "type": "Hidden", - "value": "http", - "binding": { - "type": "zeebe:taskDefinition", - "property": "type" - } - }, - { - "label": "REST Endpoint URL", - "description": "Specify the url of the REST API to talk to.", - "type": "String", - "binding": { - "type": "zeebe:taskHeader", - "key": "url" - }, - "constraints": { - "notEmpty": true, - "pattern": { - "value": "^https?://.*", - "message": "Must be http(s) URL." - } - } - }, - { - "label": "REST Method", - "description": "Specify the HTTP method to use.", - "type": "Dropdown", - "value": "get", - "choices": [ - { "name": "GET", "value": "get" }, - { "name": "POST", "value": "post" }, - { "name": "PATCH", "value": "patch" }, - { "name": "DELETE", "value": "delete" } - ], - "binding": { - "type": "zeebe:taskHeader", - "key": "method" - } - }, - { - "label": "Request Body", - "description": "Data to send to the endpoint.", - "value": "", - "type": "String", - "optional": true, - "binding": { - "type": "zeebe:input", - "name": "body" - } - }, - { - "label": "Result Variable", - "description": "Name of variable to store the response data in.", - "value": "response", - "type": "String", - "optional": true, - "binding": { - "type": "zeebe:output", - "source": "= body" - } - } - ] -} -``` - -## How the example works - -The example defines five custom fields, each mapped to different technical properties: - -- **Task type**: The value `http` is mapped to the `type` property of a `zeebe:taskDefinition` element in BPMN 2.0 XML. This field is hidden from users since it's a technical requirement. -- **REST Endpoint URL**: Mapped to a `task header` with the key `url`. This field includes validation to ensure it's a valid HTTP(S) URL. -- **REST Method**: Mapped to a `task header` with the key `method`. Uses a dropdown to provide predefined HTTP method options. -- **Request Body**: Mapped to a local variable via an `input parameter` named `body`. This field is optional, so it won't appear in the XML if left empty. -- **Result Variable**: Mapped into a process variable via an `output parameter`. The response data will be stored in the specified variable name. - -## Visual result - -The task type is hidden to the user, as it is a technical implementation detail. -The other properties specified in the template can be edited through the properties panel after the user has applied the template as shown in the following screenshot: - -![Custom Fields](./img/overview.png) - -## Key concepts demonstrated - -This example showcases several important template features: - -- **Hidden properties**: Setting technical values that users shouldn't modify. -- **Input validation**: Using constraints to ensure valid URLs. -- **Dropdown choices**: Providing predefined options for user selection. -- **Optional bindings**: Fields that don't persist empty values in the XML. -- **Variable mapping**: How to map data between the process and external systems. - -You can use this example as a starting point for creating your own element templates. diff --git a/docs/components/modeler/element-templates/template-metadata.md b/docs/components/modeler/element-templates/template-metadata.md deleted file mode 100644 index 061dd37a1e2..00000000000 --- a/docs/components/modeler/element-templates/template-metadata.md +++ /dev/null @@ -1,275 +0,0 @@ ---- -id: template-metadata -title: Template metadata -description: "Learn about template metadata fields like name, ID, description, keywords, versioning, and JSON schema compatibility." ---- - -The metadata of an element template contains important information about the template itself, such as its name, description, version, compatibility with different Camunda versions, and the schema that is used to validate the template. - -## Validation: `$schema` - -`$schema` is a required key-value pair and must be set. - -The application uses the `$schema` property to ensure compatibility for a given element template. You can find [the latest supported versions here](https://www.npmjs.com/package/@camunda/zeebe-element-templates-json-schema). - -The JSON schema versioning is backward-compatible, meaning that all versions including or below the current one are supported. - -:::info -The Web Modeler only supports element templates pointing to the latest schema version: `https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json` -::: - -The Desktop Modeler ignores element templates defining a higher `$schema` version and logs a warning message. - -For example, given the following `$schema` definition, the application takes `0.9.1` as the JSON schema version of the element template: - -```json -{ - "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema@0.9.1/resources/schema.json", - ... -} -``` - -## Identification: `id` and `version` - -- `id : String` is a required key and must be set. -- `version : Integer` is optional but Camunda strongly recommends setting it. - -The `id` key defines the identifier of the template. -If no `version` is set, templates with the same `id` are regarded as equal, independent of their other key-value pairs. -If `version` is set, the modeler treats templates with the same `id ` and `version` as identical, independent of their other key-value pairs. -Thus, if you plan to make any changes to your template and want to support [template evolution](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#overview), maintain a `version` key-value pair on your template. -Templates with the same `id` and different `version` values offer an upgrade path. - -```json -{ - "id": "sometemplate", - "version": 1, - ... -} -``` - -Once a template with a new `version` is available to users, the editor tooling suggests an upgrade, [preserving element configurations](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#upgrade-behavior) on a best-effort basis. - -:::tip -Versioning is an important cornerstone of template evolution. Review the [upstream documentation](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#overview) to understand the foundations of our upgrade mechanism and of the element template lifecycle. -::: - -## Discoverability: `name`, `description`, `keywords`, `icon`, `documentationRef`, and `category` - -- `name` is a required key and must be set. -- `description`, `keywords`, `icon`, `documentationRef`, and `category` are optional key-value pairs. - -These keys define the user-facing metadata of the template. They help the template users to discover and understand the purpose of the template. -They are shown when selecting a template and when the template has been applied to an element. - -- `name : String` defines the name of the template. -- `description : String` provides additional information about the template. -- `keywords : Array` list of keywords that can help users find this template. Keywords are used for search and filtering but are not displayed in the UI. -- `icon : Object` defines the templates icon. The icon contents must be a valid [data](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) or HTTP(s) URL. We recommend using square icons as they are rendered at 18x18 pixels on the canvas and 32x32 pixels in the properties panel. -- `documentationRef : String` URL pointing to the template's documentation. It is shown in the properties panel. -- `category : Object` defines a category used to group templates in the element template selection list. If not defined, the template will be displayed in the **Templates** section. - - `id : String` required key that defines the unique identifier of the category. - - `name : String` required key that defines the name of the category that the template is shown in. - -It is generally a good idea to provide a proper description of you template. This helps users to understand the purpose of the template and how to use it. -In case you require more space to explain the template, you can also provide a `documentationRef` pointing to a more detailed documentation page. -This is particularly useful for templates that require external dependencies, such as custom connector implementations. - -Another good practice is to use a custom icon for your template. This helps users to quickly identify the template in the selection modal and in the properties panel. -If you use the Web Modeler's element template editor, you can upload an image and Web Modeler will take care of encoding it as a data URL. - -```json -{ - ..., - "name": "Template 1", - "description": "some description", - "keywords": [ - "search alias", - "create action" - ], - "icon": { - "contents": "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22' fill='none'%3E%3Ccircle cx='11' cy='11' r='9' fill='black'/%3E%3Ctext x='6.9' y='14.9' fill='white' style='font-family: Arial; font-size: 10px;'%3EM%3C/text%3E%3C/svg%3E" - }, - "documentationRef": "https://example.com/docs/template-1", - "category": { - "id": "custom-templates", - "name": "Custom Templates" - }, - ... -} -``` - -## Engine compatibility: `engines` - -- `engines : Object` is an optional key-value pair. - - `camunda : SemanticVersion` is an optional key to define compatibility with Camunda Orchestration Cluster Versions. - - `camundaDesktopModeler : SemanticVersion` is an optional key to define compatibility with Desktop Modeler versions. - - `camundaWebModeler : SemanticVersion` is an optional key to define compatibility with Web Modeler versions. - -Define [template compatibility](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#compatibility) with execution platforms (Camunda Orchestration Cluster versions) and related components (such as Web Modeler) using the `engines` key. - -This key has a dictionary object as its value, where the execution platform names are the keys, and the [semantic version](https://semver.org/) ranges are the values. - -For example, the following `engines` definition specifies that the template is compatible with Camunda 8.6 or higher. - -```json -{ - ..., - "engines": { - "camunda": ">8.5" - } -} -``` - -Compatibility is only validated if the platform version is provided by both the template and the modeler. -In the example below, the template is compatible with the specified versions of both Desktop and Web Modeler, but it requires Camunda version 8.6 or higher for both: - -```json -{ - ..., - "engines": { - "camunda": ">8.5", - "camundaDesktopModeler": ">=5.30", - "camundaWebModeler": "^8.5.5" - } -} -``` - -You can also use this feature to explicitly specify a template's incompatibility with a platform. For instance, the following template is incompatible with all versions of Web Modeler: - -```json -{ - ..., - "engines": { - "camundaWebModeler": "0" - } -} -``` - -If no `engines` are specified, a template is considered compatible with any execution platform version. - -:::tip -Review the [upstream documentation](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#overview) to learn more about template evolution and the template lifecycle. -::: - -## Supported BPMN types: `appliesTo` and `elementType` - -- `appliesTo` is a required key and must be set. -- `elementType` is an optional key that can be required under some circumstances, see below for more information. - -These two key-value pairs define what BPMN types the template can be applied to (`appliesTo`) and whether the element is replaced with a different type when the template is applied (`elementType`). - -- `appliesTo : Array`: specifies the BPMN types the template can be applied to. The template will only be selectable for these types of elements in the modeler. Currently, element templates may be used on the following BPMN elements: - - `bpmn:Activity` (including user tasks, service tasks, call activities, ad-hoc subprocesses, and others) - - `bpmn:SequenceFlow` (for maintaining `condition`) - - `bpmn:Process` - - `bpmn:Event` -- `elementType : Object`: If you configure `elementType` on a template, the element is replaced with the specified type when a user applies the template. - - `value : String`: Is a required key. The BPMN element is changed to this type the template is applied. - - `eventDefinition: String`: This key is used when templating an event. It can be ignored when templating any other element type. Supported values are: - - `"bpmn:MessageEventDefinition"` use this value when you template a message event. - - `"bpmn:SignalEventDefinition"` use this value when you template a signal event. - - `"bpmn:TimerEventDefinition"` use this value when you template a timer event. - -Some properties require a specific BPMN type, and thus a specific value for `elementType`, to work correctly. -For example, if the template sets `zeebe:calledDecision` on an element and `appliesTo` is set to `bpmn:Task`, the `elementType` must be set to `bpmn:BusinessRuleTask`. -These constraints are checked based on the [element template schema](./template-metadata.md#validation-schema) by your editor (if it supports JSON schema) and by the modeler when it loads the templates. - -```json -{ - ..., - "appliesTo": [ - "bpmn:Task" - ], - "elementType": { - "value": "bpmn:ServiceTask" - } -} -``` - -## Grouping properties: `groups` - -- `groups` is an optional key. - -You can define `groups` to organize custom fields into. The fields will be shown in their assigned group in the properties panel. -You can also specify whether a group is expanded or collapsed by default. This helps you to highlight important fields and to reduce visual clutter. - -Groups can have the following attributes: - -- `id : String`: Unique identifier of the group -- `label : String`: Label of the group -- `tooltip : String`: Tooltip for the group (optional) -- `openByDefault : Boolean`: Whether the group will be expanded in the properties panel (optional, default: `false`) - -A property can be assigned to a group by setting the [`group` key](./template-properties.md#grouping-fields-group) to the group's `id` value. - -```json -{ - ..., - "groups": [ - { - "id": "definition", - "label": "Task definition", - "openByDefault": true - }, - { - "id": "request", - "label": "Request payload" - }, - { - "id": "result", - "label": "Result mapping" - }, - { - "id": "authentication", - "label": "Authentication", - "tooltip": "Optional authentication settings" - } - ], - "properties": [ - ... - ] -} -``` - -## Deprecating a template: `deprecated` - -- `deprecated` is an optional key. - -Use `deprecated` to mark a [template as deprecated](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#deprecation). - -:::info -By deprecating an element template, you prevent its _future use_. Users will no longer see the template when choosing a template, changing an element's type, or creating a new element. Existing uses continue to work, with a deprecation hint shown in the modeler UI. -::: - -The `deprecated` property can be an object or a boolean. If an object, it has the following attributes: - -- `message: String`: A message to display to the user -- `documentationRef : String`: A link to documentation, i.e., to describe upgrade migration procedures - -This information allows users to make sense of the deprecation and understand how to migrate to an undeprecated template: - -```json -{ - ..., - "deprecated": { - "message": "Migrate to My Other Custom Task", - "documentationRef": "https://localhost/migrate-to-other" - }, - ... -} -``` - -When `deprecated` is a boolean (`true`), a deprecation hint appears in the properties panel without further help for the user: - -```json -{ - ..., - "deprecated": true, - ... -} -``` - -:::tip -Review the [upstream documentation](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#overview) to learn more about template evolution and the template lifecycle. -::: diff --git a/docs/components/modeler/using-web-and-desktop-modeler-together.md b/docs/components/modeler/using-web-and-desktop-modeler-together.md index 3408f31cb35..432711e5ffa 100644 --- a/docs/components/modeler/using-web-and-desktop-modeler-together.md +++ b/docs/components/modeler/using-web-and-desktop-modeler-together.md @@ -66,9 +66,9 @@ Camunda recommends storing shared templates in a separate repository: ### Handling multiple template versions -| Desktop Modeler | Web Modeler | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Detects versions based on separate files. To support multiple versions, maintain different files with distinct names (e.g., `element-template-v1.json`, `element-template-v2.json`). Otherwise, templates may appear as [missing](/components/modeler/desktop-modeler/element-templates/using-templates.md#missing-templates). | Supports evolving a single template file. Simply update the file and [publish](/components/connectors/manage-connector-templates.md#manage-published-connector-templates) new [versions](/components/modeler/element-templates/defining-templates.md#template-versioning). | +| Desktop Modeler | Web Modeler | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Detects versions based on separate files. To support multiple versions, maintain different files with distinct names (e.g., `element-template-v1.json`, `element-template-v2.json`). Otherwise, templates may appear as [missing](/components/modeler/desktop-modeler/element-templates/configuring-templates.md). | Supports evolving a single template file. Simply update the file and [publish](/components/connectors/manage-connector-templates.md#manage-published-connector-templates) new [versions](/components/modeler/element-templates/create/defining-templates.md#template-versioning). | :::warning @@ -89,6 +89,6 @@ Yes. Camunda recommends maintaining a dedicated version control repository for e ### How should I manage multiple versions of the same element template? -In Desktop Modeler, each version of the element template must be present. Versions can be stored in a single file as a list of element templates or in separate files (for example, `element-template-v1.json` and `element-template-v2.json`). Otherwise, the template will appear as [missing](/components/modeler/desktop-modeler/element-templates/using-templates.md#missing-templates). Web Modeler, however, supports [versioning](/components/modeler/element-templates/defining-templates.md#template-versioning) in a single file and allows you to [publish](/components/connectors/manage-connector-templates.md#manage-published-connector-templates) new versions directly. +In Desktop Modeler, each version of the element template must be present. Versions can be stored in a single file as a list of element templates or in separate files (for example, `element-template-v1.json` and `element-template-v2.json`). Otherwise, the template will appear as [missing](/components/modeler/desktop-modeler/element-templates/configuring-templates.md). Web Modeler, however, supports [versioning](/components/modeler/element-templates/create/defining-templates.md) in a single file and allows you to [publish](/components/connectors/manage-connector-templates.md#manage-published-connector-templates) new versions directly. When referencing a dependency such as a form we recommend using a `versionTag` as your [binding type](/components/best-practices/modeling/choosing-the-resource-binding-type.md#supported-binding-types), as this option ensures that the right version of the target resource is always used. diff --git a/docs/components/modeler/web-modeler/element-templates/best-practices.md b/docs/components/modeler/web-modeler/element-templates/best-practices.md deleted file mode 100644 index 2e573b683f2..00000000000 --- a/docs/components/modeler/web-modeler/element-templates/best-practices.md +++ /dev/null @@ -1,170 +0,0 @@ ---- -id: best-practices -title: Best practices for custom-built element templates -description: Learn the best practices for creating and managing custom-built element templates in Web Modeler. ---- - -When creating custom-built element templates, consider the following best practices to ensure they are effective, user-friendly, and maintainable. - -:::note -Connector templates are a specific type of [element template](/components/concepts/element-templates.md). -::: - -## Naming, description, and icon - -### Sentence case - -Use sentence case when naming element and connector templates. - -For example: - -- ❌ GitHub Webhook Intermediate Catch Event connector -- ✅ GitHub webhook intermediate catch event connector - -### Choosing a name - -Choose a clear, easily understandable name. Include the brand name if the template connects to a service or tool; otherwise, describe its main feature. -The template's name and description appear in the Modeler element template list and properties panel. - -### Description - -Keep descriptions brief and clear. Explain what the template does and why it’s helpful in a couple of lines. Avoid technical jargon or complex language. - -## Icon - -- **Prefer SVG format:** Use SVG files for icons, as they are scalable without losing quality. If an SVG icon isn't available, PNG or JPEG format is acceptable, but may not display well. -- **Size:** You can upload an image file with a maximum size of **8 KB**. If you need to use a PNG or JPEG icon, ensure it is **512x512** pixels. Icons appear as **18x18** pixels in the element on the modeling canvas, and as **32x32** pixels in the properties panel. -- **Check for official logo:** If the template connects to a service or tool, look for an official logo on the service's or tool's website. -- **License compliance:** Ensure icons have the appropriate license (Public Domain CC0 or Creative Commons CC BY) for commercial use. - -## Properties panel UI - -The element template defines interaction methods, visible and hidden entries, and mandatory fields, which are reflected in the Modeler properties panel UI. Follow these guidelines for a consistent user experience. - -### Property naming - -- Use readable property names instead of technical identifiers. -- Use sentence case. -- Align operation or property IDs with Java method naming conventions (IDs are referenced in the template code, not displayed). - -Example: - -- ID aligned with Java method: `addQueueItem` -- Label: - - ✅ Add queue item - - ❌ addQueueItem - -### Property description - -- Ensure accuracy in property descriptions. -- Use tooltips for brief explanations. -- Link to relevant documentation for detailed explanations. - -Example: - -- ❌ "Your application's Client ID from the OAuth client." -- ✅ "UIPath OAuth Client ID: Retrieve from UIPath external apps configuration." - -### Placeholders - -- Placeholders appear as lighter text inside input fields. Use them to indicate the expected format or example input. -- Avoid placeholders that duplicate the label. -- Ensure placeholders are understandable and helpful. - -### Variable naming - -Variables are not displayed in the properties panel but are referenced inside the template code. - -**General rule:** Use lower camel case (start lowercase, capitalize subsequent words). Avoid starting variables with underscores ("\_"). - -Example: - -- ❌ \_MyTestVariable -- ✅ myTestVariable - -**Exception for method-specific properties:** Underscores may separate the method indication from the property name. - -Example: - -- ✅ chatCompletion_apiVersion -- ✅ completion_apiVersion - -### Versioning - -If you plan to make changes to your template over time and want to support [template evolution](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#overview), include a version number property in your template, starting from 1. Templates with the same ID and different version values offer an upgrade path. - -```json -{ - "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json", - "name": "My Connector", - "id": "org.my.connector", - "version": 1 -} -``` - -### JSON structure - -The JSON structure should mirror the visual presentation to maintain alignment with the UI order. This ensures groups and properties are organized accordingly, even if some elements are hidden. -If you want to use a FEEL expression that references other variables, the properties defining those variables must be declared before the property where the FEEL expression is used. - -### Secret handling - -- Follow the rules of the system you’re adding to. -- Do not save secret information in the JSON. -- Use the connectors' [secret handling](/components/connectors/use-connectors/index.md#using-secrets). - -### Field types - -The following guidelines ensure templates are intuitive and designed to minimize errors. This helps to create a good user experience. - -#### Hidden vs. visible fields - -If certain values are static and do not require user input, prefill them. Hidden fields offer no additional benefit by being visible. - -**Hidden fields example:** - -- HTTP method -- Static URL endpoint -- Static header - -#### Required vs. optional - -- **Required:** Properties essential for the template to function. Without these, the template cannot operate. -- **Optional:** Properties that are not mandatory but provide additional functionality. - -There are two mechanisms to define property behavior depending on whether a field is required or optional: - -- [**“Not empty” constraint**](/components/modeler/element-templates/template-properties.md#validating-user-input-constraints): Displays an error if the field is left empty. -- [**Optional bindings**](/components/modeler/element-templates/template-properties.md#preventing-persisting-empty-values-optional): Does not persist empty properties in the BPMN XML. - - Use **optional bindings** when a property is not required and you want to avoid storing empty values in the BPMN XML. In most cases, required fields should use the "Not empty" constraint for validation. - -#### Mandatory FEEL vs. optional FEEL - -FEEL expressions should only be required when necessary. For straightforward inputs, expressions can be optional. -More details: [FEEL editor support](/components/modeler/element-templates/template-properties.md#adding-feel-editor-support-feel). - -#### Free input vs. dropdown vs. constraints - -- Use a dropdown when selection options are predefined. -- Use free input with constraints when there is a wide range of input possibilities. - -**Example:** - -```json -{ - "label": "Priority", - "id": "priority", - "group": "input", - "description": "The priority to apply to the queue item.", - "value": "Low", - "type": "Dropdown", - "choices": [ - { "name": "Low", "value": "Low" }, - { "name": "Normal", "value": "Normal" }, - { "name": "High", "value": "High" } - ], - "binding": { "type": "zeebe:input", "name": "priority0" }, - "condition": { "property": "operationType", "oneOf": ["addQueueItem"] } -} -``` diff --git a/docs/components/modeler/web-modeler/element-templates/element-template-generator.md b/docs/components/modeler/web-modeler/element-templates/element-template-generator.md deleted file mode 100644 index 0eacad9dbd5..00000000000 --- a/docs/components/modeler/web-modeler/element-templates/element-template-generator.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -id: element-template-generator -title: Generate an element template -description: Learn how to generate element or connector templates for easier creation of custom reusable elements. ---- - -You can configure and automatically generate a custom element template in Web Modeler. - -### Best practices - -When creating custom-built element templates, consider the best practices outlined in [Best practices for custom-built element templates](best-practices.md) to ensure they are effective, user-friendly, and maintainable. - -## Generate a BPMN element template - -1. Select the Web Modeler project where you want to create the template. Camunda recommends storing element templates in root project folders, not process applications, to simplify template management and avoid unnecessary versioning overhead. -2. Click **Create new**, then select **Element template** to open the **Create new element template** screen. - ![Create the new element template](./img/element-template-generator/configure-element-template-details.png) - -3. Select the template starting point: - - **Call activity**: Start from a call activity template. - - **Event**: Start from an event template. - You can choose from predefined event templates, such as message event, timer event, signal event. - - **Task**: Start from a task template. - You can choose from predefined task templates, such as user task, service task, script task, and more. - - **Blank**: Start from a blank template. - A blank template includes only the basic properties shared by all BPMN elements and allows you to customize the template from scratch. - -Continue with [**Step 4**](#configure-the-template-details) in the Configure the template details section below. - -## Generate a connector template - -You can start from a blank template or import an existing API definition such as an [OpenAPI specification](https://swagger.io/resources/open-api/), [Swagger specification](https://swagger.io/resources/open-api/), or a [Postman collection](https://www.postman.com/collection/). For example, download a Postman collection as a YAML file, import it into the generator, and choose which methods to include in the generated template. - -To generate a connector template: - -1. Select the Web Modeler project where you want to create the template. Camunda recommends storing element templates in root project folders, not process applications, to simplify template management and avoid unnecessary versioning overhead. -2. Click **Create new**, select **Element template**, and then choose the **Connector** tab. - ![Create the new element template](../../../connectors/custom-built-connectors/img/configure-connector-template-details.png) - -3. Select the template starting point: - - **From API definition**: Import an existing API definition file as a starting point. The **Import data source** section will appear below the template details. - - **From blank**: Start from a blank template. - -Continue with [**Step 4**](#configure-the-template-details) in the Configure the template details section below. - -## Configure the template details - -4. In the **Configure template details** section, provide the following information: - - **Name:** Enter a clear and descriptive name for the template. For example, include the brand name if the template connects to a service, or indicate its main feature. - - **Description:** Describe the template’s main features and benefits. - - **Icon:** Use a default BPMN symbol or upload a custom icon. Supported formats: SVG, PNG, JPEG. Maximum file size: 8 KB. Minimum dimensions: 512 × 512 pixels. - - **Import from URL:** Enter the URL of the image and click **Import icon**. - - **Upload file:** Drag and drop a file into the upload area, or click the link to select a file. - - :::note - If you do not configure template details at this stage, a default name and BPMN symbol are assigned. You can edit them later. - ::: - -#### Only for connector templates: Import an API definition - -5. If you selected **From API definition**, the **Import data source** section appears. - 1. Select the format to import (OpenAPI or Postman) and click **Import file**. - 2. Import the API definition: - - **Import file from URL:** Enter the API definition URL and click **Import icon**. - - **Upload file:** Drag and drop a file into the upload area, or click the link to select a file. - - 3. After importing, select which actions to include from the generated list of supported methods. - ![List of imported methods](../../../connectors/custom-built-connectors/img/Imported-methods.png) - - :::info - For more information on working with and configuring connector templates, see [Connector templates](/components/connectors/custom-built-connectors/connector-templates.md). - ::: - -6. Click **Create template** to generate the new template and open it in the [element template editor](/components/connectors/manage-connector-templates.md). diff --git a/docs/components/modeler/web-modeler/element-templates/manage-element-templates.md b/docs/components/modeler/web-modeler/element-templates/manage-element-templates.md deleted file mode 100644 index e4aaf0dc54d..00000000000 --- a/docs/components/modeler/web-modeler/element-templates/manage-element-templates.md +++ /dev/null @@ -1,156 +0,0 @@ ---- -id: manage-element-templates -title: Manage element templates -description: Manage your element templates in Web Modeler. ---- - -export const UploadIcon = () => ; -import PublishToOrganizationFromEditorImg from './img/connector-templates/publish-to-organization-from-editor.png'; -import PublishToOrganizationFromVersionsListImg from './img/connector-templates/publish-to-organization-from-versions-list.png'; -import EditConnectorTemplate1Img from './img/connector-templates/edit-connector-template-1.png'; -import EditConnectorTemplate2Img from './img/connector-templates/edit-connector-template-2.png'; -import EditConnectorTemplate3Img from './img/connector-templates/edit-connector-template-3.png'; -import UploadFilesImg from './img/connector-templates/upload-files.png'; -import ReplaceViaUploadImg from './img/connector-templates/replace-via-upload.png'; - -Camunda 8 only - -You can create and manage [element templates](/components/concepts/element-templates.md) just as any other asset in a Web Modeler project. - -## Create an element template - -To create a new element template, follow the steps described in [Generate an element template](./element-template-generator.md). - -You will be taken to the **Element template editor** screen. -In this screen, you can define the element template by writing the template JSON. -The template editor supports you in writing the template by providing autocompletion, error highlighting, and a live preview. - -![Template editor](img/connector-templates/connector-template-editor.png) - -The components of the editor interface are as follows: - -- On the left, you find the **template JSON editor**. Here, you define the actual [template descriptor](/components/modeler/element-templates/defining-templates.md). - The descriptor follows the [most recent element template schema](https://github.com/camunda/element-templates-json-schema). - - :::info - Starting with 8.8, the following properties are not managed by Web Modeler anymore, and you can freely edit them: - - `name`: Human-friendly name shown when selecting a template and in the properties panel after the template has been applied. The value can be different from the file name. - - `id`: Identifier of the template. Changing this value creates a new template. We recommend setting a meaningful value (for example, "PaymentConnector", "CreateUserTemplate"). - - `version`: Integer-based version number. Combined with the `id`, it defines a unique template version. When [publishing](#publish-a-connector-template) a new version, you need to update the version number manually. - - The value of the `$schema` property is still fixed; manual changes will not be saved. - ::: - -- On the right, you observe the live **Visual Preview**. The live preview shows how the properties panel will look when you apply the template to an element. It automatically updates on every valid change, and reflects the latest valid state of the template. The preview allows you to interactively check your template before publishing it. - You can also use the **Update JSON** button to update the template's JSON properties with the current input values from the visual preview. - -- In the upper right, you can **Add an icon** for your template. You can upload an image file with a maximum size of 8 KB. We recommend using squared SVG graphics. Icons appear as 18x18 pixels in the element on the modeling canvas, and as 32x32 pixels in the properties panel. - -On every valid change, the template is saved automatically. If there are errors in the JSON file, the template will not be saved. Ensure all [errors are resolved](#fixing-template-problems) for the template to save successfully. - -## Publish an element template - -After finalizing your element template, click **Publish to project** to activate it within the project context. In the modal that opens: - -- Update the version number if necessary. You don't need to change it for the initial version or if you have updated it already in the template editor. - The value entered here is saved to the `version` property in the JSON. -- Assign a distinct version name for effective version management. -- Add a description to explain what changed since the previous version. - -![Publishing a template](img/connector-templates/publish-version-to-project.png) - -Web Modeler checks the template for conflicts with already-published template versions. -You cannot publish a new version if: - -- The template's ID is already used in a published version of a different template file.
-- The version number is equal to or lower than the last published version of the same template file with the same template ID.
- -Web Modeler also shows a warning if the template ID has changed since the last published version. -You can still publish the new version in this case. - -As a [user with elevated access](/components/modeler/web-modeler/collaboration/collaboration.md#elevated-access), you can publish an element template version within the organization context, enabling all organization members to use it in their diagrams. -To do so, click **Publish > Publish to organization** on the editor screen or promote a template version via the [versions list](#versioning-connector-templates). - -Publish to organization from the editor page -Promoting an existing template version to the organization - -### Manage published element templates - -After publishing, an element template version can be applied across all models within the same project or organization, depending on its publication status. You can review the publication status of template versions in the [versions list](#versioning-connector-templates). - -On the Web Modeler home page, you can find an overview of all shared resources within your organization. - -[Users with elevated access](/components/modeler/web-modeler/collaboration/collaboration.md#elevated-access) can: - -- View additional details about the published version. -- Open the resource's versions list (if they are in [super-user mode](/components/modeler/web-modeler/collaboration/collaboration.md#super-user-mode) or are a [project admin or editor](/components/modeler/web-modeler/collaboration/collaboration.md#access-rights-and-permissions) of the resource's project). -- Unpublish an element template directly from this view. - -![Manage published templates - elevated access](img/connector-templates/manage-connector-templates-org-privileges.png) - -Organization members without special organization permissions can: - -- View all the resources published within the organization. -- Open the resource's versions list (if they are a [project admin or editor](/components/modeler/web-modeler/collaboration/collaboration.md#access-rights-and-permissions) of the resource's project). - -![Manage published templates - no special organization permissions](img/connector-templates/manage-connector-templates-no-org-privileges.png) - -### Versioning element templates - -You can version your element templates [similar to diagrams](/components/modeler/web-modeler/modeling/versions.md). - -If you publish a new version of an element template and an older version is already being used in diagrams, the user can either: - -- [Update the diagram elements](/components/modeler/desktop-modeler/element-templates/using-templates.md#updating-templates) to use the most recent version of the element template. You cannot undo this action. -- Continue using the older version of the element template in their diagrams. - -## JSON editor features - -The JSON editor is based on the [Monaco Editor](https://microsoft.github.io/monaco-editor/). The Monaco Editor is the editor that powers VS Code. As a result, the template editor supports many familiar features, such as auto-formatting, indentation support, code completion, and error highlighting. - -With code completion, you can add a complete property object when you press `Ctrl+Space` at a location for a new property. - -Adding a property with Ctrl+Space - -When you press `Ctrl+Space` to create a new attribute, you get proposals for all available attributes. - -Adding an attribute with Ctrl+Space - -When the domain for values is defined, you can select one by pressing `Ctrl+Space` in a value. - -Editing the value of the `type` attribute with Ctrl+Space - -Read the [Visual Studio Code editor docs](https://code.visualstudio.com/docs/editor/editingevolved) for a full overview of features. - -## Fixing problems in your templates {#fixing-template-problems} - -While working on a template, the template will be in invalid intermediate states. For instance, when you add a new property, it must contain various mandatory attributes. - -Unless all mandatory attributes are defined, the template will not be saved, and the preview is not updated. This ensures that you can never publish an invalid or broken template. - -The editor toolbar indicates if the template is currently in a valid state or not. The JSON editor provides you with error highlighting, allowing you to add mandatory values and resolve problems without missing anything. - -![Indicating problems in element templates](img/connector-templates/fix-connector-template-problems-1.png) - -If there are problems at the root level of the JSON (such as a missing or misspelled mandatory attribute), the error is highlighted in the first line of the editor. Click the error marker at the curly bracket to expand the error message. - -![Some element template problems highlighted in the first line](img/connector-templates/fix-connector-template-problems-2.png) - -## Importing an existing element template - -If you have created templates for Desktop Modeler and want to reuse them in Web Modeler, you need to make some adjustments to the template files: - -1. **Split the files**. Web Modeler maintains a 1:1 relation between element templates and files. Since Desktop Modeler allows you to keep multiple template definitions in a single file, you must split the file in advance to one file per template before uploading. -2. **Remove the brackets**. Remove the list brackets from the element template file before uploading. Even if a template file for Desktop Modeler contains only a single template, it is always wrapped in a list. - -Once your file follows the requirements, you can upload it. There are two ways to do so: - -1. Upload it as a new element template via the **Upload files** action in the project view. - Uploading a new template via file upload - -2. Update an existing template via the **Replace via upload** action in the breadcrumbs of the editor view. - Updating a template via file upload - -:::info Desktop Modeler support -The element template editor is currently only available in Web Modeler. Refer to the [Desktop Modeler documentation](/components/modeler/desktop-modeler/element-templates/configuring-templates.md) for instructions on configuring element templates in Desktop Modeler. -::: diff --git a/docs/components/modeler/web-modeler/element-templates/save-as-element-templates.md b/docs/components/modeler/web-modeler/element-templates/save-as-element-templates.md deleted file mode 100644 index b5a453127c5..00000000000 --- a/docs/components/modeler/web-modeler/element-templates/save-as-element-templates.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -id: save-as-element-templates -title: Save activity and event properties as reusable element templates -description: Learn how to save supported activities and events as a reusable element template in Camunda Web Modeler. ---- - -import BusinessRuleTaskImg1 from './img/save-as-template/1-business-rule-task.png'; -import SaveAsTemplateButtonImg2 from './img/save-as-template/2-save-as-template-button.png'; -import TemplateSavedImg3 from './img/save-as-template/3-template-saved.png'; -import EditTemplateImg4 from './img/save-as-template/4-edit-template.png'; -import FinalizedTemplateImg5 from './img/save-as-template/5-finalized-template.png'; -import PublishTemplateImg6 from './img/save-as-template/6-publish-template.png'; -import ApplyTemplateImg7 from './img/save-as-template/7-apply-template.png'; - -# Save activity and event properties as reusable element templates - -Element templates allow you to create reusable, configurable building blocks that can be shared across your organization. -With the **Save as template** feature, you can convert any supported element into an element template. - -## Supported element types - -The **Save as template** feature is available for the following BPMN element types: - -**Activities** - -- Service task -- User task -- Send task -- Receive task -- Business rule task -- Script task -- Manual task -- Call activity - -You cannot create a template for the [undefined task type](../../../bpmn/undefined-tasks). - -**Events** - -- Message events -- Signal events -- Timer events -- Conditional events - -## Create an element template from an element - -You can save any supported element as an element template directly from the properties panel in Web Modeler. -Configure your element with the desired properties, save it as a template, and optionally customize it further in the template editor. - -### Prerequisites - -Before saving an element as a template: - -- Ensure the element is properly configured with the desired properties. -- Resolve any validation errors on the element. The **Save as template** button is disabled if errors are present. - -### Step 1: Configure your element - -First, configure your element with all the necessary properties you want to include in your template. -The configuration depends on your element type and use case. - -In this example, we'll configure a business rule task for fraud detection: - -1. Select an element in your BPMN diagram. -2. Configure the element with the properties you need. For example, set up a business rule task by defining: - - **Implementation**: Choose the implementation type (for example, DMN decision). - - **Called decision**: Reference the decision to be invoked. - - **Binding type**: Select the [resource binding type](/components/best-practices/modeling/choosing-the-resource-binding-type.md). We recommend using `versionTag` to ensure that the template always references a compatible resource version. - - **Result variable**: Define where to store the decision result. - - Add any required input/output mappings for your business logic. - - Web Modeler interface showing a configured business rule task named 'Determine fraud rating confidence' with properties panel displaying DMN decision configuration, decision ID, and binding settings - -### Step 2: Save the element's properties as a template - -1. With your configured element selected, look for the **Save as** button (template icon) in the top-right corner of the properties panel. - - Properties panel showing the 'Save as' button with template icon in the Template section, with a blue 'Select' button visible - -2. Click the **Save as** button to open the template configuration dialog. -3. In the **Save element properties as a new template** dialog, provide: - - **Name**: Enter a descriptive name (for example, "Determine fraud rating confidence template"). - - **Description**: Provide a detailed explanation of what the template does (for example, "Checks if the transaction is a refund and if there is a high fraud rating"). -4. Click **Save** to create your template. -5. You'll see an "Element template saved" notification with an option to **Edit template**. - - Modal dialog titled 'Save element properties as a new template' with name field showing 'Determine fraud rating confidence template' and description field containing template details - -### Step 3: Customize your template - -If you want to further customize or publish your template: - -1. Click **Edit template** from the notification to open the template editor. -2. The template editor allows you to: - - Modify template properties and [bindings](/components/modeler/element-templates/defining-templates.md#bindings). - - Set up validation and [constraints](/components/modeler/element-templates/defining-templates.md#constraints) for user input. - - Configure template groups and categories. - - Green notification banner displaying 'Element template saved' with an 'Edit template' button, shown over the Web Modeler interface - - By default, all properties are set to `"type": "String"`, making them visible and editable in the properties panel. - To make your template easier to use, hide unnecessary properties with `"type": "Hidden"`, or use a dropdown (`"type": "Dropdown"`) with limited options. - - Template editor interface showing JSON configuration on the left and visual preview on the right, with 'Fraud Check Results' section containing configurable template properties for isRefund and isHighFraudRatingConfidence - -### Step 4: Publish your template - -1. When you're ready to make the template available to your team, click **Publish** to add it to your project or organization's shared resources. -2. If your template references dependencies (for example, another process or a DMN decision), a warning will remind you to ensure these dependencies are deployed in the runtime environment. - Dependencies are not included in the template and must be managed separately. - - Publish template dialog with version fields, description text area, and a warning about decision dependency for the determine-fraud-rating decision - -### Step 5: Use your new template - -Once you've created and published a template, you can use it in a diagram: - -1. Add a new element to your diagram or select an existing one. Make sure it matches the `appliesTo` type defined in your template. -2. Apply the template by: - - Clicking **Change element** on the element, or - - Clicking **Select** in the Template section of the properties panel. -3. In the template selection dialog, find your template (for example, "Determine fraud rating confidence template") under the assigned category. By default, templates are listed under "Templates". -4. Select the template to apply it to your element. The element will automatically be configured with all template settings, including decision references, bindings, and variable mappings. - - Template selection sidebar showing available connectors and templates, with 'Determine fraud rating confidence template' listed under the Templates section - -## Understand template property bindings - -When you save an element as a template, Web Modeler automatically converts the element's properties into template bindings: - -- Input/output mappings -- Task headers -- Zeebe properties -- Element-specific properties (for example, `calledDecision`, `calledElement`) -- Message references (for message-related elements) - -Only properties supported by element templates are included. Unsupported properties remain visible in the properties panel after you apply the template. - -For a list of supported properties, see the [element templates reference](/components/modeler/element-templates/defining-templates.md#defining-template-properties). - -## When template creation is unavailable - -The **Save as template** button is disabled in the following scenarios: - -- You are not in Web Modeler's implementation mode. -- The element has validation issues. -- The element type is not supported (blank tasks, error events, subprocesses, etc.). -- You don't have permissions to create templates. - -Fixing validation issues will enable the button if the element type is supported. - -## Best practices - -When creating templates from elements: - -- **Create focused templates**: Each template should serve a clear purpose. -- **Hide details**: Expose only the necessary properties. -- **Validate input**: Use [constraints](/components/modeler/element-templates/defining-templates.md#constraints) to enforce valid input and provide meaningful errors. -- **Manage dependencies**: Ensure referenced decisions or variables exist in the runtime environment. Use `versionTag` bindings for dependencies to avoid version conflicts. -- **Use meaningful parameter names**: Give configurable fields descriptive names. -- **Test your templates**: Apply them to an element to confirm they work as expected. - -## Related topics - -- [Element templates reference](/components/modeler/element-templates/about-templates.md) -- [Custom connectors](/components/connectors/custom-built-connectors/create-connector-from-rest.md) -- [Task types](/components/modeler/bpmn/tasks.md) diff --git a/docs/components/modeler/web-modeler/element-templates/using-templates.md b/docs/components/modeler/web-modeler/element-templates/using-templates.md deleted file mode 100644 index e21b22f39e1..00000000000 --- a/docs/components/modeler/web-modeler/element-templates/using-templates.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -id: using-templates-in-web-modeler -title: Using templates -description: "Learn how to apply, remove, update, and replace templates." ---- - -## Applying templates - -If an [element template](/components/modeler/element-templates/about-templates.md) matches a selected diagram element, the blue template catalog button, **Select**, is shown in the properties panel on the right side of the screen. - -![Template Chooser](./img/chooser.png) - -Clicking **Select** opens a popup menu, allowing you to browse and search available templates for the -selected element. - -![Popup Menu](./img/modal.png) - -You can also click the **blue shop icon** in the upper right of the popup to open the [Camunda Marketplace](/components/modeler/web-modeler/modeling/camunda-marketplace.md). - -![Marketplace Menu](./img/marketplace.png) - -Applying a template stores it via the `modelerTemplate` property and the optional `modelerTemplateVersion` property -on the selected element: - -```xml - - -``` - -It also sets up custom fields on the diagram element and makes these available for inspection and editing. -Properties which were not configured in the element template using custom fields will not be available for editing. - -## Removing templates - -To remove an applied template from an element, either the _Unlink_ or _Remove_ function can be used: - -- **Unlink**: Remove the element template from the `modelerTemplate` property but keep the properties which were set. -- **Remove**: Remove the element template from the `modelerTemplate` property and reset all properties of the respective element. - -![Unlink or Remove](./img/unlink-remove.png) - -## Updating templates - -If a template is applied and a new version of the template is found you can _update_ the template. - -![Update Template](./img/update-template.png) - -Templates are updated according to the following rules: - -- If the property is set in the new template, it will override the existing value — unless the value was originally set by the old template and has been manually changed since. -- If the property is not defined in the new template, it will unset. -- Sub-properties of complex properties (for example, `zeebe:input`, `zeebe:output`) are handled - according to these rules if they can be identified. - -### Replacing templates - -If a template is deprecated with a new element template and you want to keep the same input values as in the -deprecated template, you can: - -1. **Unlink**: Remove the current template that is deprecated from the `modelerTemplate` property, but keep the properties - which - were set. -2. **Select** and apply the new element template. - -## Missing templates - -If a template was applied to an element but cannot be found, editing of the element is disabled. To re-enable editing, either _unlink_ or _remove_ the template, or make it available by publishing a template with the same ID or creating a new one. - -![Template not Found](./img/template-not-found.png) - -## Creating templates from existing elements - -If a diagram element supports being used as a template, a _Save as_ link will be displayed next to the header. Once clicked, you will be able to select a name and description for the template. This allows you to easily reuse pre-configured elements. - -![Template Save as](./img/save-as.png) - -The template can be further customized by [editing it](/components/connectors/manage-connector-templates.md). - -To use the template, you first need to [publish it to the project or organization](/components/modeler/web-modeler/element-templates/manage-element-templates.md#publish-an-element-template). - -Learn more about [saving elements as templates](./save-as-element-templates.md). diff --git a/docs/components/modeler/web-modeler/index.md b/docs/components/modeler/web-modeler/index.md index 51b6ff8a653..b5bf54a1478 100644 --- a/docs/components/modeler/web-modeler/index.md +++ b/docs/components/modeler/web-modeler/index.md @@ -19,7 +19,7 @@ It enables teams to collaboratively design executable processes as the foundatio | Feature | Description | | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | [BPMN, DMN, and Forms modeling](../bpmn/bpmn.md) | Create and edit BPMN diagrams, DMN decision tables, and Camunda Forms directly in your browser. | -| [Element templates](./element-templates/using-templates.md) | Reuse building blocks to standardize modeling across teams and projects. | +| [Element templates](../element-templates/about-templates.md) | Reuse building blocks to standardize modeling across teams and projects. | | [Collaboration](./collaboration/collaboration.md) | Work with team members to speed up the process development cycle. | | [Play mode](validation/play-your-process.md) | Test and validate processes during development. | | [Camunda Marketplace](./modeling/camunda-marketplace.md) | Extend Web Modeler with prebuilt blueprints and connectors. | diff --git a/docs/reference/announcements-release-notes/870/870-release-notes.md b/docs/reference/announcements-release-notes/870/870-release-notes.md index 44ac1467241..4aa4ebf8d57 100644 --- a/docs/reference/announcements-release-notes/870/870-release-notes.md +++ b/docs/reference/announcements-release-notes/870/870-release-notes.md @@ -639,7 +639,7 @@ You can now configure and automatically generate a custom connector template in - You can start from a blank template or import an existing API definition such as an OpenAPI specification, Swagger specification, or a Postman collection. - For example, download a Postman collection as a YAML file, import this into the generator, and choose which methods to include in the generated template. -To learn more about generating connector templates, see [generate a connector template](/components/modeler/web-modeler/element-templates/element-template-generator.md). +To learn more about generating connector templates, see [generate a connector template](/components/modeler/element-templates/create/generate-element-template.md). ### Monorepo Git sync Modeler diff --git a/docs/reference/announcements-release-notes/880/880-release-notes.md b/docs/reference/announcements-release-notes/880/880-release-notes.md index 8351c4bc2e7..de0eb2188a6 100644 --- a/docs/reference/announcements-release-notes/880/880-release-notes.md +++ b/docs/reference/announcements-release-notes/880/880-release-notes.md @@ -668,7 +668,7 @@ In addition to bearer token authentication, you can now configure Web Modeler in Web Modeler now provides a low-coder friendly UX for creating building blocks. Whether you create an element template from scratch or from a task, you can quickly set and narrow down the properties so process developers using these templates can quickly and confidently wire building blocks together into an E2E process. -

Generate an element template

+

Generate an element template

### Element template support for all tasks @@ -680,7 +680,7 @@ You can now save any configured task as a reusable element template directly fro - Edit templates to adjust input/output bindings, validation rules, categories, and more. - Publish templates to your project or organization for reuse. -

Save tasks as element templates

+

Save tasks as element templates

### Unlock element template fields @@ -692,7 +692,7 @@ Element template management is now more flexible for developers and DevOps teams - Template names and file names can be managed independently, and you can quickly import templates using copy and paste, git sync, or CI/CD pipeline. - Safeguards now notify you of ID or version conflicts to prevent accidental overwrites when publishing templates. -

Manage element templates

+

Manage element templates

### FEEL Copilot @@ -838,7 +838,7 @@ You can now save any configured task as a reusable element template directly fro - Edit templates to adjust input/output bindings, validation rules, categories, and more - Publish templates to your project or organization for reuse -See [save tasks as element templates](/components/modeler/web-modeler/element-templates/save-as-element-templates.md) for details. +See [save tasks as element templates](/components/modeler/element-templates/about-templates.md) for details. Additional support includes: diff --git a/docs/reference/announcements-release-notes/890/890-release-notes.md b/docs/reference/announcements-release-notes/890/890-release-notes.md index 4f108f662cf..bd266b21ac6 100644 --- a/docs/reference/announcements-release-notes/890/890-release-notes.md +++ b/docs/reference/announcements-release-notes/890/890-release-notes.md @@ -502,7 +502,7 @@ Web Modeler in 8.9 adds more reliable live collaboration with canvas locking and Camunda 8.9 expands Web Modeler with broader event template support, email-based project invitations for all supported OIDC providers, and a simpler Self-Managed system architecture by folding the former `webapp` component into `restapi`. Additional 8.9 updates include embedded Tomcat for Self-Managed deployments and a SaaS endpoint for monitoring Web Modeler egress IP ranges.
    -
  • [Element templates in Modeler](/components/modeler/element-templates/defining-templates.md)
  • +
  • [Element templates in Modeler](/components/modeler/element-templates/create/defining-templates.md)
  • [Add users to projects](/components/modeler/web-modeler/collaboration/collaboration.md#add-users-to-projects)
  • [Embedded web server](/self-managed/upgrade/components/880-to-890.md#embedded-web-server)
@@ -1310,7 +1310,7 @@ You can also create global event templates that: - Standardize event configurations (for example, message names or payload structures). - Help ensure consistency across teams and models. - + #### Web Modeler: Invite users via email @@ -1605,7 +1605,7 @@ Element templates now support reusable [BPMN signals](/components/modeler/bpmn/s - The `bpmn:Signal#property` binding allows you to set the name of a `bpmn:Signal` referred to by the templated element. - This binding is only valid for templates of events with `bpmn:SignalEventDefinition`. - + #### Web Modeler: Embedded web server changed from Undertow to Tomcat (Self-Managed) diff --git a/docs/reference/announcements-release-notes/890/whats-new-in-89.md b/docs/reference/announcements-release-notes/890/whats-new-in-89.md index 1e88d788c7e..5c754c90234 100644 --- a/docs/reference/announcements-release-notes/890/whats-new-in-89.md +++ b/docs/reference/announcements-release-notes/890/whats-new-in-89.md @@ -308,7 +308,7 @@ The following usability improvements simplify collaboration and help teams keep | Feature | Description | | :-------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Element templates](/components/modeler/element-templates/defining-templates.md) | Create templates for message, signal, and timer events, and reuse and share templates across projects to standardize message names, payloads, and timer definitions. | +| [Element templates](/components/modeler/element-templates/create/defining-templates.md) | Create templates for message, signal, and timer events, and reuse and share templates across projects to standardize message names, payloads, and timer definitions. | | [Email invitations](/components/modeler/web-modeler/collaboration/collaboration.md#add-users-to-projects) | Invite new users to Web Modeler projects via email, regardless of OIDC provider, and use a consistent invitation flow across Keycloak, Entra ID, Okta, Auth0, and other providers. | ### Improved Self-Managed installation diff --git a/docs/reference/glossary.md b/docs/reference/glossary.md index cb671f60cc9..4eeee6e2120 100644 --- a/docs/reference/glossary.md +++ b/docs/reference/glossary.md @@ -73,6 +73,16 @@ For example, build an invoice-processing AI agent in Camunda with BPMN, using an - [AI agents](/components/agentic-orchestration/ai-agents.md) - [Build your first AI Agent](/guides/getting-started-agentic-orchestration.md) +### Apply template/applied template + +To **apply a template** means to attach an [element template](#element-template) to a BPMN element in Modeler. +Applying a template replaces the element’s properties panel with a UI defined in the template, and binds technical configuration (inputs, outputs, headers, authentication, version tags, and more) into the BPMN XML. + +An **applied template** refers to a BPMN element that already uses a template. +In Web Modeler, applied templates can be **saved as a new template**, allowing reuse across projects. + +- [Using element templates](/components/modeler/element-templates/getting-started/using-templates-in-web-modeler.md) + ### Audit log The [audit log](../components/audit-log/overview.md) is a record of operations, including who performed them, when, and on which entities. Use the audit log to prove compliance, meet governance and regulatory requirements, maintain operational integrity and transparency, and troubleshoot issues. @@ -151,7 +161,21 @@ The [connector runtime](/components/connectors/custom-built-connectors/connector ### Connector template -A [connector template](/components/connectors/custom-built-connectors/connector-templates.md) is a type of element template used to configure connectors in Modeler. Templates define UI fields, metadata, and bindings required for connector operations. Modeler internally labels all templates as element templates, but connector templates are the subset specifically used to configure connectors. +A **connector template** is a specialized type of [element template](#element-template) that configures a Camunda Connector. +Connector templates define: + +- Input fields and validation +- Authentication models +- Output mappings +- Runtime behavior bindings (for example `taskDefinition:type`) +- UI organization and defaults + +Connector templates ensure consistent behavior and reduce modeling errors when using connectors such as HTTP, Slack, Kafka, or AI models. + +They follow the same schema as element templates but apply specifically to service tasks referencing a Connector. + +- [Element templates](/components/modeler/element-templates/about-templates.md) + ### Context window @@ -203,7 +227,16 @@ A BPMN element is part of a [process](#process), defining one part of its BPMN m Use an element template to extend [Modeler](/components/modeler/about-modeler.md) with domain-specific diagram [elements](#element). The user edits such elements through a UI defined by the element template, and in the process configures BPMN element properties in simple and predictable ways. Element templates are used by [connectors](#connector) to create the connector-specific [element](#element) configuration. -- [Element templates](/components/modeler/element-templates/about-templates.md) +- The element(s) they apply to +- The UI fields shown in the properties panel +- How those fields bind to BPMN or Zeebe extension properties +- Default values, constraints, and hidden technical fields +- Compatibility and versioning + +Templates help modelers configure elements safely and consistently. +Connector templates are a **subset** of element templates. + +- [About element templates](/components/modeler/element-templates/about-templates.md) ### Embedding (vector embedding) @@ -576,6 +609,51 @@ This way, a [Camunda workflow](#workflow) can receive messages from an external ## T +### Template metadata + +Metadata describes required and optional fields that identify a template and control how it behaves. +Common metadata fields include: + +- `id`: Unique template identifier +- `name`: Visible label in Modeler +- `version`: Version number for upgrade paths +- `appliesTo`: BPMN element types +- `category`, `description`, `keywords` +- `icon`: Template icon configuration +- `engines`: Engine compatibility range + +- [Template metadata](/components/modeler/element-templates/create/template-metadata.md) + +### Template properties + +The **properties** section defines the fields that appear in the Modeler UI when the template is applied. + +Properties describe: + +- Data type (`String`, `Number`, `Boolean`, `Dropdown`, `Hidden`, etc.) +- Default values +- Validation rules +- Binding (for example, `zeebe:input`, `zeebe:taskDefinition`) +- Grouping and conditional visibility + +Properties define the interactive experience for the modeler. + +- [Template properties](/components/modeler/element-templates/create/template-properties.md) + +### Template dependencies + +Dependencies describe external resources or runtime components required for a template to function, such as: + +- Forms used by user tasks +- DMN decisions +- Subprocesses (call activities) +- Job workers / connector runtimes +- Secrets + +Dependencies must be available **at design time** (for template selection) and **at runtime** (for correct execution). + +- [Templates with dependencies](/components/modeler/element-templates/create/element-templates-with-dependencies.md) + ### Temperature A parameter that regulates the randomness or creativity of AI-generated text. Lower values result in more focused and predictable responses, while higher values lead to more creative and varied outputs. diff --git a/sidebars.js b/sidebars.js index d9de4be2b58..276f65a0f4a 100644 --- a/sidebars.js +++ b/sidebars.js @@ -544,20 +544,6 @@ module.exports = { }, ], }, - { - type: "category", - label: "Element templates", - link: { - type: "doc", - id: "components/modeler/web-modeler/element-templates/manage-element-templates", - }, - items: [ - "components/modeler/web-modeler/element-templates/element-template-generator", - "components/modeler/web-modeler/element-templates/using-templates-in-web-modeler", - "components/modeler/web-modeler/element-templates/save-as-element-templates", - "components/modeler/web-modeler/element-templates/best-practices", - ], - }, { "AI features": [ "components/modeler/web-modeler/modeling/advanced-modeling/camunda-docs-ai", @@ -625,7 +611,6 @@ module.exports = { { "Element templates": [ "components/modeler/desktop-modeler/element-templates/configuring-templates", - "components/modeler/desktop-modeler/element-templates/using-templates", ], }, { diff --git a/versioned_docs/version-8.6/components/concepts/byok/aws-kms-setup.md b/versioned_docs/version-8.6/components/concepts/byok/aws-kms-setup.md index 9a69e79de95..23e771f5d57 100644 --- a/versioned_docs/version-8.6/components/concepts/byok/aws-kms-setup.md +++ b/versioned_docs/version-8.6/components/concepts/byok/aws-kms-setup.md @@ -16,9 +16,10 @@ Learn how to configure encryption at rest for your Camunda 8 SaaS cluster using | Technical familiarity | Some experience with the AWS Management Console, IAM roles, and AWS KMS. | :::warning Important + - Deleting or disabling your AWS KMS key will make your cluster and data inaccessible. To understand how Camunda behaves if a key is disabled, deleted, or its policy is changed, see [key state behavior](/components/concepts/byok/key-state-behavior.md). - Key management is fully customer-side in AWS KMS. Camunda cannot rotate keys. -::: + ::: ## Step 1: Create a Camunda 8 cluster diff --git a/versioned_docs/version-8.7/components/concepts/byok/aws-kms-setup.md b/versioned_docs/version-8.7/components/concepts/byok/aws-kms-setup.md index 0e876afbadd..8c8732f194b 100644 --- a/versioned_docs/version-8.7/components/concepts/byok/aws-kms-setup.md +++ b/versioned_docs/version-8.7/components/concepts/byok/aws-kms-setup.md @@ -16,9 +16,10 @@ Learn how to configure encryption at rest for your Camunda 8 SaaS cluster using | Technical familiarity | Some experience with the AWS Management Console, IAM roles, and AWS KMS. | :::warning Important + - Deleting or disabling your AWS KMS key will make your cluster and data inaccessible. To understand how Camunda behaves if a key is disabled, deleted, or its policy is changed, see [key state behavior](/components/concepts/byok/key-state-behavior.md). - Key management is fully customer-side in AWS KMS. Camunda cannot rotate keys. -::: + ::: ## Step 1: Create a Camunda 8 SaaS cluster diff --git a/versioned_docs/version-8.7/components/modeler/desktop-modeler/install-the-modeler.md b/versioned_docs/version-8.7/components/modeler/desktop-modeler/install-the-modeler.md index d1284508a27..c67438ee521 100644 --- a/versioned_docs/version-8.7/components/modeler/desktop-modeler/install-the-modeler.md +++ b/versioned_docs/version-8.7/components/modeler/desktop-modeler/install-the-modeler.md @@ -4,6 +4,7 @@ title: Install Desktop Modeler sidebar_label: Installation description: "Learn how to install Camunda Desktop Modeler, a desktop application for modeling BPMN, DMN, and Forms and support building executable diagrams with Camunda." --- + import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; @@ -27,15 +28,19 @@ To install [Desktop Modeler](./index.md) for Windows, macOS, and Linux, visit th Ensure the installation is owned by `root` and accessible to all users of the machine by following the steps below. 1. Unpack the zip archive using the `tar` command: + ```shell cd /usr/bin sudo tar xvfz ~/Downloads/camunda-modeler-5.41.0-linux-x64.tar.gz ``` + 2. Ensure the access permissions of the `chrome-sandbox` file are correct and create a link to this version: + ```shell sudo chmod 4755 camunda-modeler-5.41.0-linux-x64/chrome-sandbox sudo ln -s camunda-modeler-5.41.0-linux-x64/camunda-modeler camunda-modeler ``` + ## Wire file associations diff --git a/versioned_docs/version-8.8/components/modeler/desktop-modeler/install-the-modeler.md b/versioned_docs/version-8.8/components/modeler/desktop-modeler/install-the-modeler.md index d1284508a27..c67438ee521 100644 --- a/versioned_docs/version-8.8/components/modeler/desktop-modeler/install-the-modeler.md +++ b/versioned_docs/version-8.8/components/modeler/desktop-modeler/install-the-modeler.md @@ -4,6 +4,7 @@ title: Install Desktop Modeler sidebar_label: Installation description: "Learn how to install Camunda Desktop Modeler, a desktop application for modeling BPMN, DMN, and Forms and support building executable diagrams with Camunda." --- + import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; @@ -27,15 +28,19 @@ To install [Desktop Modeler](./index.md) for Windows, macOS, and Linux, visit th Ensure the installation is owned by `root` and accessible to all users of the machine by following the steps below. 1. Unpack the zip archive using the `tar` command: + ```shell cd /usr/bin sudo tar xvfz ~/Downloads/camunda-modeler-5.41.0-linux-x64.tar.gz ``` + 2. Ensure the access permissions of the `chrome-sandbox` file are correct and create a link to this version: + ```shell sudo chmod 4755 camunda-modeler-5.41.0-linux-x64/chrome-sandbox sudo ln -s camunda-modeler-5.41.0-linux-x64/camunda-modeler camunda-modeler ``` + ## Wire file associations diff --git a/versioned_docs/version-8.8/components/saas/byok/aws-kms-setup.md b/versioned_docs/version-8.8/components/saas/byok/aws-kms-setup.md index 05b8ab97270..fd83079c906 100644 --- a/versioned_docs/version-8.8/components/saas/byok/aws-kms-setup.md +++ b/versioned_docs/version-8.8/components/saas/byok/aws-kms-setup.md @@ -16,9 +16,10 @@ Learn how to configure encryption at rest for your Camunda 8 SaaS Orchestration | Technical familiarity | Some experience with the AWS Management Console, IAM roles, and AWS KMS. | :::warning Important + - Deleting or disabling your AWS KMS key will make your cluster and data inaccessible. To understand how Camunda behaves if a key is disabled, deleted, or its policy is changed, see [key state behavior](/components/saas/byok/key-state-behavior.md). - Key management is fully customer-side in AWS KMS. Camunda cannot rotate keys. -::: + ::: ## Step 1: Create a Camunda 8 SaaS Orchestration cluster