jilanims / element-templates

The home of bpmn.io element templates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Want to try out modeling in domain-specific, reusable building blocks? Check out our demo.

Element Templates

The tool that powers declarative, domain specific modeling at bpmn.io.

About

Element templates allow you to define re-usable, domain specific building blocks to supported bpmn.io toolkits. Through a set of utilities they deeply integrate into the modeling experience.

Element Templates application demo

Features

Through a JSON document you define different aspects of a re-usable building block.

  • Name and description
  • Icon
  • BPMN element type
  • Category
  • Documentation references
  • Versioning + deprecation information
  • Type of control
  • Technical binding
  • Labels, description
  • Validation
  • Grouping
  • Conditional activation criteria

Editor Integration

Through a set of utilities element templates get deeply integrated into our editor tooling.

Create/Append Anything

Provided through an extension.

  • Palette and context pads have a ... entry to create / append any element
  • Building blocks can be discovered via search
  • Replace menu is enhanced to work using the same pattern

Configuration

Provided through the properties panel.

Upgrading

Provided through the properties panel as well as an extension.

Templates come with two built-in ways of migration: Upgrading to a newer (compatible) version or deprecation (with the ability to display a custom message).

Basic Setup

The basic setup requires a BPMN modeler as well as properties panel and element template provider modules:

import BpmnModeler from 'bpmn-js/lib/Modeler';

import {
  BpmnPropertiesPanelModule,
  BpmnPropertiesProviderModule,
  ZeebePropertiesProviderModule,
  CloudElementTemplatesPropertiesProviderModule
} from 'bpmn-js-properties-panel';

It allows you to pass element templates to the modeler during instantiation via the elementTemplate configuration:

const elementTemplates = [ ... ];

const modeler = new BpmnModeler({
  container: '#canvas',
  additionalModules: [
    BpmnPropertiesPanelModule,
    BpmnPropertiesProviderModule,
    ZeebePropertiesProviderModule,
    CloudElementTemplatesPropertiesProviderModule
  ],
  elementTemplates
});

Checkout API for advanced use-cases driven via additional APIs.

Supported Toolkits

Right now element templates are supported in bpmn-js.

Creating an Element Template Provider

Refer to the create a provider guide.

Related Utilities

About

The home of bpmn.io element templates