Class Workflow

java.lang.Object
com.google.adk.workflow.BaseNode
com.google.adk.workflow.Workflow
All Implemented Interfaces:
Node

@Experimental public final class Workflow extends BaseNode
A graph of nodes that is itself a node, so a workflow can go wherever a node can, including in another workflow.
  • Method Details

    • builder

      public static Workflow.Builder builder()
    • edges

      public com.google.common.collect.ImmutableList<Edge> edges()
      Returns the edges of the workflow's graph.
    • maxConcurrency

      public Optional<Integer> maxConcurrency()
      Returns the maximum number of nodes the workflow runs at once, or empty if there is no limit.
    • runNode

      public io.reactivex.rxjava3.core.Flowable<?> runNode(Context context, @Nullable Object nodeInput)
      Description copied from interface: Node
      Runs the node on nodeInput, the output it receives from its predecessors.

      An emitted Event passes through, and any other emitted value becomes the node's output (at most one per run); emit nothing for no output, since RxJava forbids null. The wildcard lets an implementation return a Flowable of its own type.