diff --git a/src/common/Elsa.Testing.Shared.Integration/RunWorkflowExtensions.cs b/src/common/Elsa.Testing.Shared.Integration/RunWorkflowExtensions.cs index 429ce6f99..818f7787e 100644 --- a/src/common/Elsa.Testing.Shared.Integration/RunWorkflowExtensions.cs +++ b/src/common/Elsa.Testing.Shared.Integration/RunWorkflowExtensions.cs @@ -26,11 +26,13 @@ public static class RunWorkflowExtensions /// The services. /// The ID of the workflow definition. /// An optional dictionary of input values. + /// An optional correlation id of the workflow. /// An optional set of options to specify the version of the workflow definition to retrieve. /// The workflow state. public static async Task RunWorkflowUntilEndAsync(this IServiceProvider services, string workflowDefinitionId, IDictionary? input = null, + string? correlationId = null, VersionOptions? versionOptions = null) { var workflowDefinitionService = services.GetRequiredService(); @@ -44,7 +46,8 @@ public static class RunWorkflowExtensions var response = await workflowClient.CreateAndRunInstanceAsync(new() { WorkflowDefinitionHandle = WorkflowDefinitionHandle.ByDefinitionVersionId(workflowGraph.Workflow.Identity.Id), - Input = input + Input = input, + CorrelationId = correlationId }); var bookmarkStore = services.GetRequiredService(); @@ -64,7 +67,8 @@ public static class RunWorkflowExtensions { var runRequest = new RunWorkflowInstanceRequest { - BookmarkId = bookmark.Id + BookmarkId = bookmark.Id, + Input = input }; response = await workflowClient.RunInstanceAsync(runRequest); }