Skip to content

A dynamic port declares a name, a label and a data type

The rule

Normative: this is the rule
  1. Every dynamic port definition MUST carry a name and a label.
  2. It can carry exposedByDefault, a boolean, the default exposure of the port it adds, read as a node type's is (EXPO-2, CFG-2).
  3. A dynamic parameter definition can also carry the gate flags connectable, configurable and required, which mean what they mean on a declared parameter and default as they do there (CFG-1).
  4. Any definition can carry a schema, a JSON Schema 2020-12 fragment of the same kind a node type's declared parameter and output schemas hold, and it can carry a dataType.
  5. Where schema is present it is the port's schema, its lane derives from it as any property's does (SCH-10), and dataType MUST be ignored.
  6. Where schema is absent, dataType is the port's lane, and a definition with neither MUST be read as mixed.
  7. An authoring surface MUST NOT produce a definition whose lane is a control lane, because a dynamic port carries a value by definition.

What it means

A dynamic port definition has a name and a label, and says what the port carries in one of two ways. A dataType names a lane, and the port gets the JSON Schema type that lane stands for (DYN-8). A schema describes the port fully, with anything a node type's own port schemas can say, and then it is the port: its lane comes from it the way any property's does. With neither, the port is mixed and accepts any value.

Because a schema can say everything a node type can, an author can describe a node's ports without any processor declaring them, wire a workflow against them, and later switch the node to a processor that declares the same ports.

A dynamic parameter also says what kind of parameter it is, with the same gate flags a declared one carries: connectable makes it an input a wire can feed, configurable makes it a setting the author fills in, and both together give a setting a wire can override. Like any parameter, a flag left out is off.

An authoring surface never records a control lane for a dynamic port: a dynamic port is a value port by definition.

Example

Two dynamic parameters: an input by lane, a setting by schemaaccepted
[
  { "name": "topic", "label": "Topic", "dataType": "string", "connectable": true,
    "exposedByDefault": true },
  { "name": "limit", "label": "Limit", "configurable": true, "exposedByDefault": false,
    "schema": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 } }
]

topic is an input that accepts any string. limit is a setting in the node's config form, accepts an integer from 1 to 50, and is 10 until the author changes it.

Why

Recorded under OPEN-22, OPEN-25, OPEN-31, OPEN-33.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · DYN-2 · changed in spec 1.0