FlowDrop Workflow Specification 1.0-draft

One name per concept for a node's type

A node has a type it is an instance of and a type it is drawn as. They are different things, and a payload that spells both the same way cannot be read without knowing who wrote it.

The rule

Normative: this is the rule
  1. A node type's identifier is node_type_id wherever it appears in a payload: job metadata, node metadata, a serialised node execution result, a node-status broadcast, a persisted session message.
  2. A node's visual type is visual_type in a per-node snapshot payload.
  3. The bare key node_type must not be written anywhere.
  4. A node's own identifier is node_id and is unaffected.

What it means

A node has two identities that a payload can be forgiven for confusing: the type it is an instance of, and the type it is drawn as in an editor. The first is node_type_id; the second is visual_type. A bare node_type key could carry either meaning, and a reader would have no way to tell which without already knowing which producer wrote it. The rule gives each concept its own name and forbids the shared one everywhere: job metadata, node metadata, a serialised node execution result, a node-status broadcast, a persisted session message, and a per-node snapshot all name the concept they mean, not the spelling that happens to be shortest.

A node's own identifier, node_id, is a third thing again and unaffected by any of this: it names which node, not what kind.

Example

A per-node snapshot spells the node's drawn type visual_type; a node execution result, carried on the same kind of event, spells the same node's type-it-is-an-instance-of node_type_id — two different concepts, on two different payloads, never the bare key.

A node snapshot's visual type
{"nodeStates": {"chat.1": {"metadata": {"visual_type": "terminal", "label": "Chat"}}}}
A node execution result, on the same node
{"nodeId": "chat.1", "output": {  }, "node_type_id": "chat_output"}
Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0-draft · STORE-13 · changed in spec 1.0