Repository navigation
Advanced YAML Format
Use event YAML when you need explicit dependencies, branching, waiting, or process durations. Layout is automatic; YAML does not expose per-node coordinates. For narrated scenes and per-scene visibility or colors, use a storyboard.
This page is an introduction. The authoring reference is the complete keyword catalog for people and AI tools. The cookbook provides a complete fork/join/branch example.
diagram: { direction: TB, edgeLabels: true } # show payloads on connectors
groups:
- { id: platform, label: Platform }
- { id: data, label: Data tier, parent: platform }
nodes:
- { id: api, group: platform, shape: round, style: { fill: "#e6efff", stroke: "#2f6fed" } }
- { id: db, group: data, shape: cylinder }
flows:
- { id: f, from: api, to: db, payload: query, line: dotted, head: circle }rect, round, stadium, diamond, circle, cylinder, hexagon, subroutine, parallelogram, start, end, bar, and class.
-
line:solid,dotted, orthick. -
headandtail:none,arrow,circle,cross,triangle,diamond, ordiamond-filled.
By default, every node runs once, and every arrow carries one packet, in the order of the graph. Add events only when you need to control the order.
| Event | Used on | Purpose |
|---|---|---|
transfer |
Arrow | Moves a packet along the arrow |
process |
Node | Works on the input for a while |
emit |
Node | Sends output |
complete |
Node | Finishes the node |
wait |
Node | Waits until all the events listed in until: have finished |
join |
Sync point | Waits for all live inputs; continues if at least one path was taken |
fork |
Sync point | Dependency marker for parallel child events |
branch |
Node | Takes the events listed in select:. The others are skipped |
- Use
afterto declare that one step depends on another. - Use
fail: trueto end a process in an error state. - Events without dependencies run concurrently; list order does not serialize them.
- An omitted or empty
eventslist enables automatic graph animation.
Set these in the diagram: block, or on a single flow:
-
diagram.direction: the direction of the layout. UseLR(left to right, the default),RL,TB(top to bottom), orBT. -
diagram.edgeLabels:trueshows each flow'spayloadas a label on its arrow. The default isfalse. -
curve:truedraws a flow as a curve. Curves can help when arrows overlap. -
headLabelandtailLabel: a short note at the target or source end of a flow, such as1or0..*. Up to 20 characters. -
style: a set of colours and widths. The keys arefill,stroke,color, andstrokeWidth(0 to 12). You can usestyleon a node or a flow.
Use groups to draw a labelled box around nodes. A group can sit inside another group. Set parent to the id of the outer group.
groups:
- { id: platform, label: Platform }
- { id: data, label: Data tier, parent: platform }
nodes:
- { id: db, group: data, shape: cylinder }Use the animation: block to set how the diagram plays:
animation: { autoplay: true, loop: true, speed: 1 }-
autoplay:true(the default) starts the diagram when it appears. -
loop:true(the default) repeats the animation. -
speed: the speed multiplier, from 0.1 to 10. The default is 1.
-
wait(on a node) waits until every event listed inuntil:has finished. -
forkis a dependency marker. Its dependent events can start together; it does not create packets by itself.joinwaits for live predecessor events. -
branch(on a node) takes the events listed inselect:. The other events are skipped.
Use after: to show that a step must wait for another event, and duration: to set how long a step takes, in milliseconds (up to 60000).
A branch takes only the events it lists in select:. Each of those events must list the branch in its after::
nodes:
- { id: a, label: A }
- { id: b, label: B }
flows:
- { id: f, from: a, to: b }
events:
- { id: br, type: branch, node: a, select: [p1] }
- { id: p1, type: process, node: a, duration: 500, after: br }
- { id: w1, type: wait, node: b, until: [p1] }
- { id: t1, type: transfer, flow: f, after: w1 }- There is no
loopevent. Feedback loops are written as separate events. - A branch chooses its path from the list you write. FlowMotion does not calculate the choice from data.
- Writing diagrams for the text format.
- Playback and timing for the playback settings.
© 2026 @vrsarin. FlowMotion documentation.