Node

interface Node

A unit of work in a workflow graph.

Node names must be unique within a graph, since the scheduler keys on them.

Every member except name and description requires opting in to ExperimentalWorkflowApi, so implementing a node does too; those two need no opt-in because App, Runner and InvocationContext expose a node as stable API.

Inheritors

Properties

Link copied to clipboard

The node's retry policy and execution timeout.

Link copied to clipboard

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

Link copied to clipboard

Validates the node's input before it runs.

Link copied to clipboard
abstract val name: String

Identifies the node within its graph.

Link copied to clipboard

Validates the output value the node emits. A value assigned to Context.output and a message-as-output event's content are not checked.

Link copied to clipboard

Whether the node runs only once every predecessor has completed, receiving all their outputs keyed by node name. A fan-in node overrides this to true.

Link copied to clipboard

On resume, whether to run the node again from scratch rather than completing it with the resuming answer as its output.

Link copied to clipboard

Declares the state keys the node uses. Child nodes inherit it unless they declare their own.

Link copied to clipboard

Whether the node stays re-triggerable until it produces an output or a route, instead of completing when its run completes.

Functions

Link copied to clipboard
abstract fun runNode(context: Context, nodeInput: Any?): Flow<Any?>

The user-facing implementation of the node's execution logic.