Skip to content

Commit 7bd7d9f

Browse files
authored
Merge pull request #760 from MicrosoftDocs/bentho/update-workflow-docs
Updating dotnet workflow events to latest.
2 parents f95e852 + 3e5168c commit 7bd7d9f

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

  • agent-framework/user-guide/workflows/core-concepts

agent-framework/user-guide/workflows/core-concepts/events.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@ There are built-in events that provide observability into the workflow execution
2424
```csharp
2525
// Workflow lifecycle events
2626
WorkflowStartedEvent // Workflow execution begins
27-
WorkflowCompletedEvent // Workflow reaches completion
27+
WorkflowOutputEvent // Workflow outputs data
2828
WorkflowErrorEvent // Workflow encounters an error
29+
WorkflowWarningEvent // Workflow encountered a warning
2930
3031
// Executor events
31-
ExecutorInvokeEvent // Executor starts processing
32-
ExecutorCompleteEvent // Executor finishes processing
33-
ExecutorFailureEvent // Executor encounters an error
32+
ExecutorInvokedEvent // Executor starts processing
33+
ExecutorCompletedEvent // Executor finishes processing
34+
ExecutorFailedEvent // Executor encounters an error
35+
AgentRunResponseEvent // An agent run produces output
36+
AgentRunUpdateEvent // An agent run produces a streaming update
3437
3538
// Superstep events
3639
SuperStepStartedEvent // Superstep begins
@@ -65,22 +68,22 @@ RequestInfoEvent # A request is issued
6568
::: zone pivot="programming-language-csharp"
6669

6770
```csharp
68-
using Microsoft.Agents.Workflows;
71+
using Microsoft.Agents.AI.Workflows;
6972

7073
await foreach (WorkflowEvent evt in run.WatchStreamAsync())
7174
{
7275
switch (evt)
7376
{
74-
case ExecutorInvokeEvent invoke:
77+
case ExecutorInvokedEvent invoke:
7578
Console.WriteLine($"Starting {invoke.ExecutorId}");
7679
break;
7780

78-
case ExecutorCompleteEvent complete:
81+
case ExecutorCompletedEvent complete:
7982
Console.WriteLine($"Completed {complete.ExecutorId}: {complete.Data}");
8083
break;
8184

82-
case WorkflowCompletedEvent finished:
83-
Console.WriteLine($"Workflow finished: {finished.Data}");
85+
case WorkflowOutputEvent output:
86+
Console.WriteLine($"Workflow output: {output.Data}");
8487
return;
8588

8689
case WorkflowErrorEvent error:

0 commit comments

Comments
 (0)