Class RunNodeConfig

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

@Experimental public abstract class RunNodeConfig extends Object
Configuration for running a child node with Context.runNode(com.google.adk.workflow.Node).
  • Constructor Details

    • RunNodeConfig

      public RunNodeConfig()
  • Method Details

    • runId

      public abstract Optional<String> runId()
      Returns the ID of the child's run, which names the run in node paths and branches. A child that already recorded an output under the same ID, in this run of the caller or in an earlier turn, returns it without running again; one that finished without an output may run again. When this ID is empty, the child receives the next number among the caller's runs of nodes with the same name, in call order, so concurrent children need explicit IDs.
    • useAsOutput

      public abstract boolean useAsOutput()
      Returns whether the child's output is also the caller's output. When true, an output the caller produces itself is dropped even if the child produces none, and a second one still fails the caller. Only a child that fails before emitting its output gives the output back to the caller.
    • useSubBranch

      public abstract boolean useSubBranch()
      Returns whether the child runs on its own sub-branch, <branch>.<name>@<runId>.
    • overrideBranch

      public abstract Optional<String> overrideBranch()
      Returns the branch the child runs on instead of its caller's, if any.
    • raiseOnWait

      public abstract boolean raiseOnWait()
      Returns whether a Workflow or wait-for-output child that finishes without an output ends its caller's run, as an interrupt does, instead of completing the call empty.
    • builder

      public static RunNodeConfig.Builder builder()
    • toBuilder

      public abstract RunNodeConfig.Builder toBuilder()