← Files EW AI FlowchartARCHIVED FILE

references/efd-2.1.schema.json

14.5 KB · Sep 30, 2026 · 23:16 UTC

↓ Download file

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://efd.local/schemas/efd-2.1.schema.json",
  "title": "EFD 2.1 organization, authority and node responsibility model",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "workspace", "project", "organizationUnits", "positions", "process", "layout", "drawioMapping"],
  "properties": {
    "schemaVersion": { "const": "efd-2.1" },
    "workspace": { "$ref": "#/$defs/workspace" },
    "project": { "$ref": "#/$defs/project" },
    "organizationUnits": { "type": "array", "items": { "$ref": "#/$defs/unit" } },
    "positions": { "type": "array", "items": { "$ref": "#/$defs/position" } },
    "authorityLevels": { "type": "array", "items": { "$ref": "#/$defs/authorityLevel" } },
    "externalParties": { "type": "array", "items": { "$ref": "#/$defs/participant" } },
    "systemActors": { "type": "array", "items": { "$ref": "#/$defs/participant" } },
    "aiWorkers": { "type": "array", "items": { "$ref": "#/$defs/participant" } },
    "process": { "$ref": "#/$defs/process" },
    "layout": { "$ref": "#/$defs/layout" },
    "drawioMapping": { "$ref": "#/$defs/mapping" },
    "retiredIds": { "type": "array", "items": { "$ref": "#/$defs/id" }, "uniqueItems": true }
  },
  "$defs": {
    "id": { "type": "string", "pattern": "^[A-Z][A-Z0-9]*-[A-Za-z0-9._-]+$" },
    "named": {
      "type": "object",
      "required": ["id", "name"],
      "properties": { "id": { "$ref": "#/$defs/id" }, "name": { "type": "string", "minLength": 1 } }
    },
    "workspace": {
      "type": "object", "additionalProperties": false, "required": ["id", "name"],
      "properties": { "id": { "$ref": "#/$defs/id" }, "name": { "type": "string", "minLength": 1 } }
    },
    "project": {
      "type": "object", "additionalProperties": false, "required": ["id", "workspaceId", "name"],
      "properties": { "id": { "$ref": "#/$defs/id" }, "workspaceId": { "$ref": "#/$defs/id" }, "name": { "type": "string", "minLength": 1 } }
    },
    "unit": {
      "type": "object", "additionalProperties": false, "required": ["id", "name", "typeCode", "active", "order"],
      "properties": {
        "id": { "$ref": "#/$defs/id" }, "name": { "type": "string", "minLength": 1 },
        "typeCode": { "type": "string", "minLength": 1 }, "parentId": { "$ref": "#/$defs/id" },
        "active": { "type": "boolean" }, "order": { "type": "integer", "minimum": 0 },
        "colorToken": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" }
      }
    },
    "position": {
      "type": "object", "additionalProperties": false, "required": ["id", "name", "unitIds", "active", "order"],
      "properties": {
        "id": { "$ref": "#/$defs/id" }, "name": { "type": "string", "minLength": 1 },
        "unitIds": { "type": "array", "items": { "$ref": "#/$defs/id" }, "minItems": 1, "uniqueItems": true },
        "active": { "type": "boolean" }, "order": { "type": "integer", "minimum": 0 },
        "functionName": { "type": "string" }, "authorityLevelId": { "$ref": "#/$defs/id" },
        "authorizationUnitIds": { "type": "array", "items": { "$ref": "#/$defs/id" }, "uniqueItems": true },
        "effectiveFrom": { "type": "string" }, "effectiveTo": { "type": "string" }
      }
    },
    "authorityLevel": {
      "type": "object", "additionalProperties": false, "required": ["id", "name", "active", "order"],
      "properties": { "id": { "$ref": "#/$defs/id" }, "name": { "type": "string", "minLength": 1 }, "rank": { "type": "integer" }, "approvalScope": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "active": { "type": "boolean" }, "order": { "type": "integer", "minimum": 0 } }
    },
    "participant": {
      "type": "object", "additionalProperties": false, "required": ["id", "name", "active"],
      "properties": { "id": { "$ref": "#/$defs/id" }, "name": { "type": "string", "minLength": 1 }, "unitId": { "$ref": "#/$defs/id" }, "active": { "type": "boolean" } }
    },
    "raci": {
      "type": "object", "additionalProperties": false, "required": ["participantType", "participantId", "roles"],
      "properties": {
        "id": { "$ref": "#/$defs/id" }, "participantType": { "enum": ["position", "system", "external_party", "ai_worker"] }, "participantId": { "$ref": "#/$defs/id" }, "unitId": { "$ref": "#/$defs/id" },
        "roles": { "type": "array", "items": { "enum": ["R", "A", "C", "I"] }, "minItems": 1, "uniqueItems": true }, "confirmationStatus": { "enum": ["confirmed", "pending"] }
      }
    },
    "stage": {
      "type": "object", "additionalProperties": false, "required": ["id", "name", "order"],
      "properties": { "id": { "$ref": "#/$defs/id" }, "name": { "type": "string", "minLength": 1 }, "order": { "type": "integer", "minimum": 0 }, "active": { "type": "boolean" }, "description": { "type": "string" } }
    },
    "node": {
      "type": "object", "additionalProperties": false, "required": ["id", "type", "name", "stageId", "unitIds", "raci"],
      "properties": {
        "id": { "$ref": "#/$defs/id" }, "type": { "enum": ["start", "end", "task", "decision", "event", "artifact", "system_action", "exception", "approval", "note", "group"] },
        "name": { "type": "string", "minLength": 1 }, "stageId": { "$ref": "#/$defs/id" },
        "unitIds": { "type": "array", "items": { "$ref": "#/$defs/id" }, "uniqueItems": true },
        "raci": { "type": "array", "items": { "$ref": "#/$defs/raci" } },
        "semanticStatus": { "enum": ["confirmed", "pending"] }
      }
    },
    "edge": {
      "type": "object", "additionalProperties": false, "required": ["id", "sourceId", "targetId", "type"],
      "properties": {
        "id": { "$ref": "#/$defs/id" }, "sourceId": { "$ref": "#/$defs/id" }, "targetId": { "$ref": "#/$defs/id" },
        "type": { "enum": ["sequence", "decision_yes", "decision_no", "exception", "escalation", "rework", "information", "document_input", "document_output", "dependency"] },
        "label": { "type": "string" }
      }
    },
    "process": {
      "type": "object", "additionalProperties": false, "required": ["id", "projectId", "name", "modelKind", "stages", "nodes", "edges"],
      "properties": {
        "id": { "$ref": "#/$defs/id" }, "projectId": { "$ref": "#/$defs/id" }, "name": { "type": "string", "minLength": 1 },
        "modelKind": { "enum": ["as_is", "to_be"] }, "basedOnVersionId": { "$ref": "#/$defs/id" },
        "stages": { "type": "array", "items": { "$ref": "#/$defs/stage" }, "minItems": 1 },
        "nodes": { "type": "array", "items": { "$ref": "#/$defs/node" } },
        "edges": { "type": "array", "items": { "$ref": "#/$defs/edge" } }
      }
    },
    "layout": {
      "type": "object", "additionalProperties": false, "required": ["processId", "items"],
      "properties": {
        "processId": { "$ref": "#/$defs/id" },
        "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["efdId", "x", "y", "width", "height"], "properties": {
          "efdId": { "$ref": "#/$defs/id" }, "x": { "type": "number" }, "y": { "type": "number" }, "width": { "type": "number", "exclusiveMinimum": 0 }, "height": { "type": "number", "exclusiveMinimum": 0 }, "zIndex": { "type": "integer" }, "locked": { "type": "boolean" }, "autoFitText": { "type": "boolean" },
          "shapeId": { "type": "string", "minLength": 1 }, "shapeLibrary": { "enum": ["efd", "drawio-general"] }, "shapeVersion": { "type": "string", "minLength": 1 },
          "rotation": { "type": "number", "minimum": -360, "maximum": 360 }, "fillColor": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" }, "strokeColor": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" }, "strokeWidth": { "type": "number", "minimum": 0, "maximum": 16 },
          "lineStyle": { "enum": ["solid", "dashed", "dotted"] }, "opacity": { "type": "number", "minimum": 0, "maximum": 1 }, "shadow": { "type": "boolean" },
          "textStyle": { "type": "object", "additionalProperties": false, "properties": {
            "fontFamily": { "type": "string", "minLength": 1, "maxLength": 120 }, "fontSize": { "type": "number", "minimum": 10, "maximum": 48 }, "fontWeight": { "enum": [400, 500, 600, 700] }, "color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" },
            "horizontalAlign": { "enum": ["left", "center", "right"] }, "verticalAlign": { "enum": ["top", "middle", "bottom"] }, "lineHeight": { "type": "number", "minimum": 1, "maximum": 2.5 }, "letterSpacing": { "type": "number", "minimum": -1, "maximum": 8 },
            "paddingTop": { "type": "number", "minimum": 0, "maximum": 80 }, "paddingRight": { "type": "number", "minimum": 0, "maximum": 80 }, "paddingBottom": { "type": "number", "minimum": 0, "maximum": 80 }, "paddingLeft": { "type": "number", "minimum": 0, "maximum": 80 },
            "maxLines": { "type": ["integer", "null"], "minimum": 1, "maximum": 12 }, "wrap": { "type": "boolean" }, "overflow": { "enum": ["clip", "ellipsis", "visible"] }
          } }
        } } },
        "direction": { "enum": ["left_to_right", "right_to_left", "top_to_bottom", "bottom_to_top", "free"] },
        "viewMode": { "enum": ["canvas", "overview"] },
        "overview": { "type": "object", "additionalProperties": false, "required": ["id", "layoutVersion", "titleHeight", "headerHeight", "stageHeaderWidth", "unitColumnWidth", "raciPositionWidth", "raciMinimumWidth", "specificationWidth", "footerHeight", "stageRows"], "properties": {
          "layoutVersion": { "enum": ["efd-overview-2", "efd-overview-3"] },
          "id": { "$ref": "#/$defs/id" }, "titleHeight": { "type": "number", "minimum": 60, "maximum": 180 }, "headerHeight": { "type": "number", "minimum": 40, "maximum": 120 },
          "stageHeaderWidth": { "type": "number", "minimum": 96, "maximum": 360 }, "unitColumnWidth": { "type": "number", "minimum": 90, "maximum": 520 },
          "raciPositionWidth": { "type": "number", "minimum": 42, "maximum": 520 }, "raciMinimumWidth": { "type": "number", "minimum": 60, "maximum": 12000 }, "specificationWidth": { "type": "number", "minimum": 220, "maximum": 800 },
          "footerHeight": { "type": "number", "minimum": 60, "maximum": 360 }, "unitColumnIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }, "stageRows": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["stageId", "order", "height"], "properties": {
            "stageId": { "$ref": "#/$defs/id" }, "order": { "type": "integer", "minimum": 0 }, "height": { "type": "number", "minimum": 72, "maximum": 720 }, "collapsed": { "type": "boolean" }
          } } },
          "headerTextStyle": { "type": "object", "additionalProperties": false, "properties": {
            "fontFamily": { "type": "string", "minLength": 1, "maxLength": 120 }, "fontSize": { "type": "number", "minimum": 8, "maximum": 32 },
            "fontWeight": { "enum": [400, 500, 600, 700] }, "color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" }
          } },
          "stageTextStyle": { "type": "object", "additionalProperties": false, "properties": {
            "fontFamily": { "type": "string", "minLength": 1, "maxLength": 120 }, "fontSize": { "type": "number", "minimum": 8, "maximum": 32 },
            "fontWeight": { "enum": [400, 500, 600, 700] }, "color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" }
          } }
        } },
        "organizationBoard": { "type": "object", "additionalProperties": false, "required": ["id", "orientation", "unitLaneIds", "unitHeaderWidth", "workflowAreaWidth", "raciPanelWidth"], "properties": {
          "id": { "$ref": "#/$defs/id" }, "orientation": { "const": "horizontal" }, "unitLaneIds": { "type": "array", "items": { "$ref": "#/$defs/id" }, "uniqueItems": true },
          "unitHeaderWidth": { "type": "number", "minimum": 96, "maximum": 360 }, "workflowAreaWidth": { "type": "number", "minimum": 480, "maximum": 5000 }, "raciPanelWidth": { "type": "number", "minimum": 220, "maximum": 640 },
          "headerHeight": { "type": "number", "minimum": 32, "maximum": 100 }, "unassignedLaneHeight": { "type": "number", "minimum": 80, "maximum": 520 }, "showUnassignedLane": { "type": "boolean" }
        } },
        "unitLanes": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["id", "unitId", "order", "height"], "properties": {
          "id": { "$ref": "#/$defs/id" }, "unitId": { "$ref": "#/$defs/id" }, "order": { "type": "integer", "minimum": 0 }, "height": { "type": "number", "minimum": 80, "maximum": 520 },
          "collapsed": { "type": "boolean" }, "migrationSource": { "const": "organization_unit" }
        } } },
        "edges": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["efdId"], "properties": {
          "efdId": { "$ref": "#/$defs/id" }, "sourceAnchor": { "enum": ["top", "right", "bottom", "left"] }, "targetAnchor": { "enum": ["top", "right", "bottom", "left"] },
          "waypoints": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["x", "y"], "properties": { "x": { "type": "number" }, "y": { "type": "number" } } } },
          "strokeWidth": { "type": "number", "minimum": 1, "maximum": 8 }, "arrowSize": { "type": "number", "minimum": 6, "maximum": 24 },
          "startArrow": { "enum": ["none", "classic", "block", "open"] }, "endArrow": { "enum": ["none", "classic", "block", "open"] },
          "lineStyle": { "enum": ["solid", "dashed", "dotted"] }, "pathType": { "enum": ["straight", "polyline", "orthogonal", "curve"] }, "routingMode": { "enum": ["auto", "manual", "locked"] },
          "cornerRadius": { "type": "number", "minimum": 0, "maximum": 24 }, "color": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" },
          "opacity": { "type": "number", "minimum": 0.2, "maximum": 1 }, "labelPosition": { "type": "number", "minimum": 0, "maximum": 1 },
          "labelFontSize": { "type": "number", "minimum": 8, "maximum": 24 }, "labelBold": { "type": "boolean" }, "zIndex": { "type": "integer" }, "locked": { "type": "boolean" }
        } } }
      }
    },
    "mapping": {
      "type": "object", "additionalProperties": false, "required": ["mappingVersion", "processId", "cells"],
      "properties": {
        "mappingVersion": { "const": "efd-drawio-1" }, "processId": { "$ref": "#/$defs/id" },
        "cells": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["efdId", "cellId", "objectType"], "properties": {
          "efdId": { "$ref": "#/$defs/id" }, "cellId": { "type": "string", "minLength": 1 }, "objectType": { "enum": ["start", "end", "task", "decision", "event", "artifact", "system_action", "exception", "approval", "note", "group", "edge"] }
        } } }
      }
    }
  }
}

SHA-256: 42da1cfa16052e35a6f9e4dbc59cba223bc927510ce4cdfc35615a65ad1b89d0