schemas/README.md
This directory contains JSON Schema definitions for the core data models used in Conductor workflow orchestration.
JSON Schemas provide a standardized way to describe the structure, validation rules, and documentation for Conductor's data models. These schemas can be used for:
Purpose: Defines the structure of a workflow definition (template/blueprint).
Key Features:
Important Details:
WorkflowTask definition that supports complex workflow patterns:
decisionCases, defaultCase)forkTasks)loopOver, loopCondition)subWorkflowParam)Use Case: Use this schema when creating or validating workflow definitions before registering them with Conductor.
Purpose: Defines the structure of a task definition (reusable task template).
Key Features:
Important Details:
Use Case: Use this schema when creating or validating task definitions that will be referenced by workflows.
Purpose: Represents a runtime workflow instance (actual execution).
Key Features:
Important Details:
history field that stores previous executions for workflow versioning and auditingWorkflowDef that defines the workflow structureworkflowIdUse Case: Use this schema when querying workflow execution status or validating workflow runtime data.
Purpose: Represents a runtime task instance (actual task execution).
Key Features:
Important Details:
WorkflowTask template definitioniteration field tracks the current iteration numberexecutionMetadata provides detailed timing and worker context informationUse Case: Use this schema when querying individual task execution details or validating task runtime data.
All definition schemas (WorkflowDef, TaskDef, SchemaDef) inherit audit fields from the Auditable base class:
ownerApp: Application that owns this definitioncreateTime: Timestamp when created (milliseconds since epoch)updateTime: Timestamp when last updatedcreatedBy: User who created the definitionupdatedBy: User who last updated the definitionAdditionally, definitions implement the Metadata interface requiring:
name: Unique identifierversion: Version numberThe schemas correctly model two important recursive relationships in Conductor:
WorkflowTask recursion: Tasks can contain nested tasks for control flow
WorkflowTask
├── decisionCases: Map<String, List<WorkflowTask>>
├── defaultCase: List<WorkflowTask>
├── forkTasks: List<List<WorkflowTask>>
└── loopOver: List<WorkflowTask>
Schemas are defined to support JSON Schema validation using the $ref keyword. Both internal references (#/definitions/...) and external references are supported.
All enum types from the Java code are represented as string enums with allowed values explicitly listed:
RUNNING, COMPLETED, FAILED, TIMED_OUT, TERMINATED, PAUSEDIN_PROGRESS, CANCELED, FAILED, FAILED_WITH_TERMINAL_ERROR, COMPLETED, COMPLETED_WITH_ERRORS, SCHEDULED, TIMED_OUT, SKIPPEDRETRY, TIME_OUT_WF, ALERT_ONLYFIXED, EXPONENTIAL_BACKOFF, LINEAR_BACKOFFJSON, AVRO, PROTOBUF# Using ajv-cli
ajv validate -s schemas/WorkflowDef.json -d my-workflow.json
# Using Python with jsonschema
python -c "
import json
import jsonschema
with open('schemas/WorkflowDef.json') as f:
schema = json.load(f)
with open('my-workflow.json') as f:
workflow = json.load(f)
jsonschema.validate(workflow, schema)
print('Valid workflow definition!')
"
Most modern IDEs support JSON Schema for validation and autocomplete:
VS Code: Add this to the top of your JSON file:
{
"$schema": "./schemas/WorkflowDef.json",
"name": "my-workflow",
...
}
IntelliJ IDEA: Configure JSON Schema mappings in Settings → Languages & Frameworks → Schemas and DTDs → JSON Schema Mappings
All schemas conform to JSON Schema Draft 07 specification (http://json-schema.org/draft-07/schema#).
Key validation features used:
type: Data type constraintsrequired: Required fieldsminimum/maximum: Numeric boundsminLength/maxLength: String length constraintsminItems: Array minimum lengthpattern: Regular expression matchingenum: Allowed valuesformat: Data format hints (email, int64, etc.)default: Default valuesadditionalProperties: Allow/disallow extra fields$ref: Schema composition and reuseThese schemas are derived from the Java model classes in the Conductor codebase:
| Schema File | Java Class | Package |
|---|---|---|
| WorkflowDef.json | WorkflowDef | com.netflix.conductor.common.metadata.workflow |
| TaskDef.json | TaskDef | com.netflix.conductor.common.metadata.tasks |
| Workflow.json | Workflow | com.netflix.conductor.common.run |
| Task.json | Task | com.netflix.conductor.common.metadata.tasks |
The schemas accurately reflect:
Auditable and MetadataCurrent schema version: 1.0 Based on Conductor version: 3.x Last updated: October 2025