diff --git a/src/modules/Elsa.Workflows.Core/Models/Workflow.cs b/src/modules/Elsa.Workflows.Core/Models/Workflow.cs
index a3ef446b9..83dae2f01 100644
--- a/src/modules/Elsa.Workflows.Core/Models/Workflow.cs
+++ b/src/modules/Elsa.Workflows.Core/Models/Workflow.cs
@@ -51,6 +51,11 @@ public class Workflow : Composite, ICloneable
{
}
+ public WorkflowIdentity Identity { get; set; } = WorkflowIdentity.VersionOne;
+ public WorkflowPublication Publication { get; set; } = WorkflowPublication.LatestAndPublished;
+ public WorkflowMetadata WorkflowMetadata { get; set; } = new();
+ public WorkflowOptions? Options { get; set; }
+
///
/// Constructs a new from the specified .
///
@@ -66,10 +71,14 @@ public class Workflow : Composite, ICloneable
return register;
}
- public WorkflowIdentity Identity { get; set; } = WorkflowIdentity.VersionOne;
- public WorkflowPublication Publication { get; set; } = WorkflowPublication.LatestAndPublished;
- public WorkflowMetadata WorkflowMetadata { get; set; } = new();
- public WorkflowOptions? Options { get; set; }
+ ///
+ protected override async ValueTask ExecuteAsync(ActivityExecutionContext context)
+ {
+ if(ResultVariable != null)
+ context.WorkflowExecutionContext.MemoryRegister.Declare(ResultVariable);
+
+ await base.ExecuteAsync(context);
+ }
///
/// Create a shallow copy of this workflow.