FlowDrop Workflow Specification 1.0-draft

A served port omits everything that matches the default

The wire shape is lean by divergence, which means a client cannot read absence as "unknown". Absence is the default, and the defaults are fixed here.

The rule

Normative: this is the rule
  1. A served port emits defaultValue only where it is not null, exposedByDefault only where it is false, and displayOrder only where it is not 0.
  2. A client must read the absence of those keys as no default, exposed, and order 0 respectively.

What it means

Only the literal value null, false, or 0 counts as "the default", not anything a caller might read as falsy. A default value of false, an empty string or an empty list is still a default the author set, and it is emitted; a display order of a negative number diverges from 0 just as much as a positive one does, and is emitted too. A client that treats "absent" as loosely as "falsy" reintroduces exactly the ambiguity the divergence rule was meant to remove.

Example

A port with none of the three set at all serialises to nothing but the six core keys:

A port with no default, own exposure, or explicit orderomitted
{
  "id": "plain",
  "name": "Plain",
  "type": "input",
  "dataType": "string",
  "required": false,
  "description": ""
}

A port whose default is the literal value false still carries the key:

The defaultValue emitted when the default is literally falsekept
false

And a negative display order is emitted the same as a positive one:

The displayOrder emitted when the order is -5kept
-5
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 · SCH-27 · changed in spec 1.0