Class NodeRunner

java.lang.Object
com.google.adk.workflow.NodeRunner

@Experimental public final class NodeRunner extends Object
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. It stamps every emitted event with its author, node path, and branch before forwarding it, and records the node's output, routes, interrupts, and failure on the node state of the returned context. runRoot(com.google.adk.workflow.Node, com.google.adk.agents.InvocationContext, java.util.function.Function<? super com.google.adk.events.Event, ? extends io.reactivex.rxjava3.core.Single<com.google.adk.events.Event>>) runs a node as the root of an invocation, and runChild(com.google.adk.agents.Context, com.google.adk.workflow.Node, java.lang.Object, com.google.adk.workflow.RunNodeConfig) runs one as a child that another node starts itself.
  • Method Details

    • runRoot

      @Experimental public static io.reactivex.rxjava3.core.Flowable<Event> runRoot(Node node, InvocationContext context, Function<? super Event,? extends io.reactivex.rxjava3.core.Single<Event>> processEvent)
      Runs node as the root of context on the invocation's user content, passing each event through processEvent in order; only Runner should call this method. The node is asked for its next event, and its failure is signaled, only after the previous non-partial event is processed and emitted, so a failure follows the error event that reports it. If processing an event fails with an exception, the failures reported by unprocessed error events are attached to it as suppressed.
    • runChild

      @Experimental public static io.reactivex.rxjava3.core.Maybe<Object> runChild(Context parent, Node node, @Nullable Object nodeInput, RunNodeConfig config)
      Runs node as a child of the node whose context is parent, as Context.runNode(Node, Object, RunNodeConfig) describes. Nodes call that method; this one is public only so Context can call it from another package.