Skip to content

BPMN Panel API / Panel Types / ToolbarEdgeItem

Type Alias: ToolbarEdgeItem ​

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

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

Toolbar item for creating BPMN edges

  • Defines how to create connections between nodes from the palette.
  • Existing connectors are rendered directly from backend Link resources.

Key Concepts ​

Separation of Concerns:

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

Backend Integration:

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

Type Declaration ​

NameTypeDescription

bpmnType?

BpmnEdgeKind

BPMN edge type for rendering.

request

{ linkName: string; source?: BpmnEdgeEndpoint; target?: BpmnEdgeEndpoint; }

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 type.

Examples

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

request.source?

BpmnEdgeEndpoint

Optional persisted source override.

When omitted, the Object GUID represented by the visual source node is used. When configured, the endpoint must resolve; creation is rejected instead of silently falling back to that Object GUID.

request.target?

BpmnEdgeEndpoint

Optional persisted target override.

When omitted, the Object GUID represented by the visual target node is used. When configured, the endpoint must resolve; creation is rejected instead of silently falling back to that Object GUID.

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"
  }
}