.NET Workflows - Fix "Human In Loop" sample and update "AutoSend" behavior (#991)

* Fix sample and autosend

* Specify "ConversationId"

* Namespace

* Perf fix

* Namespace

* Filter for appropriate message
This commit is contained in:
Chris
2025-09-30 09:13:15 -07:00
committed by GitHub
Unverified
parent c0e395d4f5
commit 1e53fb458f
5 changed files with 58 additions and 17 deletions
@@ -62,7 +62,7 @@ internal sealed class Program
// Run the workflow, just like any other workflow
string input = this.GetWorkflowInput();
CheckpointManager checkpointManager = CheckpointManager.Default;
CheckpointManager checkpointManager = CheckpointManager.CreateInMemory();
Checkpointed<StreamingRun> run = await InProcessExecution.StreamAsync(workflow, input, checkpointManager);
bool isComplete = false;
@@ -88,7 +88,7 @@ internal sealed class Program
// Restore the latest checkpoint.
Debug.WriteLine($"RESTORE #{this.LastCheckpoint.CheckpointId}");
Notify("\nWORKFLOW: Restore");
run = await InProcessExecution.ResumeStreamAsync(workflow, this.LastCheckpoint, checkpointManager);
run = await InProcessExecution.ResumeStreamAsync(workflow, this.LastCheckpoint, checkpointManager, run.Run.RunId);
}
else
{
@@ -178,6 +178,7 @@ internal sealed class Program
}
else
{
await run.Run.EndRunAsync().ConfigureAwait(false);
return requestInfo.Request;
}
break;