Skip to main content

CWL Overview

Yardrail workflows are written in CWL v1.2 (Common Workflow Language) with a set of Yardrail-specific extensions under the yr: namespace. A workflow document is a YAML file that declares inputs, outputs, and a graph of steps — the runtime handles scheduling, data flow between steps, and durable execution via Temporal.

Namespace​

Every Yardrail CWL document must declare the extension namespace:

cwlVersion: v1.2
$namespaces:
yr: "https://yardrail.com/cwl#"

Document structure​

A minimal workflow:

cwlVersion: v1.2
$namespaces:
yr: "https://yardrail.com/cwl#"

class: yr:Workflow
label: "My Workflow"
doc: "What this workflow does"

inputs:
message:
type: string
label: "Message"

outputs: []

steps:
log_it:
run:
class: yr:Log
inputs:
message: string
outputs: []
in:
message: message
out: []

Inputs​

Workflow inputs define what the trigger caller provides. Standard CWL types are supported: string, int, float, boolean, File, Any, and nullable unions like ["null", string].

Yardrail adds one special input type — yr:Connector — which represents a connector port resolved at install/bind time rather than supplied by the trigger caller. The trigger-input modal filters these out automatically.

Outputs​

Outputs declare what the workflow produces. Each output references a step output via outputSource:

outputs:
result:
type: File
outputSource: process_step/output_file

Steps​

Each step has:

  • run — an inline process definition (the step class and its I/O schema)
  • in — maps workflow inputs or prior step outputs to this step's inputs
  • out — declares which outputs this step produces for downstream steps

Steps execute in dependency order — the runtime infers the DAG from in references.

Standard CWL classes​

Yardrail supports these standard CWL process classes alongside its extensions:

ClassPurpose
ExpressionToolInline JavaScript expression (requires InlineJavascriptRequirement)
CommandLineToolRuns a command in a container (requires DockerRequirement)
WorkflowStandard CWL sub-workflow (nested step graph)

Next steps​