A parameter's when_missing flag is fail unless the node type says skip
Most required parameters fail their node when nothing resolves. A few, such as a trigger node's event, mean "this node has nothing to do" when nothing resolves. The flag lets a node type say which, and keeps the default every existing node type has.
The rule
- A parameter's
when_missingflag says what a missing value means:failorskip. - An implementation MUST treat a value it does not recognise as
fail. - The flag MUST be read from the node type's own parameter configuration, as the gate flags are (SCH-2).
- Where the node type records no value, an implementation MUST treat the flag as
fail. - The flag MUST have no effect on a parameter that is not required.
What it means
when_missing sits beside required, and only means something together with it.
required says the node cannot run without a value. when_missing says what that
absence means: fail (the node is broken, CFG-9) or skip (the node has nothing to
do, CFG-21). A node type that never mentions the flag gets fail, so every node type
that exists today behaves exactly as before.
The flag belongs to the node type, like the gate flags, and not to the author's node configuration: whether "nothing arrived" is an error is a property of what the node does.
Example
{ "event": { "connectable": true, "required": true, "when_missing": "skip" } }{ "prompt": { "connectable": true, "required": true } }Why
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.
A required skip parameter nothing supplies skips its node resolve-parameters
{ "given": { "parameters": { "x": { "schema": { "type": "string" }, "required": true, "when_missing": "skip", "connectable": true, "exposed": true, "configurable": true } } }, "expect": { "skipped": true } }