Interface IOrchestrationServiceClient
- Namespace
- DurableTask.Core
- Assembly
- DurableTask.Core.dll
Interface to allow creation of new task orchestrations and query their status.
public interface IOrchestrationServiceClient
Methods
CreateTaskOrchestrationAsync(TaskMessage)
Creates a new orchestration
Task CreateTaskOrchestrationAsync(TaskMessage creationMessage)
Parameters
creationMessage
TaskMessageOrchestration creation message
Returns
Exceptions
- OrchestrationAlreadyExistsException
Will throw an OrchestrationAlreadyExistsException exception If any orchestration with the same instance Id exists in the instance store.
CreateTaskOrchestrationAsync(TaskMessage, OrchestrationStatus[])
Creates a new orchestration and specifies a subset of states which should be de duplicated on in the client side
Task CreateTaskOrchestrationAsync(TaskMessage creationMessage, OrchestrationStatus[] dedupeStatuses)
Parameters
creationMessage
TaskMessageOrchestration creation message
dedupeStatuses
OrchestrationStatus[]States of previous orchestration executions to be considered while de-duping new orchestrations on the client
Returns
Exceptions
- OrchestrationAlreadyExistsException
Will throw an OrchestrationAlreadyExistsException exception If any orchestration with the same instance Id exists in the instance store and it has a status specified in dedupeStatuses.
ForceTerminateTaskOrchestrationAsync(string, string)
Forcefully terminate the specified orchestration instance
Task ForceTerminateTaskOrchestrationAsync(string instanceId, string reason)
Parameters
Returns
GetOrchestrationHistoryAsync(string, string)
Get a string dump of the execution history of the specified orchestration instance specified execution (generation) of the specified instance
Task<string> GetOrchestrationHistoryAsync(string instanceId, string executionId)
Parameters
Returns
GetOrchestrationStateAsync(string, bool)
Get a list of orchestration states from the instance storage for the most current execution (generation) of the specified instance.
Task<IList<OrchestrationState>> GetOrchestrationStateAsync(string instanceId, bool allExecutions)
Parameters
instanceId
stringInstance id
allExecutions
boolTrue if method should fetch all executions of the instance, false if the method should only fetch the most recent execution
Returns
- Task<IList<OrchestrationState>>
List of OrchestrationState objects that represents the list of orchestrations in the instance store
GetOrchestrationStateAsync(string, string)
Get a list of orchestration states from the instance storage for the specified execution (generation) of the specified instance.
Task<OrchestrationState> GetOrchestrationStateAsync(string instanceId, string executionId)
Parameters
Returns
- Task<OrchestrationState>
The OrchestrationState of the specified instanceId or null if not found
PurgeOrchestrationHistoryAsync(DateTime, OrchestrationStateTimeRangeFilterType)
Purges orchestration instance state and history for orchestrations older than the specified threshold time. Also purges the blob storage.
Task PurgeOrchestrationHistoryAsync(DateTime thresholdDateTimeUtc, OrchestrationStateTimeRangeFilterType timeRangeFilterType)
Parameters
thresholdDateTimeUtc
DateTimeThreshold date time in UTC
timeRangeFilterType
OrchestrationStateTimeRangeFilterTypeWhat to compare the threshold date time against
Returns
SendTaskOrchestrationMessageAsync(TaskMessage)
Send a new message for an orchestration
Task SendTaskOrchestrationMessageAsync(TaskMessage message)
Parameters
message
TaskMessageMessage to send
Returns
SendTaskOrchestrationMessageBatchAsync(params TaskMessage[])
Send a new set of messages for an orchestration
Task SendTaskOrchestrationMessageBatchAsync(params TaskMessage[] messages)
Parameters
messages
TaskMessage[]Messages to send
Returns
WaitForOrchestrationAsync(string, string, TimeSpan, CancellationToken)
Wait for an orchestration to reach any terminal state within the given timeout
Task<OrchestrationState> WaitForOrchestrationAsync(string instanceId, string executionId, TimeSpan timeout, CancellationToken cancellationToken)
Parameters
instanceId
stringInstance id of the orchestration
executionId
stringExecution id of the orchestration
timeout
TimeSpanMaximum amount of time to wait
cancellationToken
CancellationTokenTask cancellation token