.NET: Fix to emit WorkflowStartedEvent during workflow execution (#4514)

* Fix bug to emit WorkflowStartedEvent during workflow execution

* Updated based on PR comments
This commit is contained in:
Peter Ibekwe
2026-03-12 15:45:17 +00:00
committed by GitHub
parent bcb55b4a98
commit aa2ff672fb
3 changed files with 79 additions and 2 deletions
@@ -72,6 +72,9 @@ internal sealed class LockstepRunEventStream : IRunEventStream
this.RunStatus = RunStatus.Running;
runActivity?.AddEvent(new ActivityEvent(EventNames.WorkflowStarted));
// Emit WorkflowStartedEvent to the event stream for consumers
eventSink.Enqueue(new WorkflowStartedEvent());
do
{
while (this._stepRunner.HasUnprocessedMessages &&