From d24764b8cc40a64d3eb74415a1da86369c54fb3b Mon Sep 17 00:00:00 2001 From: PkaaZ Date: Sat, 15 Feb 2025 12:43:58 +0200 Subject: [PATCH 1/2] Add CorrelationId to NewBookmarkQueueItem --- .../Elsa.Workflows.Runtime/Models/NewBookmarkQueueItem.cs | 5 +++++ .../Elsa.Workflows.Runtime/Services/StimulusSender.cs | 1 + .../Elsa.Workflows.Runtime/Services/StoreBookmarkQueue.cs | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/modules/Elsa.Workflows.Runtime/Models/NewBookmarkQueueItem.cs b/src/modules/Elsa.Workflows.Runtime/Models/NewBookmarkQueueItem.cs index c1e030ff9..3f9e16d36 100644 --- a/src/modules/Elsa.Workflows.Runtime/Models/NewBookmarkQueueItem.cs +++ b/src/modules/Elsa.Workflows.Runtime/Models/NewBookmarkQueueItem.cs @@ -24,6 +24,11 @@ public class NewBookmarkQueueItem /// public string? ActivityInstanceId { get; set; } + /// + /// The ID of the correlation an instance is associated with the bookmark. + /// + public string? CorrelationId { get; set; } + /// /// The type name of the activity associated with the bookmark. /// diff --git a/src/modules/Elsa.Workflows.Runtime/Services/StimulusSender.cs b/src/modules/Elsa.Workflows.Runtime/Services/StimulusSender.cs index 58894281c..bbb688550 100644 --- a/src/modules/Elsa.Workflows.Runtime/Services/StimulusSender.cs +++ b/src/modules/Elsa.Workflows.Runtime/Services/StimulusSender.cs @@ -127,6 +127,7 @@ public class StimulusSender( { WorkflowInstanceId = workflowInstanceId, BookmarkId = metadata?.BookmarkId, + CorrelationId = metadata?.CorrelationId, StimulusHash = stimulusHash, Options = new() { diff --git a/src/modules/Elsa.Workflows.Runtime/Services/StoreBookmarkQueue.cs b/src/modules/Elsa.Workflows.Runtime/Services/StoreBookmarkQueue.cs index 77b7b5d5b..90bedb833 100644 --- a/src/modules/Elsa.Workflows.Runtime/Services/StoreBookmarkQueue.cs +++ b/src/modules/Elsa.Workflows.Runtime/Services/StoreBookmarkQueue.cs @@ -18,6 +18,7 @@ public class StoreBookmarkQueue( var filter = new BookmarkFilter { BookmarkId = item.BookmarkId, + CorrelationId = item.CorrelationId, Hash = item.StimulusHash, WorkflowInstanceId = item.WorkflowInstanceId, ActivityTypeName = item.ActivityTypeName @@ -39,6 +40,7 @@ public class StoreBookmarkQueue( Id = identityGenerator.GenerateId(), WorkflowInstanceId = item.WorkflowInstanceId, BookmarkId = item.BookmarkId, + CorrelationId = item.CorrelationId, StimulusHash = item.StimulusHash, ActivityInstanceId = item.ActivityInstanceId, ActivityTypeName = item.ActivityTypeName, From a38d56b328ee5c2925ef5be607114c9b0b380ecd Mon Sep 17 00:00:00 2001 From: PkaaZ Date: Sat, 15 Feb 2025 12:51:45 +0200 Subject: [PATCH 2/2] Update for a better description --- .../Elsa.Workflows.Runtime/Models/NewBookmarkQueueItem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/Elsa.Workflows.Runtime/Models/NewBookmarkQueueItem.cs b/src/modules/Elsa.Workflows.Runtime/Models/NewBookmarkQueueItem.cs index 3f9e16d36..2020604c4 100644 --- a/src/modules/Elsa.Workflows.Runtime/Models/NewBookmarkQueueItem.cs +++ b/src/modules/Elsa.Workflows.Runtime/Models/NewBookmarkQueueItem.cs @@ -25,7 +25,7 @@ public class NewBookmarkQueueItem public string? ActivityInstanceId { get; set; } /// - /// The ID of the correlation an instance is associated with the bookmark. + /// The correlation ID that is associated with the bookmark if any. /// public string? CorrelationId { get; set; }