Created
April 25, 2026 12:26
-
-
Save wullemsb/910bd4640e54a0c448296b8f3672eeb6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Register the factory, not the workflow | |
| services.AddSingleton<Func<MyWorkflow>>(sp => | |
| () => new MyWorkflow(sp.GetRequiredService<IMyDependency>())); | |
| // At call site | |
| var wf = workflowFactory(); // fresh each time | |
| await env.RunAsync(wf, input, sessionId); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment