{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/folio/main/json-schema/folio-workflow-schema.json",
  "title": "Workflow",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-mod-camunda-openapi-openapi.yml#/components/schemas/Workflow",
  "required": [
    "name",
    "versionTag"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "active": {
      "type": "boolean"
    },
    "deploymentId": {
      "type": "string"
    },
    "description": {
      "maxLength": 512,
      "minLength": 0,
      "type": "string"
    },
    "historyTimeToLive": {
      "minimum": 0,
      "type": "integer",
      "format": "int32"
    },
    "initialContext": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/JsonNode"
      }
    },
    "name": {
      "maxLength": 64,
      "minLength": 4,
      "type": "string"
    },
    "nodes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Node"
      }
    },
    "setup": {
      "$ref": "#/$defs/Setup"
    },
    "versionTag": {
      "maxLength": 64,
      "minLength": 1,
      "type": "string"
    }
  },
  "$defs": {
    "JsonNode": {
      "type": "object"
    },
    "Node": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "maxLength": 64,
          "minLength": 3,
          "type": "string"
        },
        "description": {
          "maxLength": 512,
          "minLength": 0,
          "type": "string"
        },
        "deserializeAs": {
          "type": "string",
          "readOnly": true
        },
        "identifier": {
          "type": "string"
        }
      }
    },
    "Setup": {
      "type": "object",
      "properties": {
        "asyncAfter": {
          "type": "boolean"
        },
        "asyncBefore": {
          "type": "boolean"
        }
      }
    }
  }
}