Skip to content

BPMN Panel API / Panel Types / PanelTypeBpmn

Type Alias: PanelTypeBpmn

ts
type PanelTypeBpmn = PanelBase & {
  type: PanelType.Bpmn;
  request: BpmnPanelRequest;
  graph: Graph;
};

Defined in: features/panels/variants/bpmn/types/panel/panel.ts:233

BPMN Panel configuration

Uses @mes/bpmn package.

  • This configuration is not in the @mes/bpmn format.
  • The panel renderer will format it and fill with the data for @mes/bpmn.

Type Declaration

NameTypeDescription

type

PanelType.Bpmn

Panel type identifier

request

BpmnPanelRequest

Panel request

graph

Graph

Graph visualization configuration

Example

json
{
  "id": "workorder-bpmn",
  "type": "bpmn",
  "request": {
    "parent": "WFEntityInstance",
    "method": "getWorkFlowGraphState",
    "objects": [],
    "params": {},
    "getSelectedObjectForEventId": "workorder--on-object-select--link-table"
  },
  "graph": {
    "toolbar": {
      "items": [
        {
          "id": "startEvent",
          "bpmnType": "startEvent",
          "events": [
            {
              "id": "workorder-bpmn--toolbar--startEvent--onObjectCreate",
              "name": "onObjectCreate",
              "actions": [
                {
                  "id": "workorder-bpmn--toolbar--startEvent--create",
                  "name": "create",
                  "editor": {
                    "mode": "direct-request",
                    "entityType": {
                      "object": {
                        "metaTypeName": "WorkOrder"
                      }
                    },
                    "fields": [
                      {
                        "attribute": "itemId",
                        "label": "Номер"
                      },
                      {
                        "attribute": "name",
                        "label": "Наименование"
                      }
                    ]
                  }
                }
              ]
            }
          ]
        },
        {
          "id": "endEvent",
          "bpmnType": "endEvent",
          "events": [
            {
              "id": "workorder-bpmn--toolbar--endEvent--onObjectCreate",
              "name": "onObjectCreate",
              "actions": [
                {
                  "id": "workorder-bpmn--toolbar--endEvent--create",
                  "name": "create",
                  "editor": {
                    "mode": "direct-request",
                    "entityType": {
                      "object": {
                        "metaTypeName": "WorkOrder"
                      }
                    },
                    "fields": [
                      {
                        "attribute": "itemId",
                        "label": "Номер"
                      },
                      {
                        "attribute": "name",
                        "label": "Наименование"
                      }
                    ]
                  }
                }
              ]
            }
          ]
        },
        {
          "id": "task-WFTaskInstance",
          "bpmnType": "task",
          "typeName": "WFTaskInstance",
          "icon": "icon icon--task",
          "size": {
            "w": 292,
            "h": 132
          },
          "placeholderCard": {
            "title": "New Instruction"
          }
        },
        {
          "id": "quick-task",
          "bpmnType": "task",
          "typeName": "WFTaskInstance",
          "icon": "pi pi-check-circle",
          "size": {
            "w": 200,
            "h": 100
          },
          "placeholderCard": {
            "title": "Quick Task"
          }
        },
        {
          "id": "connection-standard",
          "bpmnType": "bpmn:SequenceFlow",
          "icon": "icon icon--arrow",
          "request": {
            "linkName": "WFConnectorInstance"
          }
        },
        {
          "id": "connection-critical",
          "bpmnType": "bpmn:SequenceFlow",
          "icon": "icon icon--arrow",
          "request": {
            "linkName": "WFConnectorInstance"
          },
          "data": {
            "connectorType": "critical"
          }
        }
      ],
      "showHand": true,
      "showConnect": false,
      "showOptimize": true,
      "showDelete": true
    },
    "nodes": [
      {
        "typeName": "WFTaskInstance",
        "bpmnType": "task",
        "card": {
          "title": "{{name}} + {{itemId}}",
          "subtitle": "",
          "fields": [
            {
              "key": "itemId",
              "label": "Обозначение"
            },
            [
              {
                "key": "created_at",
                "label": "Дата создания"
              },
              {
                "key": "modified_at",
                "label": "Дата изменения"
              }
            ]
          ]
        }
      },
      {
        "typeName": "WorkOrderOperation",
        "bpmnType": "task",
        "card": {
          "title": "{{name}} + {{itemId}}",
          "subtitle": "",
          "fields": [
            {
              "key": "itemId",
              "label": "Обозначение"
            },
            [
              {
                "key": "created_at",
                "label": "Дата создания"
              },
              {
                "key": "modified_at",
                "label": "Дата изменения"
              }
            ]
          ]
        },
        "update": {
          "editor": {
            "mode": "modal",
            "entityType": {
              "object": {
                "metaTypeName": "WFTaskInstance"
              }
            },
            "fields": [
              {
                "attribute": "name",
                "label": "Название"
              },
              {
                "attribute": "itemId",
                "label": "Обозначение"
              }
            ]
          }
        },
        "delete": {
          "request": {
            "parent": "WFTaskInstance",
            "method": "delete"
          }
        }
      }
    ],
    "edges": []
  }
}