FunctionNode
A workflow Node backed by a suspending function that returns an O and may emit Events. An input that does not decode as I throws NodeInputValidationException; an output that is not an O or a Content, has no JSON form, or fails an explicit schema throws IllegalArgumentException.
Inline workflow steps use node or parallelNode, and Java callers use FunctionNodes, parallelOf and toBuilder; a schema set on a Builder is explicit.
Type Parameters
Expected type of nodeInput from predecessor nodes. A message reaches a Content or Any port as is, a port whose schema accepts a string as its text (a ByteArray reads it as base64), and any other typed port as JSON, converting only a quoted literal of the port's type and a whole number for an integer.
Type of the value the body returns, which is the node's output. Unit or null is no output, an Event passes through as it is, and a RequestInput fails. Any other value, a Content included, is output as its JSON form under O's serializer.
Types
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.
Properties
The node's retry policy and execution timeout.
What the node does, for humans and for a model that may call it.
Checks the input as JSON; the node receives the checked value unless it takes a Content. An edge fails to build when the predecessor's output schema admits values this one rejects; what that schema leaves open (no type, undeclared keys, undescribed ARRAY items) is checked at run time.
Validates the output value the node emits with the same rules, and the checked value is the output. A value set with Context.setOutput and a message-as-output event's content are not checked.
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.
On resume, whether to run the node again from scratch rather than completing it with the resuming answer as its output.
Declares the state keys the node uses. Child nodes inherit it unless they declare their own.
Whether the node stays re-triggerable until it produces an output or a route, instead of completing when runNode returns. A node that never produces either then waits forever, which is a graph-authoring error.
Functions
Runs the node and normalizes each raw emission of runNode into an Event: null and Unit are skipped, a RequestInput becomes an adk_request_input interrupt event, an Event keeps its content and has its output validated, and any other value becomes the output.
Returns a Builder initialized with this instance's properties, primarily for Java callers. Only explicitly set schemas are copied, not inferred ones, so the copy enforces the same schemas as this node.