Builder

Fluent builder for FunctionNode, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor. Java gets one from FunctionNodes.builder or toBuilder, which keep the port types and parallel-worker settings, because a port cannot decode without a type.

Functions

Link copied to clipboard

Sets the function the node runs on each input. Required, except on a parallel node, which runs its item node and so build rejects a body for one.

Link copied to clipboard

Builds the FunctionNode.

Link copied to clipboard

Sets the node's retry policy and execution timeout. A parallel node runs its items with the item node's config, so build rejects a non-default config for one.

Link copied to clipboard

Sets what the node does, for humans and for a model that may call it.

Link copied to clipboard
fun inputSchema(inputSchema: Schema?): FunctionNode.Builder<I, O>

Sets an explicit schema that each input must match before the body runs.

Link copied to clipboard

Sets the node's name, unique within its graph. Required.

Link copied to clipboard
fun outputSchema(outputSchema: Schema?): FunctionNode.Builder<I, O>

Sets an explicit schema that each output value must match.

Link copied to clipboard

Sets whether a resume runs the node again rather than using the resuming answer. A parallel node always reruns, so build rejects false for one.

Link copied to clipboard
fun stateSchema(stateSchema: Schema?): FunctionNode.Builder<I, O>

Sets the state keys the node uses, which child nodes inherit unless they declare their own.

Link copied to clipboard

Sets whether the node stays re-triggerable until it produces an output or a route.