IAwaitableWorkflowRun Interface
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.
Represents a workflow run that can be awaited for completion.
public interface IAwaitableWorkflowRun : Microsoft.Agents.AI.DurableTask.Workflows.IWorkflowRun
type IAwaitableWorkflowRun = interface
interface IWorkflowRun
Public Interface IAwaitableWorkflowRun
Implements IWorkflowRun
- Implements
Remarks
This interface extends IWorkflowRun to provide methods for waiting until the workflow execution completes. Not all workflow runners support this capability.
Use pattern matching to check if a workflow run supports awaiting:
IWorkflowRun run = await client.RunAsync(workflow, input);
if (run is IAwaitableWorkflowRun awaitableRun)
{
string? result = await awaitableRun.WaitForCompletionAsync<string>();
}
Properties
| Name | Description |
|---|---|
| NewEventCount |
Gets the number of events emitted since the last access to NewEvents. (Inherited from IWorkflowRun) |
| NewEvents |
Gets all events emitted by the workflow since the last access to this property. (Inherited from IWorkflowRun) |
| OutgoingEvents |
Gets all events that have been emitted by the workflow. (Inherited from IWorkflowRun) |
| RunId |
Gets the unique identifier for the run. (Inherited from IWorkflowRun) |
Methods
| Name | Description |
|---|---|
| WaitForCompletionAsync<TResult>(CancellationToken) |
Waits for the workflow to complete and returns the result. |