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 <sipkeschoorstra@outlook.com>
This commit is contained in:
Ray 2024-11-08 21:43:52 +01:00 committed by GitHub
parent 19a79ba412
commit 3aafcddb02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,7 @@ public class ResumeWorkflowJob(IWorkflowRuntime workflowRuntime)
/// <param name="cancellationToken">The cancellation token.</param>
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);
}
}
}