# Automation flowchart The flowchart is a second view of an automation package, not a second format. The engines run a package's `steps` top to bottom and have no jumps or nested branches, so the flowchart shows exactly that. ## Model - The graph is derived from the document on every draw and stores nothing of its own. Document to graph to document is the identity: every package field, every step object and the key order are kept. - Nodes: Start, one node per step, End, and Stopped when a procedure has a step that can stop it. - Edges the operator edits are `next` edges. There is exactly one chain from Start to End. - Derived edges are drawn but never edited: | Edge | From | To | Meaning | |---|---|---|---| | `false` | `compare` | Stopped (procedure), Next run (loop) | A false guard ends the run or the iteration | | `timeout` | `loop_until` | Stopped (procedure), Next run (loop) | A timeout ends the run or the iteration | | `repeat` | Next run | Start | A loop runs again after `interval_s` | ## Edits | Edit | Result | |---|---| | Connect A to B | B runs right after A and leaves its old place | | Connect Start to B | B runs first | | Connect A to End | A runs last | | Move | The step takes another place in the chain | | Insert | A new step after the chosen node | | Remove | The neighbours join | Refused: a node connected to itself, an edge out of End or Stopped, an edge into Start or Stopped, Start to End, and a step past the 64-step cap. ## Limits The format has no branch, so neither does the flowchart. A `compare` is a guard, not an if/else. Branching logic belongs in a `script` step. A graph format with branches would need engine and format support first. ## Checks `stepErrors` and `documentErrors` repeat the rules the server and the Warden apply to one step: required fields, comparisons, ranges, command words, output names and units, recipients, and duplicate output names. Point grammar and Rhai compilation stay on the server; the consumer puts the server's "Step N" refusal on node N.