From 7214a0f6edbb62660cde9965624d3e5bc0c13469 Mon Sep 17 00:00:00 2001
From: FuJa0815 <30809803+FuJa0815@users.noreply.github.com>
Date: Tue, 11 Nov 2025 17:41:47 +0100
Subject: [PATCH] pass inputs to RunWorkflowInstanceRequest in
RunWorkflowUntilEndAsync (#7022)
---
.../RunWorkflowExtensions.cs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
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);
}