Execution order is a topological order, and no more than that
Two nodes with no dependency between them can run in either relative order. An edge is how an author makes one come before the other.
The rule
- The execution order MUST be a topological order of the execution dependencies: a node MUST NOT precede a node it depends on.
- The relative order of nodes with no dependency relation between them is not specified.
- An author MUST NOT rely on it.
What it means
The order that comes out of compilation is a topological order and nothing more: a node runs only after everything it depends on, but two nodes with no dependency between them can come out in either relative order. An implementation can even produce the same order on every run without that constancy being anything an author can depend on — nothing about a node's identifier or its position in the stored workflow decides the order; only a wire does. Forcing one node to run before another that it does not otherwise need means adding an edge between them.
Example
One node, root, feeds two others, zulu and alpha, which share no
dependency between themselves. One order the implementation produced:
["root", "zulu", "alpha"]root comes before both, because both depend on it. The relative order of zulu and alpha is
not guaranteed by this run or any other — only an edge between them, which
this workflow does not draw, would fix it.
Why
Recorded under OPEN-25.