From 9a5181a3d7d20666509f93130b152d087f0523d7 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Tue, 28 Jan 2025 11:17:02 +0100 Subject: [PATCH] WIP on feature/4835 --- .../Contexts/WorkflowExecutionContext.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/Elsa.Workflows.Core/Contexts/WorkflowExecutionContext.cs b/src/modules/Elsa.Workflows.Core/Contexts/WorkflowExecutionContext.cs index 56788e661..101685f74 100644 --- a/src/modules/Elsa.Workflows.Core/Contexts/WorkflowExecutionContext.cs +++ b/src/modules/Elsa.Workflows.Core/Contexts/WorkflowExecutionContext.cs @@ -517,10 +517,10 @@ public partial class WorkflowExecutionContext : IExecutionContext if (Status == WorkflowStatus.Finished) FinishedAt = UpdatedAt; - + if (Status == WorkflowStatus.Finished || SubStatus == WorkflowSubStatus.Suspended) { - foreach (var registration in _cancellationRegistrations) + foreach (var registration in _cancellationRegistrations) registration.Dispose(); } } @@ -607,7 +607,7 @@ public partial class WorkflowExecutionContext : IExecutionContext WorkflowSubStatus.Suspended => WorkflowStatus.Running, _ => throw new ArgumentOutOfRangeException(nameof(subStatus), subStatus, null) }; - + // TODO: Check if we should not use the target subStatus here instead. private bool ValidateStatusTransition() {