Package com.google.adk.workflow
package com.google.adk.workflow
-
ClassDescriptionBase class for nodes in a workflow graph.A predicate that decides for each input whether a
FunctionNoderun asks the user to approve it, set withFunctionNode.Builder.requireConfirmation(ConfirmationPredicate).An exception thatContext.runNode(Node)signals when the child node fails.A connection between two nodes in a workflow graph.A builder for the edges of a workflow graph, declared as chains of calls that start atEdgesBuilder.from(Node)orEdgesBuilder.fromStart().A chain of edges positioned at a node, started byEdgesBuilder.from(Node),EdgesBuilder.fromStart()orEdgesBuilder.NodeGroupChain.joinTo(JoinNode).A chain of edges positioned at a node group from a fan-out,EdgesBuilder.from(Node, Node, Node...), orEdgesBuilder.from(Collection), whichEdgesBuilder.NodeGroupChain.joinTo(JoinNode)connects to aJoinNode.A routing map configured inEdgesBuilder.EdgeChain.route(Consumer)that maps each route the source node may emit to the nodes it leads to, writtenr.on("billing").then(billing).A routing-map entry started byEdgesBuilder.RouteMap.on(String)whose routes have no target yet;EdgesBuilder.RouteMapEntry.then(Node, Node...)completes it.A set of routes that select a single edge, which fires once when its source emits any of them; separate edges to the same target would fire once each.FunctionNode<I,O> A workflow node that runs a Java function on each input, with a type per port; build one withFunctionNodes.of(String, Class, Class, NodeBody)orFunctionNodes.builder(Class, Class).FunctionNode.Builder<I,O> Fluent builder forFunctionNode.CreatesFunctionNodes with a type per port, as aClassor, for a generic type such asList<Order>, aTypeReference, read and written asFunctionNodedescribes.Thrown when a workflow graph is malformed, such as whenStartcannot reach a node or a cycle has no routed edge.A node that waits for every predecessor to complete, then outputs their outputs keyed by predecessor name.Builder forJoinNode.A unit of work in a workflow graph.NodeBody<I,O> The body of aFunctionNode, which takes the node run's context and its single input; the input may be shared with other nodes, so the body must not mutate it.A node's retry policy and execution timeout.Builder forNodeConfig.Base class for node failures raised by the workflow runtime, such asNodeTimeoutException.The state of one workflow node run, held by the run'sContext.The identity of the workflow-node activation that emitted anEvent.Builder forNodeInfo.Thrown when a node's input does not fit the node, such as a value of the wrong type for its input port or one the node cannot work on.The rules a node name follows so that the node paths and branches built from it stay intact.The runner for one workflow node, which times out an attempt that exceeds the node's optional timeout and retries the node as its retry policy allows.Thrown when a node's attempt outlasts the timeout thatNodeConfig.timeout()sets.Static factories for workflow nodes that run a node once per item of a list input.A node's request for user input, which pauses the workflow until the user answers it.Builder forRequestInput.How a node is retried when it fails.Builder forRetryConfig.A value on a workflow edge, and the value a node emits to select which of its outgoing edges are followed.The fallback edge, followed when no other routed edge of the node matches what it emitted, including when it emitted no route.A route identified by a boolean, for a two-way branch.A route identified by an integer.A route identified by a string, which is the common case.Configuration for running a child node withContext.runNode(Node).Builder forRunNodeConfig.The node that marks where a workflow graph starts.Static factories for workflow nodes that run aBaseTool, such as an MCP tool or an agent wrapped as a tool.A graph of nodes that is itself a node, so a workflow can go wherever a node can, including in another workflow.Builder forWorkflow.Thrown when a workflow or one of its nodes is declared in a way that cannot run.Thrown when data arriving during a run does not fit the receiving node, such as an answer it cannot route on.