Package io.dapr.durabletask
Class NewOrchestrationInstanceOptions
java.lang.Object
io.dapr.durabletask.NewOrchestrationInstanceOptions
Options for starting a new instance of an orchestration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAppID()Gets the configured target app ID for cross-app workflow routing.getInput()Gets the input of the new orchestration.Gets the instance ID of the new orchestration.Gets the configured start time of the new orchestration instance.Gets the user-specified version of the new orchestration.booleanhasAppID()Checks if an app ID is configured for cross-app routing.Sets the target app ID for cross-app workflow routing.Sets the input of the orchestration to start.setInstanceId(String instanceId) Sets the instance ID of the orchestration to start.setStartTime(Instant startTime) Sets the start time of the new orchestration instance.setVersion(String version) Sets the version of the orchestration to start.
-
Constructor Details
-
NewOrchestrationInstanceOptions
public NewOrchestrationInstanceOptions()Default constructor for theNewOrchestrationInstanceOptionsclass.
-
-
Method Details
-
setVersion
Sets the version of the orchestration to start.- Parameters:
version- the user-defined version of the orchestration- Returns:
- this
NewOrchestrationInstanceOptionsobject
-
setInstanceId
Sets the instance ID of the orchestration to start. If no instance ID is configured, the orchestration will be created with a randomly generated instance ID.- Parameters:
instanceId- the ID of the new orchestration instance- Returns:
- this
NewOrchestrationInstanceOptionsobject
-
setInput
Sets the input of the orchestration to start. There are no restrictions on the type of inputs that can be used except that they must be serializable using theDataConverterthat was configured for theDurableTaskClientat creation time.- Parameters:
input- the input of the new orchestration instance- Returns:
- this
NewOrchestrationInstanceOptionsobject
-
setStartTime
Sets the start time of the new orchestration instance. By default, new orchestration 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 orchestration instance- Returns:
- this
NewOrchestrationInstanceOptionsobject
-
setAppID
Sets the target app ID for cross-app workflow routing.- Parameters:
appID- the target app ID for cross-app routing- Returns:
- this
NewOrchestrationInstanceOptionsobject
-
getVersion
Gets the user-specified version of the new orchestration.- Returns:
- the user-specified version of the new orchestration.
-
getInstanceId
Gets the instance ID of the new orchestration.- Returns:
- the instance ID of the new orchestration.
-
getInput
Gets the input of the new orchestration.- Returns:
- the input of the new orchestration.
-
getStartTime
Gets the configured start time of the new orchestration instance.- Returns:
- the configured start time of the new orchestration instance.
-
getAppID
Gets the configured target app ID for cross-app workflow routing.- Returns:
- the configured target app ID
-
hasAppID
public boolean hasAppID()Checks if an app ID is configured for cross-app routing.- Returns:
- true if an app ID is configured, false otherwise
-