From 3aafcddb022ea6eab89b2d81e0268c443cb50879 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 8 Nov 2024 21:43:52 +0100 Subject: [PATCH] Fix hangfire resume workflow (#6097) There was a bug in the hangfire implementation where it would always generate a random workflowinstanceid because it was not passed into the createclient. Because of this hangfire was unable to resume instances. Co-authored-by: Sipke Schoorstra --- src/modules/Elsa.Hangfire/Jobs/ResumeWorkflowJob.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/Elsa.Hangfire/Jobs/ResumeWorkflowJob.cs b/src/modules/Elsa.Hangfire/Jobs/ResumeWorkflowJob.cs index e48f8ed92..c0bc31706 100644 --- a/src/modules/Elsa.Hangfire/Jobs/ResumeWorkflowJob.cs +++ b/src/modules/Elsa.Hangfire/Jobs/ResumeWorkflowJob.cs @@ -17,7 +17,7 @@ public class ResumeWorkflowJob(IWorkflowRuntime workflowRuntime) /// The cancellation token. public async Task ExecuteAsync(string name, ScheduleExistingWorkflowInstanceRequest request, CancellationToken cancellationToken) { - var client = await workflowRuntime.CreateClientAsync(cancellationToken); + var client = await workflowRuntime.CreateClientAsync(request.WorkflowInstanceId, cancellationToken); var runRequest = new RunWorkflowInstanceRequest { BookmarkId = request.BookmarkId, @@ -27,4 +27,4 @@ public class ResumeWorkflowJob(IWorkflowRuntime workflowRuntime) }; await client.RunInstanceAsync(runRequest, cancellationToken); } -} \ No newline at end of file +}