Constant

Flow control Pure Generic
Constant
Value
Value

Description

Pure function holding one fixed scalar value of a type you choose, for feeding a generic node that has no type of its own yet (an enum value into Select boolean, say). It is a literal, not a computation, so its `value` input takes a typed-in value only and cannot be wired. In graph JSON, set the type in the node config: `valueType` is one of STRING, INTEGER, DECIMAL, BOOLEAN, DATETIME or ENUM (STRING when absent), and for ENUM `enumType` names the enum, for example HttpMethod, or the name of an enum model. Put the value itself in the `value` input as a scalarValue string: config {"valueType": "INTEGER"} with input value scalarValue "5" yields the integer 5; config {"valueType": "ENUM", "enumType": "HttpMethod"} with scalarValue "POST" yields that enum value. An empty value is the type's zero (empty string, 0, false, the epoch), except ENUM, which must have a value. DATETIME takes an ISO-8601 timestamp with offset, e.g. 2026-01-31T09:00:00Z. The `value` output is typed by the config, so whatever it is wired into is typed by it.

When to use

Use Constant when a generic node needs a value of a known type and nothing else in the pipeline can supply one. The typical case is an enum: Select boolean’s branches have no type until something typed is wired into one of them, and an enum value has no node of its own. Place a Constant, pick Enum as the type, pick the enum (for example HTTP method) and then the value, and wire it into the branch. The other branch, and the Result, take the same enum.

Pick the type on the node first, then type the value: changing the type clears the value, and the editor offered is the one for the new type. Any enum can be chosen, built-in or one your models define. For a plain string, number or true/false on a pin that already has a type you do not need a Constant, since every such pin has its own editor.

Pins

Input pins

Pin Type Default Notes
Value generic — The value itself, typed into the node using the editor for the chosen type. It has no connection point: a constant is a literal, not something computed from other nodes. Changing the type clears it. An enum constant starts on the first entry of the chosen enum.

Output pins

Pin Type Notes
Value generic The value, as the type picked on the node. The output is never null, and it is concrete from the moment the node is placed, so wiring it into a generic input such as When true on Select boolean gives that node its type.

Example

Choose the HTTP method from a condition. Place a Select boolean and two Constants. Set both Constants to the Enum type with the HTTP method enum, and their values to POST and GET. Wire the first into When true and the second into When false, wire a boolean into Condition, and wire Result into the Method input of an HTTP request.

See also