diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index fb03e222b..80cac5692 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -4,6 +4,7 @@ on: push: branches: - 'blueberry' + - 'feature/*' release: types: [ prereleased, published ] env: diff --git a/src/modules/Elsa.Workflows.Core/Contracts/IVariablePersistenceManager.cs b/src/modules/Elsa.Workflows.Core/Contracts/IVariablePersistenceManager.cs index 37115a9ad..b050bb390 100644 --- a/src/modules/Elsa.Workflows.Core/Contracts/IVariablePersistenceManager.cs +++ b/src/modules/Elsa.Workflows.Core/Contracts/IVariablePersistenceManager.cs @@ -16,7 +16,12 @@ public interface IVariablePersistenceManager Task SaveVariablesAsync(WorkflowExecutionContext context); /// - /// Deletes the specified variables from the . + /// Deletes the specified variables from the . /// Task DeleteVariablesAsync(ActivityExecutionContext context); + + /// + /// Deletes the specified variables from the . + /// + Task DeleteVariablesAsync(WorkflowExecutionContext context); } \ No newline at end of file diff --git a/src/modules/Elsa.Workflows.Core/Services/VariablePersistenceManager.cs b/src/modules/Elsa.Workflows.Core/Services/VariablePersistenceManager.cs index fa9f10b9a..61469bec6 100644 --- a/src/modules/Elsa.Workflows.Core/Services/VariablePersistenceManager.cs +++ b/src/modules/Elsa.Workflows.Core/Services/VariablePersistenceManager.cs @@ -110,6 +110,17 @@ public class VariablePersistenceManager : IVariablePersistenceManager } } + /// + public async Task DeleteVariablesAsync(WorkflowExecutionContext context) + { + var activityContexts = context.ActivityExecutionContexts.ToList(); + + foreach (var activityContext in activityContexts) + { + await DeleteVariablesAsync(activityContext); + } + } + private IEnumerable GetLocalVariables(IExecutionContext context) => context.Variables; private MemoryBlock EnsureBlock(MemoryRegister register, Variable variable)