Class NewWorkflowOption

java.lang.Object
io.dapr.workflows.client.NewWorkflowOption

public class NewWorkflowOption extends Object
Options for starting a new instance of a workflow.
  • Constructor Details

    • NewWorkflowOption

      public NewWorkflowOption()
  • Method Details

    • setVersion

      public NewWorkflowOption setVersion(String version)
      Sets the version of the workflow to start.
      Parameters:
      version - the user-defined version of workflow
      Returns:
      this NewWorkflowOption object
    • setInstanceId

      public NewWorkflowOption setInstanceId(String instanceId)
      Sets the instance ID of the workflow to start.

      If no instance ID is configured, the workflow will be created with a randomly generated instance ID.

      Parameters:
      instanceId - the ID of the new workflow
      Returns:
      this NewWorkflowOption object
    • setInput

      public NewWorkflowOption setInput(Object input)
      Sets the input of the workflow to start.
      Parameters:
      input - the input of the new workflow
      Returns:
      this NewWorkflowOption object
    • setStartTime

      public NewWorkflowOption setStartTime(Instant startTime)
      Sets the start time of the new workflow.

      By default, new workflow instances start executing immediately. This method can be used to start them at a specific time in the future.

      Parameters:
      startTime - the start time of the new workflow
      Returns:
      this NewWorkflowOption object
    • getVersion

      public String getVersion()
      Gets the user-specified version of the new workflow.
      Returns:
      the user-specified version of the new workflow.
    • getInstanceId

      public String getInstanceId()
      Gets the instance ID of the new workflow.
      Returns:
      the instance ID of the new workflow.
    • getInput

      public Object getInput()
      Gets the input of the new workflow.
      Returns:
      the input of the new workflow.
    • getStartTime

      public Instant getStartTime()
      Gets the configured start time of the new workflow instance.
      Returns:
      the configured start time of the new workflow instance.
    • getNewOrchestrationInstanceOptions

      public com.microsoft.durabletask.NewOrchestrationInstanceOptions getNewOrchestrationInstanceOptions()