Executor Class
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.
A component that processes messages in a Workflow.
public abstract class Executor : Microsoft.Agents.AI.Workflows.IIdentified
type Executor = class
interface IIdentified
Public MustInherit Class Executor
Implements IIdentified
- Inheritance
-
Executor
- Derived
- Implements
Constructors
| Name | Description |
|---|---|
| Executor(String, ExecutorOptions, Boolean) |
Initialize the executor with a unique identifier |
Properties
| Name | Description |
|---|---|
| Id |
A unique identifier for the executor. |
| InputTypes |
A set of Types, representing the messages this executor can handle. |
| Options |
Gets the configuration options for the executor. |
| OutputTypes |
A set of Types, representing the messages this executor can produce as output. |
Methods
| Name | Description |
|---|---|
| CanHandle(Type) |
Checks if the executor can handle a specific message type. |
| ConfigureRoutes(RouteBuilder) |
Override this method to register handlers for the executor. |
| ConfigureSentTypes() |
Override this method to declare the types of messages this executor can send. |
| ConfigureYieldTypes() |
Override this method to declare the types of messages this executor can yield as workflow outputs. |
| DescribeProtocol() |
Describes the protocol for communication with this Executor. |
| ExecuteAsync(Object, TypeId, IWorkflowContext, CancellationToken) |
Process an incoming message using the registered handlers. |
| InitializeAsync(IWorkflowContext, CancellationToken) |
Perform any asynchronous initialization required by the executor. This method is called once per executor instance, |
| OnCheckpointingAsync(IWorkflowContext, CancellationToken) |
Invoked before a checkpoint is saved, allowing custom pre-save logic in derived classes. |
| OnCheckpointRestoredAsync(IWorkflowContext, CancellationToken) |
Invoked after a checkpoint is loaded, allowing custom post-load logic in derived classes. |
Extension Methods
| Name | Description |
|---|---|
| BindExecutor(Executor) |
Configures an Executor instance for use in a workflow. |