ActionExecutor.ExecuteAsync 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.
Overloads
| Name | Description |
|---|---|
| ExecuteAsync(IWorkflowContext, CancellationToken) |
Executes the core logic of the action. |
| ExecuteAsync(IWorkflowContext, ActionExecutorResult, CancellationToken) |
Executes the core logic of the action. |
ExecuteAsync(IWorkflowContext, CancellationToken)
Executes the core logic of the action.
protected abstract System.Threading.Tasks.ValueTask<object?> ExecuteAsync(Microsoft.Agents.AI.Workflows.IWorkflowContext context, System.Threading.CancellationToken cancellationToken = default);
override this.ExecuteAsync : Microsoft.Agents.AI.Workflows.IWorkflowContext * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<obj>
Protected MustOverride Function ExecuteAsync (context As IWorkflowContext, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Object)
Parameters
- context
- IWorkflowContext
The workflow execution context providing messaging and state services.
- cancellationToken
- CancellationToken
A token that can be used to observe cancellation.
Returns
A ValueTask representing the asynchronous execution operation.
Applies to
ExecuteAsync(IWorkflowContext, ActionExecutorResult, CancellationToken)
Executes the core logic of the action.
protected override System.Threading.Tasks.ValueTask<object?> ExecuteAsync(Microsoft.Agents.AI.Workflows.IWorkflowContext context, Microsoft.Agents.AI.Workflows.Declarative.Kit.ActionExecutorResult message, System.Threading.CancellationToken cancellationToken = default);
override this.ExecuteAsync : Microsoft.Agents.AI.Workflows.IWorkflowContext * Microsoft.Agents.AI.Workflows.Declarative.Kit.ActionExecutorResult * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<obj>
Protected Overrides Function ExecuteAsync (context As IWorkflowContext, message As ActionExecutorResult, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Object)
Parameters
- context
- IWorkflowContext
The workflow execution context providing messaging and state services.
- message
- ActionExecutorResult
The the message handled by this executor.
- cancellationToken
- CancellationToken
A token that can be used to observe cancellation.
Returns
A ValueTask representing the asynchronous execution operation.