Skip to content

BPMN Panel API / Panel Types / ToolbarEdgeItem

Type Alias: ToolbarEdgeItem

ts
type ToolbarEdgeItem = ToolbarItemBase & {
  bpmnType?: BpmnEdgeKind;
  request: {
     linkName: string;
  };
  data?: Record<string, any>;
};

Defined in: features/panels/variants/bpmn/types/panel/graph/toolbar/toolbar-item.ts:591

Toolbar item for creating BPMN edges

  • Defines how to create connections between nodes from the palette.
  • graph.edges[] remains a declared legacy shape; the current existing-edge renderer does not consume it.

Key Concepts

Separation of Concerns:

  • Toolbar edge item = "How to create" (palette concerns)
  • Existing-edge display = inferred directly from backend connector data

Backend Integration:

  • request.linkName is REQUIRED for edge creation
  • Sent to backend when user connects two nodes
  • Must match backend link entity type

Type Declaration

NameTypeDescription

bpmnType?

BpmnEdgeKind

BPMN edge type for rendering.

request

{ linkName: string; }

Backend request configuration for edge creation.

REQUIRED for edge creation to work properly.

request.linkName

string

Name of the link type to create in the backend.

This value is sent in the LinkCreateBody to the backend when a user connects two nodes.

Must match a backend link entity type.

Examples

ts
"WFConnectorInstance"
ts
"WFConnectorInstanceLink"
ts
"TaskDependencyLink"

data?

Record<string, any>

Custom data to attach to created edges.

This data object is:

  • Passed to @mes/bpmn during edge creation
  • Included in creation events (app:intent:create-connector, app:connector-preset:set)
  • Available in edge's data property for theme resolution
  • Passed through to renderer output for backend processing

Special properties:

  • connectorType: Used for theme resolution and edge styling (string or number)

Use cases:

  • Differentiate edge styles (critical, standard, manual)
  • Pass workflow metadata
  • Track edge categories

Examples

Basic connector type

json
{
  "connectorType": "critical"
}

Numeric connector type (for backend compatibility)

json
{
  "connectorType": 1
}

With additional metadata

json
{
  "connectorType": "manual",
  "priority": "high",
  "autoRoute": false
}

Examples

Standard connection

json
{
  "id": "connection-standard",
  "bpmnType": "bpmn:SequenceFlow",
  "icon": "icon icon--arrow",
  "request": {
    "linkName": "WFConnectorInstance"
  }
}

Critical connection with custom data

json
{
  "id": "connection-critical",
  "bpmnType": "bpmn:SequenceFlow",
  "icon": "icon icon--alert",
  "request": {
    "linkName": "WFCriticalPath"
  },
  "data": {
    "connectorType": "critical",
    "priority": "high"
  }
}