DurableWorkflowOptions.AddWorkflow(Workflow) Method

Definition

Adds a workflow to the collection for processing or execution.

public void AddWorkflow(Microsoft.Agents.AI.Workflows.Workflow workflow);
member this.AddWorkflow : Microsoft.Agents.AI.Workflows.Workflow -> unit
Public Sub AddWorkflow (workflow As Workflow)

Parameters

workflow
Workflow

The workflow instance to add. Cannot be null.

Exceptions

Thrown when workflow is null.

Thrown when the workflow does not have a valid name.

Remarks

When a workflow is added, all executors are registered in the executor registry. Any AI agent executors will also be automatically registered with the DurableAgentsOptions if available.

Applies to