From cde7ac1ef334a17b1f44e197208bb5884ebed2e5 Mon Sep 17 00:00:00 2001 From: feiyun0112 Date: Thu, 9 Jan 2025 01:59:13 +0800 Subject: [PATCH] .Net: fix bug: Example Step00 of Process Framework is wrong (#10119) #10087 Co-authored-by: feiyun0112 Co-authored-by: Chris <66376200+crickman@users.noreply.github.com> --- .../Step00/Step00_Processes.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dotnet/samples/GettingStartedWithProcesses/Step00/Step00_Processes.cs b/dotnet/samples/GettingStartedWithProcesses/Step00/Step00_Processes.cs index 1fce9ca23921..cf4333daba87 100644 --- a/dotnet/samples/GettingStartedWithProcesses/Step00/Step00_Processes.cs +++ b/dotnet/samples/GettingStartedWithProcesses/Step00/Step00_Processes.cs @@ -27,17 +27,15 @@ public async Task UseSimplestProcessAsync() Kernel kernel = Kernel.CreateBuilder() .Build(); - ProcessBuilder processBuilder = new(nameof(Step00_Processes)); - // Create a process that will interact with the chat completion service ProcessBuilder process = new("ChatBot"); - var startStep = processBuilder.AddStepFromType(); - var doSomeWorkStep = processBuilder.AddStepFromType(); - var doMoreWorkStep = processBuilder.AddStepFromType(); - var lastStep = processBuilder.AddStepFromType(); + var startStep = process.AddStepFromType(); + var doSomeWorkStep = process.AddStepFromType(); + var doMoreWorkStep = process.AddStepFromType(); + var lastStep = process.AddStepFromType(); // Define the process flow - processBuilder + process .OnInputEvent(ProcessEvents.StartProcess) .SendEventTo(new ProcessFunctionTargetBuilder(startStep));