Skip to content

.NET: Fix broken workflow samples#4800

Merged
peibekwe merged 5 commits intomainfrom
peibekwe/hil-sample-fix
Mar 20, 2026
Merged

.NET: Fix broken workflow samples#4800
peibekwe merged 5 commits intomainfrom
peibekwe/hil-sample-fix

Conversation

@peibekwe
Copy link
Copy Markdown
Contributor

Description

Fixing some workflow samples that were missed during polymorphic routing changes.

Fixes #4144

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@markwallace-microsoft markwallace-microsoft added .NET workflows Related to Workflows in agent-framework labels Mar 19, 2026
@github-actions github-actions bot changed the title Fix broken workflow samples .NET: Fix broken workflow samples Mar 19, 2026
@peibekwe peibekwe marked this pull request as ready for review March 19, 2026 22:09
Copilot AI review requested due to automatic review settings March 19, 2026 22:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates .NET workflow samples to work with polymorphic routing changes by explicitly declaring message/output types for executors.

Changes:

  • Add [SendsMessage] annotations to executors that dispatch messages so routing can resolve the intended message types.
  • Add [YieldsOutput] annotations to executors that emit final workflow outputs.
  • Minor formatting fix in the Loop sample (statement terminator).

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
dotnet/samples/03-workflows/_StartHere/06_MixedWorkflowAgentsAndExecutors/Program.cs Declares sent message types (ChatMessage, TurnToken) for executors involved in mixed agent/executor routing.
dotnet/samples/03-workflows/SharedStates/Program.cs Declares the aggregation executor’s yielded output type.
dotnet/samples/03-workflows/Loop/Program.cs Declares executor send/yield types and fixes a formatting issue in YieldOutputAsync call.
dotnet/samples/03-workflows/HumanInTheLoop/HumanInTheLoopBasic/WorkflowFactory.cs Declares judge executor send/yield types for correct routing/output behavior.
dotnet/samples/03-workflows/ConditionalEdges/03_MultiSelection/Program.cs Declares output yielding for terminal executors in multi-selection flow.
dotnet/samples/03-workflows/ConditionalEdges/02_SwitchCase/Program.cs Declares output yielding for terminal executors in switch-case flow.
dotnet/samples/03-workflows/ConditionalEdges/01_EdgeCondition/Program.cs Declares output yielding for terminal executors in edge-condition flow.
dotnet/samples/03-workflows/Concurrent/MapReduce/Program.cs Declares sent message types for each stage and the final yielded output type for completion.
dotnet/samples/03-workflows/Concurrent/Concurrent/Program.cs Declares sent message/output types for concurrent start/aggregation executors.
dotnet/samples/03-workflows/Checkpoint/CheckpointWithHumanInTheLoop/WorkflowFactory.cs Declares judge executor send/yield types for checkpoint + HITL scenario.
dotnet/samples/03-workflows/Checkpoint/CheckpointAndResume/WorkflowFactory.cs Declares guess/judge executor send/yield types for checkpoint-and-resume scenario.
dotnet/samples/03-workflows/Checkpoint/CheckpointAndRehydrate/WorkflowFactory.cs Declares guess/judge executor send/yield types for checkpoint-and-rehydrate scenario.
dotnet/samples/03-workflows/Agents/WorkflowAsAnAgent/WorkflowFactory.cs Declares yielded output type for workflow-as-agent aggregation executor.

@peibekwe peibekwe added this pull request to the merge queue Mar 20, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Mar 20, 2026
@peibekwe peibekwe added this pull request to the merge queue Mar 20, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 20, 2026
@peibekwe peibekwe added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit 7e6d87e Mar 20, 2026
27 checks passed
@crickman crickman deleted the peibekwe/hil-sample-fix branch March 23, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET workflows Related to Workflows in agent-framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: [Bug]: Provided Human in the loop sample does not seem to work anymore with RC1

5 participants