Skip to content

An unconnected dynamic input falls back like any parameter

The rule

Normative: this is the rule
  1. A dynamic input (DYN-1) with nothing wired into it MUST fall back as any parameter does (CFG-6): it MUST take the default its schema declares, where it declares one, and otherwise MUST be absent from the node's resolved inputs.
  2. A null delivered on its wire MUST be present with the value null.
  3. Nothing arriving on the wire is not the same as a null arriving.

What it means

A dynamic input falls back like any parameter: where its schema declares a default, an unwired input takes it. Without one, as below, it is absent.

A dynamic input with nothing wired to it is left out of a node's resolved inputs. A processor reading its inputs tells "nothing arrived" from "a null arrived" by checking for the key: the key is there only when something was delivered, and its value is null only when a null was.

Example

A node declares two dynamic inputs, and only one has anything wired to it:

A dynamic input with nothing wired to it
{ "dynamicParameters": [{ "name": "connected", "label": "C", "dataType": "string", "connectable": true, "exposedByDefault": true }, { "name": "unconnected", "label": "U", "dataType": "string", "connectable": true, "exposedByDefault": true }], "connected": "value" }
What resolving the node's inputs returnsabsent
{ "connected": "value" }

Why

Recorded under OPEN-25, OPEN-26, OPEN-31.

Fixtures

Test cases whose outcome this rule decides. A case compares absent, null and empty members exactly; the fixtures README defines each operation. Where a case and the rule disagree, the rule is right.

  • An unwired dynamic input is absent; a null on its wire is present resolve-parameters
    {
      "given": {
        "parameters": {},
        "dynamicParameters": [
          {
            "name": "a",
            "connectable": true,
            "exposedByDefault": true
          },
          {
            "name": "b",
            "connectable": true,
            "exposedByDefault": true
          }
        ],
        "inputs": {
          "b": null
        }
      },
      "expect": {
        "resolved": {
          "b": null
        }
      }
    }

    fixtures/presence/dyn-unwired-absent-null-present.json

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-4 · changed in spec 1.0