Skip to content

BPMN Panel API / Panel Types / Node

Type Alias: Node

ts
type Node = {
  typeName: string;
  bpmnType?: BpmnNodeKind;
  card: NodeCard;
  events?: PanelEvent[];
};

Defined in: features/panels/variants/bpmn/types/panel/graph/node/index.ts:347

Configuration for BPMN node display and editing operations.

This type defines how backend entities are displayed and edited:

  • Visual card configuration (how it appears on canvas)
  • Edit/delete operations for existing nodes
  • Optional BPMN type override

Key Concepts

Separation from Toolbar:

  • Node config = "How to display/edit existing elements"
  • Toolbar item = "How to create new elements"

Type System:

  • typeName = Backend entity type (e.g., "WFTaskInstance")
  • bpmnType = Optional BPMN rendering override. When omitted, runtime infers start/end/gateway kinds from typeName, then falls back to task.

CRUD Operations

Create: Configured via toolbar events (onObjectCreate) on ToolbarNodeItem (creation happens from palette)

Update: Triggered when user double-clicks or selects "edit" on existing node

  • Opens modal with update.fields, pre-filled with current data
  • If update.editor is provided, opens full object editor instead
  • Submits form, executing update.request
  • Node refreshes with updated data

Delete: Triggered when user selects "delete" on existing node

  • Optionally shows confirmation
  • Executes delete.request
  • Node is removed from canvas

Examples

Basic node configuration

json
{
  "typeName": "WFTaskInstance",
  "card": {
    "title": "{{name}}",
    "subtitle": "{{status}}",
    "fields": [
      { "key": "assignee", "label": "Assignee" }
    ]
  },
  "update": {
    "fields": [
      { "key": "name", "label": "Task Name" }
    ],
    "request": {
      "parent": "WFTaskInstance",
      "method": "update"
    }
  },
  "delete": {
    "request": {
      "parent": "WFTaskInstance",
      "method": "delete"
    }
  }
}

Node with BPMN type override

json
{
  "typeName": "WFStartTaskInstance",
  "bpmnType": "startEvent",
  "card": {
    "title": "Start: {{name}}"
  }
}

Node with editor for updates

json
{
  "typeName": "WFTaskInstance",
  "card": {
    "title": "{{name}}",
    "subtitle": "{{status}}",
    "fields": [
      { "key": "assignee", "label": "Assignee" }
    ]
  },
  "update": {
    "fields": [],
    "request": {
      "parent": "WFTaskInstance",
      "method": "update"
    },
    "editor": {
      "mode": "modal",
      "entityType": {
        "object": {
          "metaTypeName": "WFTaskInstance"
        }
      },
      "fields": [
        { "attribute": "name", "label": "Task Name" },
        { "attribute": "assignee", "label": "Assignee" },
        { "attribute": "status", "label": "Status" }
      ]
    }
  },
  "delete": {
    "request": {
      "parent": "WFTaskInstance",
      "method": "delete"
    }
  }
}

Properties

PropertyTypeDescription

typeName

string

Backend entity type identifier.

This represents the backend entity type (e.g., "WFTaskInstance"). It is used to:

  • Match backend objects by metaType.typeName
  • Reference from toolbar items via typeName

Important: This is NOT the BPMN node type!

  • typeName: "WFTaskInstance" (backend entity)
  • typeName: "task" (BPMN type - use bpmnType instead)

Uniqueness: Each typeName in the nodes array must be unique to ensure correct matching with backend entities.

Examples

ts
"WFTaskInstance"
ts
"WFStartTaskInstance"
ts
"WFGatewayInstance"

bpmnType?

BpmnNodeKind

Optional BPMN node type override.

Overrides the inferred BPMN type for this backend entity. When omitted, runtime checks typeName for start, end/finish, exclusive gateway, or parallel gateway semantics, then falls back to task.

Use this when backend entity types don't follow naming conventions or when you want explicit control over rendering.

Example

json
{
  "bpmnType": "startEvent"
}

card

NodeCard

Configuration for displaying a node card.

Defines the visual appearance of nodes on the canvas.

See

NodeCard for detailed card configuration

events?

PanelEvent[]

Optional events configuration for the node.

List of panel events configuration for the node.

Example

json
[
  {
    "name": "onObjectUpdate",
    "actions": [
      {
        "name": "update",
        "editor": { ... }
      }
    ]
  },
  {
    "name": "onObjectDelete",
    "actions": [
      {
        "name": "delete",
        "request": { ... }
      }
    ]
  }
]