Package io.dapr.workflows.client
Class NewWorkflowOptions
java.lang.Object
io.dapr.workflows.client.NewWorkflowOptions
Options for starting a new instance of a workflow.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInput()Gets the input of the new workflow.Gets the instance ID of the new workflow.Gets the configured start time of the new workflow instance.Gets the user-specified version of the new workflow.Sets the input of the workflow to start.setInstanceId(String instanceId) Sets the instance ID of the workflow to start.setStartTime(Instant startTime) Sets the start time of the new workflow.setVersion(String version) Sets the version of the workflow to start.
-
Constructor Details
-
NewWorkflowOptions
public NewWorkflowOptions()
-
-
Method Details
-
setVersion
Sets the version of the workflow to start.- Parameters:
version- the user-defined version of workflow- Returns:
- this
NewWorkflowOptionsobject
-
setInstanceId
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
NewWorkflowOptionsobject
-
setInput
Sets the input of the workflow to start.- Parameters:
input- the input of the new workflow- Returns:
- this
NewWorkflowOptionsobject
-
setStartTime
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. If set, Dapr will not wait for the workflow to "start" which can improve throughput of creating many workflows.
- Parameters:
startTime- the start time of the new workflow- Returns:
- this
NewWorkflowOptionsobject
-
getVersion
Gets the user-specified version of the new workflow.- Returns:
- the user-specified version of the new workflow.
-
getInstanceId
Gets the instance ID of the new workflow.- Returns:
- the instance ID of the new workflow.
-
getInput
Gets the input of the new workflow.- Returns:
- the input of the new workflow.
-
getStartTime
Gets the configured start time of the new workflow instance.- Returns:
- the configured start time of the new workflow instance.
-