Update workflow creation to use async commit method

Replaced synchronous `CreateWorkflowInstance` with `CreateAndCommitWorkflowInstanceAsync` to ensure instance creation is properly committed. Included support for cancellation tokens to improve process control and reliability.
This commit is contained in:
Sipke Schoorstra 2025-01-10 10:29:03 +01:00
parent 03344bdc20
commit 41d5160c41

View file

@ -40,7 +40,7 @@ public class LocalWorkflowClient(
Properties = request.Properties
};
workflowInstanceManager.CreateWorkflowInstance(workflowGraph.Workflow, options);
await workflowInstanceManager.CreateAndCommitWorkflowInstanceAsync(workflowGraph.Workflow, options, cancellationToken);
return new();
}