Workflow example — load and segment
A complete, minimal workflow YAML: two nodes, one edge. It is the graph the
other examples build toward — with the
Image type, the
TIFF loader, and the
segmentation block in a project, this file
dropped into workflows/main.yaml runs unchanged.
The shape of the file
workflow:
id: main # the workflow's identity inside the project
version: 1.0.0
nodes:
- id: load-cells # the name you wire by, unique within the workflow
block_type: load_data # the registered block
config:
params: ... # the block's config_schema values
layout: ... # where the node sits on the canvas
edges:
- source: load-cells:data # "<node id>:<output port>"
target: segment:image # "<node id>:<input port>"
What to notice
block_typeis the registered name.load_datais the built-in Load block;segment_cellsis the drop-in block from the process example — thetype_nameits class declares. Custom blocks become usable the moment their file lands inblocks/.- Load dispatch is by (type, extension). The Load node declares
core_type: Imageand a path list; the registry routes.tiffiles to the loader that claims(Image, .tif). No capability id is written down — a drop-in block's id carries its source file's mtime, so naming one here would break on any other machine. - Paths are project-relative. A run executes with the project root as its
working directory, so
data/raw/cells_01.tifmeans<project>/data/raw/…. layoutis cosmetic. Positions are canvas coordinates; the graph's meaning is entirely innodesandedges.
For the full schema (conditions, mappings, sub-workflows, every accepted key), see the Workflow YAML page in the API reference.