Class WorkflowBuilderCoTParams

All Implemented Interfaces:
HasHandlers

public class WorkflowBuilderCoTParams extends DataClass
The shape of process.state to populate before starting a WorkflowBuilderCoTProcess directly (its own class documentation covers the three ways this process may be invoked - as a sub-process of AI.buildUI(), standalone, or via the EventStream/UISession convergence).
  • Constructor Details

    • WorkflowBuilderCoTParams

      public WorkflowBuilderCoTParams()
    • WorkflowBuilderCoTParams

      public WorkflowBuilderCoTParams(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static WorkflowBuilderCoTParams getOrCreateRef(JavaScriptObject jsObj)
    • setComponentIDs

      public WorkflowBuilderCoTParams setComponentIDs(String... componentIDs)
      Optional array of UI component IDs the AI may target with a UI-action step (FormSetFieldValueTask/GridSelectRecordsTask/SelectTabTask/ ClickButtonTask, among others). When omitted or empty, pickStep does not offer UI-action step kinds at all - this process remains DataSource-operations-only unless a caller explicitly opts in.
      Parameters:
      componentIDs - New componentIDs value. Default value is null
      Returns:
      WorkflowBuilderCoTParams instance, for chaining setter calls
      See Also:
    • getComponentIDs

      public String[] getComponentIDs()
      Optional array of UI component IDs the AI may target with a UI-action step (FormSetFieldValueTask/GridSelectRecordsTask/SelectTabTask/ ClickButtonTask, among others). When omitted or empty, pickStep does not offer UI-action step kinds at all - this process remains DataSource-operations-only unless a caller explicitly opts in.
      Returns:
      Current componentIDs value. Default value is null
      See Also:
    • setDataSourceIDs

      public WorkflowBuilderCoTParams setDataSourceIDs(String... dataSourceIDs)
      Array of DataSource IDs the AI may target.
      Parameters:
      dataSourceIDs - New dataSourceIDs value. Default value is null
      Returns:
      WorkflowBuilderCoTParams instance, for chaining setter calls
      See Also:
    • getDataSourceIDs

      public String[] getDataSourceIDs()
      Array of DataSource IDs the AI may target.
      Returns:
      Current dataSourceIDs value. Default value is null
      See Also:
    • setDataSourceOperationsOnly

      public WorkflowBuilderCoTParams setDataSourceOperationsOnly(Boolean dataSourceOperationsOnly)
      When true, restricts pickStep so the AI cannot select anything but a DSFetchTask/DSAddTask/DSUpdateTask/DSRemoveTask - UI actions, notifications, and branch points are not offered at all. An explicit, enforced restriction, not just an emergent property of omitting componentIDs (which only keeps UI-action step kinds out - branching and notification steps are still offered unconditionally once other conditions are met).
      Parameters:
      dataSourceOperationsOnly - New dataSourceOperationsOnly value. Default value is false
      Returns:
      WorkflowBuilderCoTParams instance, for chaining setter calls
    • getDataSourceOperationsOnly

      public Boolean getDataSourceOperationsOnly()
      When true, restricts pickStep so the AI cannot select anything but a DSFetchTask/DSAddTask/DSUpdateTask/DSRemoveTask - UI actions, notifications, and branch points are not offered at all. An explicit, enforced restriction, not just an emergent property of omitting componentIDs (which only keeps UI-action step kinds out - branching and notification steps are still offered unconditionally once other conditions are met).
      Returns:
      Current dataSourceOperationsOnly value. Default value is false
    • setEditContext

      public WorkflowBuilderCoTParams setEditContext(EditContext editContext)
      The live EditContext the Workflow is being built in.
      Parameters:
      editContext - New editContext value. Default value is null
      Returns:
      WorkflowBuilderCoTParams instance, for chaining setter calls
    • getEditContext

      public EditContext getEditContext()
      The live EditContext the Workflow is being built in.
      Returns:
      Current editContext value. Default value is null
    • setExplorationHistory

      public WorkflowBuilderCoTParams setExplorationHistory(WorkflowExplorationEntry... explorationHistory)
      Optional. Pass forward the explorationHistory output of a prior invocation to carry exploration context into a later step of the same multi-step build session - this process does not persist state between separate create() calls on its own.
      Parameters:
      explorationHistory - New explorationHistory value. Default value is null
      Returns:
      WorkflowBuilderCoTParams instance, for chaining setter calls
    • getExplorationHistory

      public WorkflowExplorationEntry[] getExplorationHistory()
      Optional. Pass forward the explorationHistory output of a prior invocation to carry exploration context into a later step of the same multi-step build session - this process does not persist state between separate create() calls on its own.
      Returns:
      Current explorationHistory value. Default value is null
    • setExplorationSettings

      public WorkflowBuilderCoTParams setExplorationSettings(Map explorationSettings)
      Optional. When {enabled:true}, a candidate DataSource-fetch step is actually executed against the real DataSource before being committed, so its live result can inform this and later steps. readOnlyOnly (default true whenever exploration is enabled) restricts exploration to fetches only - add/update/remove candidates are refused without executing, since a write cannot be meaningfully "previewed" without actually performing it.
      Parameters:
      explorationSettings - New explorationSettings value. Default value is null
      Returns:
      WorkflowBuilderCoTParams instance, for chaining setter calls
    • getExplorationSettings

      public Map getExplorationSettings()
      Optional. When {enabled:true}, a candidate DataSource-fetch step is actually executed against the real DataSource before being committed, so its live result can inform this and later steps. readOnlyOnly (default true whenever exploration is enabled) restricts exploration to fetches only - add/update/remove candidates are refused without executing, since a write cannot be meaningfully "previewed" without actually performing it.
      Returns:
      Current explorationSettings value. Default value is null
    • setProcessEditNode

      public WorkflowBuilderCoTParams setProcessEditNode(EditNode processEditNode)
      The root Process EditNode within editContext to append the new task under.
      Parameters:
      processEditNode - New processEditNode value. Default value is null
      Returns:
      WorkflowBuilderCoTParams instance, for chaining setter calls
    • getProcessEditNode

      public EditNode getProcessEditNode()
      The root Process EditNode within editContext to append the new task under.
      Returns:
      Current processEditNode value. Default value is null
    • setSingleStep

      public WorkflowBuilderCoTParams setSingleStep(Boolean singleStep)
      When true, stepIntent is treated as exactly one atomic step (the original, pre-decomposition behavior) - no decomposition, no looping, and decideNextStep makes no AI call of its own. When absent/false (the default), stepIntent may describe a goal requiring several steps; the process keeps adding steps until the goal is satisfied or maxDecomposedSteps is reached.
      Parameters:
      singleStep - New singleStep value. Default value is false
      Returns:
      WorkflowBuilderCoTParams instance, for chaining setter calls
    • getSingleStep

      public Boolean getSingleStep()
      When true, stepIntent is treated as exactly one atomic step (the original, pre-decomposition behavior) - no decomposition, no looping, and decideNextStep makes no AI call of its own. When absent/false (the default), stepIntent may describe a goal requiring several steps; the process keeps adding steps until the goal is satisfied or maxDecomposedSteps is reached.
      Returns:
      Current singleStep value. Default value is false
    • setStepIntent

      public WorkflowBuilderCoTParams setStepIntent(String stepIntent)
      Natural-language description of the step to add. By default (see singleStep) this may describe a compound, multi-step goal; decideNextStep decomposes it. For a DataSource-operation step, may also explicitly describe failure handling (e.g. "...; if it fails, notify the user that the order could not be saved") - pickStep extracts that as an opt-in failureIntent and configureFailureHandler authors a ShowNotificationTask wired onto that one step's OWN failureElement (a Task-level handler, independent of Process.errorTask/ Process.errorTaskRef, the separate Process-wide default - see UnexpectedErrorTask). Only ever set when the intent explicitly names failure behavior; never invented.
      Parameters:
      stepIntent - New stepIntent value. Default value is null
      Returns:
      WorkflowBuilderCoTParams instance, for chaining setter calls
    • getStepIntent

      public String getStepIntent()
      Natural-language description of the step to add. By default (see singleStep) this may describe a compound, multi-step goal; decideNextStep decomposes it. For a DataSource-operation step, may also explicitly describe failure handling (e.g. "...; if it fails, notify the user that the order could not be saved") - pickStep extracts that as an opt-in failureIntent and configureFailureHandler authors a ShowNotificationTask wired onto that one step's OWN failureElement (a Task-level handler, independent of Process.errorTask/ Process.errorTaskRef, the separate Process-wide default - see UnexpectedErrorTask). Only ever set when the intent explicitly names failure behavior; never invented.
      Returns:
      Current stepIntent value. Default value is null
    • setUiEditContext

      public WorkflowBuilderCoTParams setUiEditContext(EditContext uiEditContext)
      Optional. The EditContext of the UI the Workflow is attached to (NOT this Workflow's own editContext - a different EditContext, holding component EditNodes rather than task EditNodes). When supplied, checked first to resolve each candidate component - but NOT required for grounding: any component in componentIDs that resolves as a live, drawn global via Canvas.getById() is grounded with its own fields/tabs/DataSource schema regardless of whether uiEditContext is supplied at all.
      Parameters:
      uiEditContext - New uiEditContext value. Default value is null
      Returns:
      WorkflowBuilderCoTParams instance, for chaining setter calls
    • getUiEditContext

      public EditContext getUiEditContext()
      Optional. The EditContext of the UI the Workflow is attached to (NOT this Workflow's own editContext - a different EditContext, holding component EditNodes rather than task EditNodes). When supplied, checked first to resolve each candidate component - but NOT required for grounding: any component in componentIDs that resolves as a live, drawn global via Canvas.getById() is grounded with its own fields/tabs/DataSource schema regardless of whether uiEditContext is supplied at all.
      Returns:
      Current uiEditContext value. Default value is null