Skip to content

Commit

Permalink
Fix hangfire resume workflow (#6097)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sNakiex and sfmskywalker authored Nov 8, 2024
1 parent 19a79ba commit 3aafcdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/Elsa.Hangfire/Jobs/ResumeWorkflowJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -27,4 +27,4 @@ public async Task ExecuteAsync(string name, ScheduleExistingWorkflowInstanceRequ
};
await client.RunInstanceAsync(runRequest, cancellationToken);
}
}
}

0 comments on commit 3aafcdd

Please sign in to comment.