Interface IOrchestrationService
- Namespace
- DurableTask.Core
- Assembly
- DurableTask.Core.dll
Orchestration Service interface for performing task hub management operations and handling orchestrations and work items' state
public interface IOrchestrationService
Properties
EventBehaviourForContinueAsNew
Should we carry over unexecuted raised events to the next iteration of an orchestration on ContinueAsNew
BehaviorOnContinueAsNew EventBehaviourForContinueAsNew { get; }
Property Value
MaxConcurrentTaskActivityWorkItems
Gets the maximum number of concurrent task activity items
int MaxConcurrentTaskActivityWorkItems { get; }
Property Value
MaxConcurrentTaskOrchestrationWorkItems
Gets the maximum number of concurrent task orchestration items
int MaxConcurrentTaskOrchestrationWorkItems { get; }
Property Value
TaskActivityDispatcherCount
Gets the number of task activity dispatchers
int TaskActivityDispatcherCount { get; }
Property Value
TaskOrchestrationDispatcherCount
Gets the number of task orchestration dispatchers
int TaskOrchestrationDispatcherCount { get; }
Property Value
Methods
AbandonTaskActivityWorkItemAsync(TaskActivityWorkItem)
Abandons a single work item and releases the lock on it
Task AbandonTaskActivityWorkItemAsync(TaskActivityWorkItem workItem)
Parameters
workItem
TaskActivityWorkItem
Returns
AbandonTaskOrchestrationWorkItemAsync(TaskOrchestrationWorkItem)
Abandon an orchestration, this abandons ownership/locking of all messages for an orchestration and it's session
Task AbandonTaskOrchestrationWorkItemAsync(TaskOrchestrationWorkItem workItem)
Parameters
workItem
TaskOrchestrationWorkItem
Returns
CompleteTaskActivityWorkItemAsync(TaskActivityWorkItem, TaskMessage)
Atomically complete a work item and send the response messages
Task CompleteTaskActivityWorkItemAsync(TaskActivityWorkItem workItem, TaskMessage responseMessage)
Parameters
workItem
TaskActivityWorkItemresponseMessage
TaskMessage
Returns
CompleteTaskOrchestrationWorkItemAsync(TaskOrchestrationWorkItem, OrchestrationRuntimeState, IList<TaskMessage>, IList<TaskMessage>, IList<TaskMessage>, TaskMessage, OrchestrationState)
Complete an orchestration, send any outbound messages and completes the session for all current messages
Task CompleteTaskOrchestrationWorkItemAsync(TaskOrchestrationWorkItem workItem, OrchestrationRuntimeState newOrchestrationRuntimeState, IList<TaskMessage> outboundMessages, IList<TaskMessage> orchestratorMessages, IList<TaskMessage> timerMessages, TaskMessage continuedAsNewMessage, OrchestrationState orchestrationState)
Parameters
workItem
TaskOrchestrationWorkItemnewOrchestrationRuntimeState
OrchestrationRuntimeStateoutboundMessages
IList<TaskMessage>orchestratorMessages
IList<TaskMessage>timerMessages
IList<TaskMessage>continuedAsNewMessage
TaskMessageorchestrationState
OrchestrationState
Returns
CreateAsync()
Deletes and Creates the necessary resources for the orchestration service and the instance store
Task CreateAsync()
Returns
CreateAsync(bool)
Deletes and Creates the necessary resources for the orchestration service and optionally the instance store
Task CreateAsync(bool recreateInstanceStore)
Parameters
recreateInstanceStore
bool
Returns
CreateIfNotExistsAsync()
Creates the necessary resources for the orchestration service and the instance store
Task CreateIfNotExistsAsync()
Returns
DeleteAsync()
Deletes the resources for the orchestration service and the instance store
Task DeleteAsync()
Returns
DeleteAsync(bool)
Deletes the resources for the orchestration service and optionally the instance store
Task DeleteAsync(bool deleteInstanceStore)
Parameters
deleteInstanceStore
bool
Returns
GetDelayInSecondsAfterOnFetchException(Exception)
Inspects an exception to get a custom delay based on the exception (e.g. transient) properties for a fetch exception
int GetDelayInSecondsAfterOnFetchException(Exception exception)
Parameters
exception
Exception
Returns
GetDelayInSecondsAfterOnProcessException(Exception)
Inspects an exception to get a custom delay based on the exception (e.g. transient) properties for a process exception
int GetDelayInSecondsAfterOnProcessException(Exception exception)
Parameters
exception
Exception
Returns
IsMaxMessageCountExceeded(int, OrchestrationRuntimeState)
Checks the message count against the threshold to see if a limit is being exceeded
bool IsMaxMessageCountExceeded(int currentMessageCount, OrchestrationRuntimeState runtimeState)
Parameters
currentMessageCount
intruntimeState
OrchestrationRuntimeState
Returns
LockNextTaskActivityWorkItem(TimeSpan, CancellationToken)
Wait for an lock the next task activity to be processed
Task<TaskActivityWorkItem> LockNextTaskActivityWorkItem(TimeSpan receiveTimeout, CancellationToken cancellationToken)
Parameters
receiveTimeout
TimeSpancancellationToken
CancellationToken
Returns
LockNextTaskOrchestrationWorkItemAsync(TimeSpan, CancellationToken)
Wait for the next orchestration work item and return the orchestration work item
Task<TaskOrchestrationWorkItem> LockNextTaskOrchestrationWorkItemAsync(TimeSpan receiveTimeout, CancellationToken cancellationToken)
Parameters
receiveTimeout
TimeSpancancellationToken
CancellationToken
Returns
ReleaseTaskOrchestrationWorkItemAsync(TaskOrchestrationWorkItem)
Release the lock on an orchestration, releases the session, decoupled from CompleteTaskOrchestrationWorkItemAsync to handle nested orchestrations
Task ReleaseTaskOrchestrationWorkItemAsync(TaskOrchestrationWorkItem workItem)
Parameters
workItem
TaskOrchestrationWorkItem
Returns
RenewTaskActivityWorkItemLockAsync(TaskActivityWorkItem)
Renew the lock on a still processing work item
Task<TaskActivityWorkItem> RenewTaskActivityWorkItemLockAsync(TaskActivityWorkItem workItem)
Parameters
workItem
TaskActivityWorkItem
Returns
RenewTaskOrchestrationWorkItemLockAsync(TaskOrchestrationWorkItem)
Renew the lock on an orchestration
Task RenewTaskOrchestrationWorkItemLockAsync(TaskOrchestrationWorkItem workItem)
Parameters
workItem
TaskOrchestrationWorkItem
Returns
StartAsync()
Starts the service initializing the required resources
Task StartAsync()
Returns
StopAsync()
Stops the orchestration service gracefully
Task StopAsync()
Returns
StopAsync(bool)
Stops the orchestration service with optional forced flag
Task StopAsync(bool isForced)
Parameters
isForced
bool