Release candidate 0.2.0-rc.2
OBC · JSON schema
{
"$defs": {
"parameter": {
"additionalProperties": false,
"properties": {
"default": {
"description": "Default value if not provided."
},
"description": {
"description": "Parameter description.",
"type": "string"
},
"name": {
"description": "Parameter name.",
"pattern": "^[a-z][a-zA-Z0-9]*$",
"type": "string"
},
"required": {
"default": true,
"description": "Whether parameter is required.",
"type": "boolean"
},
"type": {
"description": "OTC type reference.",
"pattern": "^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9]*){3,}$",
"type": "string"
}
},
"required": [
"name",
"type"
],
"type": "object"
},
"step": {
"additionalProperties": false,
"properties": {
"action": {
"additionalProperties": true,
"description": "Action-specific configuration (for action steps).",
"type": "object"
},
"description": {
"description": "Step purpose.",
"minLength": 1,
"type": "string"
},
"events": {
"description": "Events emitted by this step (OEC references).",
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"description": "Unique step identifier within flow.",
"pattern": "^[a-z][a-z0-9_-]*$",
"type": "string"
},
"inputs": {
"additionalProperties": true,
"description": "Step input mapping.",
"type": "object"
},
"outputs": {
"additionalProperties": true,
"description": "Step output mapping.",
"type": "object"
},
"policies": {
"description": "Policies applied to this step (OPC references).",
"items": {
"type": "string"
},
"type": "array"
},
"retry": {
"additionalProperties": true,
"description": "Retry configuration.",
"properties": {
"backoff": {
"description": "Backoff strategy.",
"enum": [
"fixed",
"exponential",
"linear"
],
"type": "string"
},
"delay": {
"description": "Initial delay (ISO 8601 duration).",
"pattern": "^P(?:\\d+Y)?(?:\\d+M)?(?:\\d+D)?(?:T(?:\\d+H)?(?:\\d+M)?(?:\\d+(?:\\.\\d+)?S)?)?$",
"type": "string"
},
"maxAttempts": {
"description": "Maximum retry attempts.",
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"timeout": {
"description": "Maximum step duration (ISO 8601 duration).",
"pattern": "^P(?:\\d+Y)?(?:\\d+M)?(?:\\d+D)?(?:T(?:\\d+H)?(?:\\d+M)?(?:\\d+(?:\\.\\d+)?S)?)?$",
"type": "string"
},
"transitions": {
"description": "Conditions for moving to next steps.",
"items": {
"$ref": "#/$defs/transition"
},
"type": "array"
},
"type": {
"description": "Step type.",
"enum": [
"action",
"decision",
"subflow",
"event"
],
"type": "string"
}
},
"required": [
"id",
"type",
"description"
],
"type": "object"
},
"transition": {
"additionalProperties": true,
"description": "Transition condition definition.",
"type": "object"
}
},
"$id": "https://okham.org/schemas/obc/0.2.0/schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"description": "Unpublished 0.2.0 draft edition derived from the current OKHAM runtime catalogue. See the specification for semantic checks and coverage limits.",
"properties": {
"description": {
"description": "Purpose description.",
"minLength": 1,
"type": "string"
},
"id": {
"description": "Unique flow identifier.",
"pattern": "^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9]*){3,}$",
"type": "string"
},
"inputs": {
"description": "Typed input parameters (OTC references).",
"items": {
"$ref": "#/$defs/parameter"
},
"type": "array"
},
"metadata": {
"additionalProperties": true,
"description": "Additional metadata.",
"type": "object"
},
"name": {
"description": "Human-readable flow name.",
"minLength": 1,
"type": "string"
},
"outputs": {
"description": "Typed output values (OTC references).",
"items": {
"$ref": "#/$defs/parameter"
},
"type": "array"
},
"policies": {
"description": "Governance policies (OPC references).",
"items": {
"type": "string"
},
"type": "array"
},
"state": {
"additionalProperties": true,
"description": "Business state tracked during execution.",
"properties": {
"initial": {
"additionalProperties": true,
"description": "Initial state values.",
"type": "object"
},
"type": {
"description": "OTC type reference for state structure.",
"pattern": "^[a-z][a-z0-9]*(?:\\.[a-z][a-z0-9]*){3,}$",
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"steps": {
"description": "Flow steps.",
"items": {
"$ref": "#/$defs/step"
},
"minItems": 1,
"type": "array"
},
"version": {
"description": "Flow version (semver).",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
"type": "string"
}
},
"required": [
"id",
"name",
"description",
"steps"
],
"title": "OBC Flow Definition",
"type": "object",
"x-okham-identity-edition": "User-authorized local identity amendment: global contract identifiers use authority.domain.kind.name with lowercase alphanumeric dot-separated segments. Existing format and artifact versions and schema URIs are preserved. This annotation identifies a local amendment, not a published standards release."
}