IDurableOrchestrationClient.TerminateAsync(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Terminates a running orchestration instance.
public System.Threading.Tasks.Task TerminateAsync (string instanceId, string reason);
abstract member TerminateAsync : string * string -> System.Threading.Tasks.Task
Public Function TerminateAsync (instanceId As String, reason As String) As Task
Parameters
- instanceId
- String
The ID of the orchestration instance to terminate.
- reason
- String
The reason for terminating the orchestration instance.
Returns
A task that completes when the terminate message is enqueued if necessary.
Exceptions
The instance id does not corespond to a valid orchestration instance.
The orchestration instance with the provided instance id is not running.
Remarks
A terminated instance will eventually transition into the Terminated state. However, this transition will not happen immediately. Rather, the terminate operation will be queued in the task hub along with other operations for that instance. You can use the GetStatusAsync(String, Boolean, Boolean, Boolean) method to know when a terminated instance has actually reached the Terminated state.
Terminating an orchestration instance has no effect on any in-flight activity function executions or sub-orchestrations that were started by the current orchestration instance.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應