# Workflow Authoring

Workflow definitions, versions, triggers, executions and expression validation.

## Operations

```graphql
# Workflow Authoring (workflow-authoring)
# Workflow definitions, versions, triggers, executions and expression validation.
# Query
allWorkflowTriggers: [WorkflowTriggerState!]!  # List all triggers for the current tenant
analyzeWorkflowSource: String!  # Compile XML and analyze shared workflow contracts without executing operations; JSON analysis result
compileSchemaXML: String!  # Compile standalone XML schema syntax into JSON Schema without persisting it; host restrictions apply when embedded
generateDefaultDataQuery: String  # Generate a default GraphQL data query for an event topic
getExecution: WorkflowExecutionState  # Fetch a single workflow execution by ID
getExecutionSteps: [WorkflowExecutionStepState!]!  # Fetch all steps for a workflow execution
getMagicQueryGraphQL: MagicQueryOperation!  # Resolves a Magic Query string to the real GraphQL operation and variables it runs, so consumers can graduate from the façade to raw GraphQL
getMagicQuerySchema: MagicQuerySchema!  # Returns the input JSON Schema and output introspection for a Magic Query noun, so consumers (especially LLMs) can learn its contract before calling magicQuery
getTemplate: TemplateState  # Fetch a template by ID
getTemplateByHandle: TemplateState  # Fetch a template by handle
getTemplateVersion: TemplateVersionState  # Fetch one template version by ID
getWorkflow: WorkflowState  # Fetch a single workflow by ID
getWorkflowSchema: String!  # Get the JSON Schema for workflow definitions
getWorkflowVersion: WorkflowVersionState  # Fetch a single workflow version by ID
getWorkflowVersionSource: WorkflowVersionSource  # Read authoritative workflow XML for IaC, including canonical exports of legacy versions
helpChapter: HelpChapter  # Read a chapter of the current published manual edition
helpChapters: [HelpChapterInfo!]!  # List human-facing manual chapters from the running deployment
iacGuides: [IaCGuide!]!  # Every authoring guide, for a tool that syncs them to a folder
iacSchema: IaCSchemaDocument!  # The infrastructure-only view of this schema, for declarative tooling
iacSchemaDocument: IaCSchemaDocumentPayload!  # Fetch the JSON Schema document a SCHEMA-kind validator references, for declarative tooling
iacValidate: IaCValidationResult!  # Validate an infrastructure artifact
latestProgress: ProgressPointState  # Get the most recent progress snapshot for an operation
listDataChangeEventTopics: [DataChangeEventGroup!]!  # List all valid data change event topics, grouped by resource
listExecutionLogs: ExecutionLogConnection!  # List execution log entries for a given context, newest first
listExecutions: WorkflowExecutionConnection!  # List workflow executions with pagination
listMagicQueries: [MagicQueryInfo!]!  # Lists every available Magic Query noun with a short description and its options — the discovery entry point
listTemplateVersions: TemplateVersionConnection!  # List versions of a template with pagination
listTemplates: TemplateConnection!  # List templates with pagination and filtering
listWorkflowVersions: WorkflowVersionConnection!  # List workflow versions with pagination
listWorkflows: WorkflowConnection!  # List workflows with pagination
magicQuery: JSON!  # Executes a Magic Query string and returns the predefined query's JSON result
ping: String!  # Health check endpoint
productionSnapshot: ProductionSnapshot!  # Read production resources with batched evidence
queryProgressPoints: ProgressPointConnection!  # Query progress tracking points with time range and dimensional filters, keyset-paginated in descending timestamp order
renderSchemaXML: String!  # Render JSON Schema as native XML without dropping unsupported keywords or changing a saved document
schemaAuthoringCatalog: JSON!  # Compiler-owned vocabulary for the standalone XML JSON Schema dialect, including native form annotations
searchHelp: HelpSearchResult!  # Search human-facing manuals using shared semantic and text retrieval
workflowExecutionRuntimeManagement: WorkflowExecutionRuntimeManagementState  # Inspect the exact workflow runner authority and audited recovery revision
workflowRunHealth: [WorkflowRunHealth!]!  # Run health of every workflow in the tenant that has a run since `since` or a run currently waiting: failures in the window, waiting runs and the latest run's status
workflowRunStats: WorkflowRunStats!  # Aggregate a workflow's runs over a time window: totals by status, duration percentiles, time buckets and per-node outcomes
workflowTrigger: WorkflowTriggerState  # Get a workflow trigger by ID
workflowTriggers: [WorkflowTriggerState!]!  # List all triggers for a workflow
# Mutation
cancelExecution: CancelExecutionPayload!  # Cancel a running workflow execution
createTemplate: UpsertTemplatePayload!  # Create a new template
createWorkflow: WorkflowPayload!  # Create a new workflow
createWorkflowTrigger: WorkflowTriggerPayload!  # Create a new workflow trigger
createWorkflowVersion: WorkflowVersionPayload!  # Create a new version of a workflow
createWorkflowVersionFromSource: WorkflowVersionSourcePayload!  # Create an immutable workflow version from XML; validation is shared with all authoring paths
deleteTemplate: DeleteTemplatePayload!  # Delete a template and all its versions
deleteTemplateVersion: DeletePayload!  # Delete one version from a template's history
deleteWorkflow: DeleteWorkflowPayload!  # Delete a workflow and all its versions
deleteWorkflowTrigger: WorkflowTriggerPayload!  # Delete a workflow trigger
deleteWorkflowVersion: DeletePayload!  # Delete one version from a workflow's authoring history
deleteWorkflowVersionIfExists: DeletePayload!  # Idempotent workflow version cleanup; retains the active-version protection
disableWorkflowTrigger: WorkflowTriggerPayload!  # Disable a workflow trigger
enableWorkflowTrigger: WorkflowTriggerPayload!  # Enable a workflow trigger
executeWorkflow: ExecuteWorkflowPayload!  # Start a new workflow execution
exportWorkflow: ExportWorkflowPayload!  # Export a workflow version to YAML or JSON
importWorkflow: ImportWorkflowPayload!  # Import a workflow from YAML or JSON, creating a new version
publishTemplateVersion: PublishTemplateVersionPayload!  # Publish current template content as a new version
reconcileWorkflowExecutionRuntime: WorkflowExecutionPayload!  # Record authenticated, audited evidence that the exact predecessor process has terminated before workflow recovery
recordProgressPoints: RecordProgressPointsPayload!  # Record one or more progress tracking data points
renderTemplate: RenderTemplatePayload!  # Render a template with context data
resolveNodeOutputSchema: NodeOutputSchemaPayload!  # Resolve the best-effort JSON Schema for a node's output given its config — SwiftLua-inferred for script-backed kinds, falling back to the kind's static declared schema
restoreTemplateVersion: UpsertTemplatePayload!  # Restore template content from a previous version
resumeWorkflowExecution: WorkflowExecutionPayload!  # Resume a workflow execution that is waiting for an external signal
setActiveVersion: SetActiveVersionPayload!  # Set the active version of a workflow
updateTemplate: UpsertTemplatePayload!  # Update a template
updateWorkflow: WorkflowPayload!  # Update an existing workflow
updateWorkflowTrigger: WorkflowTriggerPayload!  # Update an existing workflow trigger
upsertTemplate: UpsertTemplatePayload!  # Create or update a template
validateJinja: ValidateJinjaResult!  # Statically validate a workflow expression (parse + filter-name check) without evaluating it
validateTemplate: ValidateTemplatePayload!  # Validate template syntax without saving
validateWorkflow: ValidateWorkflowPayload!  # Validate a workflow definition without importing it
# Subscription
dataChangeEvents: DataChangeEvent!  # Subscribe to real-time data change events
executionLogStream: ExecutionLogState!  # Stream execution log entries as they are written for a given context

# Call describe_operation(name) for arguments and input types.
```

## Exact schema

Download [complete SDL](/schemas/workflow-authoring.graphql) (168561 bytes). Use the SDL to validate operations; the digest omits argument signatures.

## Guides
- [Choose configured folders and storage](/docs/data-model/prepress#choose-configured-folders-and-storage)
- [Receive and organise production files](/docs/data-model/prepress#receive-and-organise-production-files)
- [Connect artwork to the component](/docs/data-model/prepress#connect-artwork-to-the-component)
- [Check artwork and inspect separations](/docs/data-model/prepress#check-artwork-and-inspect-separations)
- [Prepare imposition and production output](/docs/data-model/prepress#prepare-imposition-and-production-output)
- [Run configured prepress workflows](/docs/data-model/prepress#run-configured-prepress-workflows)
- [Prepress API reference](/docs/data-model/prepress-reference)
- [Manage reusable automation through IaC](/docs/data-model/prepress#manage-reusable-automation-through-iac)
- [Where scripts run](/docs/scripting/where-scripts-run)
- [What is a workflow](/docs/workflows/introduction)
- [Calling CoCoCo](/docs/scripting/calling-cococo)
- [Pure scripts](/docs/scripting/pure-scripts)
- [Values and expressions](/docs/workflows/values)
- [Workflows, webhooks and apps](/docs/scripting/workflows-and-apps)
- [Connections and branches](/docs/workflows/branches)
- [Lua scripts and data access](/docs/workflows/scripts)
- [Troubleshooting and safe operation](/docs/workflows/diagnostics)
- [The ctx reference](/docs/scripting/ctx-reference)
- [The SwiftLua Language Guide](/docs/scripting/language)
- [Workflow node config reference](/docs/workflows/node-reference)
- [Getting started with SwiftLua](/docs/scripting/getting-started)
- [Getting started](/docs/workflows/getting-started)