diff --git a/src/WorkflowEngine.Hangfire/HangfireWorkflowExecutor.cs b/src/WorkflowEngine.Hangfire/HangfireWorkflowExecutor.cs index d2c5a0b..586fb63 100644 --- a/src/WorkflowEngine.Hangfire/HangfireWorkflowExecutor.cs +++ b/src/WorkflowEngine.Hangfire/HangfireWorkflowExecutor.cs @@ -76,6 +76,7 @@ public async ValueTask ExecuteAsync(IRunContext run, IWorkflow workflow, /// public async ValueTask TriggerAsync(ITriggerContext context) { + context.RunId = context.RunId == Guid.Empty? Guid.NewGuid() : context.RunId; runContextAccessor.RunContext = context; var action = await executor.Trigger(context);