Pipeline Templates
Pipeline templates store reusable parameter mappings for nodes in one pipeline. They are part of the Workflow Service pipeline aggregate, not standalone files and not global presets.
Data model
A template contains:
- a generated template ID;
- a name;
- an optional description;
- one or more node templates.
Each node template references a node_id already present in its owning pipeline and supplies that node's job parameters. Workflow Service rejects a template that references an unknown node.
The exact job-parameter shape depends on the service registered for that node. Current workers publish JSON Schema and UI Schema in their service metadata so clients can render the correct fields.
Add a template
Call the Workflow Service AddTemplate command for a pipeline aggregate. Conceptually:
{
"id": "pipeline-123",
"name": "Archive encode",
"description": "FFV1 archival output",
"node_templates": [
{
"node_id": "node-1",
"parameters": {
"input_source": ["file:///ingest/{{title}}.mkv"],
"output_source": ["s3://archive/{{title}}.mkv"],
"converter_type": "ffmpeg",
"config_name": "ffv1",
"config_source": "file:///etc/mediamoth/ffv1.json"
}
}
]
}The protobuf envelope is authoritative; the JSON above focuses on the user-visible relationship between a template, a node ID, and service parameters.
Update a template
Workflow Service supports UpdateTemplate. Supply the pipeline ID, template ID, and changed fields. An optional protobuf field mask can limit the update to name, description, or node_templates.
Without a field mask, non-empty supplied fields replace their current values. An update that produces no change emits no event.
Template deletion is not implemented by the current Workflow Service command surface.
Smart tags
Templates may contain {{key}} placeholders in string parameters. Job Service resolves them from the selected media when it creates the job sequence.
file:///library/{{series}}/S{{season}}E{{episode}}.mkvSee Smart Tags for parsing, override, missing-value, and execution-snapshot behavior.
Pipeline changes
Templates bind to node IDs, not node positions. When a pipeline update removes or replaces nodes, update its templates so every node template still references an existing ID. Both add and update validation reject unknown node IDs.
Templates versus encoding presets
These concepts solve different problems:
- A pipeline template stores job parameters for pipeline nodes.
- An FFmpeg or HandBrake preset is a file loaded by Video Service through
config_source.
A pipeline template can point at an encoding preset, but it does not contain or replace the preset itself.