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. Building a workflow validates its graph and throws GraphValidationException for a malformed one.
  • 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)
      Runs the graph from its start node, which hands nodeInput to its successors. The output of the sole terminal node that produces one becomes the workflow's output. If more than one terminal node produces an output, the returned Flowable fails with WorkflowConfigurationException.