diff --git a/Directory.Packages.props b/Directory.Packages.props
index 0f1e76edd..9fbc7b0bf 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -9,101 +9,169 @@
9.6.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Elsa.sln b/Elsa.sln
index 82e4dc8cf..0f2c195a9 100644
--- a/Elsa.sln
+++ b/Elsa.sln
@@ -1,4 +1,5 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
+
+Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.34003.232
MinimumVisualStudioVersion = 10.0.40219.1
@@ -132,9 +133,9 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elsa.Resilience.IntegrationTests", "test\integration\Elsa.Resilience.IntegrationTests\Elsa.Resilience.IntegrationTests.csproj", "{832675FA-C597-4554-AE6B-18F189198A1F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "apps", "apps", "{D92BEAB2-60D6-4BB4-885A-6BA681C6CCF1}"
- ProjectSection(SolutionItems) = preProject
- src\apps\Directory.Build.props = src\apps\Directory.Build.props
- EndProjectSection
+ ProjectSection(SolutionItems) = preProject
+ src\apps\Directory.Build.props = src\apps\Directory.Build.props
+ EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elsa.Server.Web", "src\apps\Elsa.Server.Web\Elsa.Server.Web.csproj", "{5ADDDFB1-E59B-4097-97B7-8C24E2D60463}"
EndProject
@@ -236,6 +237,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Caching", "src\modules
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "http", "http", "{C55015F0-E9DF-4BF9-8131-D7539E938220}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "io", "io", "{7FD1FD1E-5778-4065-AAA5-1F878129EF77}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.IO", "src\modules\Elsa.IO\Elsa.IO.csproj", "{EB24F9FE-D7BD-4FCC-907E-AE400288C2A5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.IO.Compression", "src\modules\Elsa.IO.Compression\Elsa.IO.Compression.csproj", "{9CA02818-F7EB-4A0B-B27B-BC74ACD499C9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.IO.Http", "src\modules\Elsa.IO.Http\Elsa.IO.Http.csproj", "{C583AF05-D517-4B7F-8955-6B61500ED3D8}"
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Http", "src\modules\Elsa.Http\Elsa.Http.csproj", "{E0B22AB7-7CB5-6D17-562C-4A989DC61F8A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Expressions.CSharp", "src\modules\Elsa.Expressions.CSharp\Elsa.Expressions.CSharp.csproj", "{16C3FBDE-A832-E3CD-5FBF-F51744D1F79B}"
@@ -402,6 +411,74 @@ Global
{D5720DBC-8C2B-42D5-9D9F-2FF6EAD4001C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5720DBC-8C2B-42D5-9D9F-2FF6EAD4001C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5720DBC-8C2B-42D5-9D9F-2FF6EAD4001C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BF934627-F531-44FB-BEC2-ECA801FF31E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BF934627-F531-44FB-BEC2-ECA801FF31E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BF934627-F531-44FB-BEC2-ECA801FF31E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BF934627-F531-44FB-BEC2-ECA801FF31E7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FD3CD5A8-E9B3-467F-90EB-2B7D5B83F348}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FD3CD5A8-E9B3-467F-90EB-2B7D5B83F348}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FD3CD5A8-E9B3-467F-90EB-2B7D5B83F348}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FD3CD5A8-E9B3-467F-90EB-2B7D5B83F348}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3BED411B-79B5-4CCC-BD46-9549A427B908}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3BED411B-79B5-4CCC-BD46-9549A427B908}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3BED411B-79B5-4CCC-BD46-9549A427B908}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3BED411B-79B5-4CCC-BD46-9549A427B908}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6CC5FBC7-D3D7-4FE3-AD08-C67939BDB24D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6CC5FBC7-D3D7-4FE3-AD08-C67939BDB24D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6CC5FBC7-D3D7-4FE3-AD08-C67939BDB24D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6CC5FBC7-D3D7-4FE3-AD08-C67939BDB24D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA5E857F-B173-4B5D-8049-B817A210DEF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA5E857F-B173-4B5D-8049-B817A210DEF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA5E857F-B173-4B5D-8049-B817A210DEF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA5E857F-B173-4B5D-8049-B817A210DEF5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A51F9683-DA9F-45E7-82DE-1E261ACD6D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A51F9683-DA9F-45E7-82DE-1E261ACD6D68}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A51F9683-DA9F-45E7-82DE-1E261ACD6D68}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A51F9683-DA9F-45E7-82DE-1E261ACD6D68}.Release|Any CPU.Build.0 = Release|Any CPU
+ {75E08B0E-A41A-425C-9DCA-155505CE41CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {75E08B0E-A41A-425C-9DCA-155505CE41CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {75E08B0E-A41A-425C-9DCA-155505CE41CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {75E08B0E-A41A-425C-9DCA-155505CE41CD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BD120D97-4862-469E-B2CF-4109F7F21C20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BD120D97-4862-469E-B2CF-4109F7F21C20}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BD120D97-4862-469E-B2CF-4109F7F21C20}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BD120D97-4862-469E-B2CF-4109F7F21C20}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8A3443F3-D40E-44B9-9805-B4CB7A3F022C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8A3443F3-D40E-44B9-9805-B4CB7A3F022C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8A3443F3-D40E-44B9-9805-B4CB7A3F022C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8A3443F3-D40E-44B9-9805-B4CB7A3F022C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA2B2B44-7E3E-444B-A157-7526B376E9CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA2B2B44-7E3E-444B-A157-7526B376E9CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA2B2B44-7E3E-444B-A157-7526B376E9CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA2B2B44-7E3E-444B-A157-7526B376E9CA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DF0CA7E2-F5DF-40ED-91B6-748767084FC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DF0CA7E2-F5DF-40ED-91B6-748767084FC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DF0CA7E2-F5DF-40ED-91B6-748767084FC7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DF0CA7E2-F5DF-40ED-91B6-748767084FC7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DB20B168-CD90-41F2-BE08-3D8C6F142459}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DB20B168-CD90-41F2-BE08-3D8C6F142459}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DB20B168-CD90-41F2-BE08-3D8C6F142459}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DB20B168-CD90-41F2-BE08-3D8C6F142459}.Release|Any CPU.Build.0 = Release|Any CPU
+ {70593549-8B26-4D63-9857-6BA8BB3E31DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {70593549-8B26-4D63-9857-6BA8BB3E31DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {70593549-8B26-4D63-9857-6BA8BB3E31DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {70593549-8B26-4D63-9857-6BA8BB3E31DB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E7137FB0-1988-4562-AD8D-D0D9D2EE85F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E7137FB0-1988-4562-AD8D-D0D9D2EE85F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E7137FB0-1988-4562-AD8D-D0D9D2EE85F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E7137FB0-1988-4562-AD8D-D0D9D2EE85F6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EB24F9FE-D7BD-4FCC-907E-AE400288C2A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EB24F9FE-D7BD-4FCC-907E-AE400288C2A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EB24F9FE-D7BD-4FCC-907E-AE400288C2A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EB24F9FE-D7BD-4FCC-907E-AE400288C2A5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9CA02818-F7EB-4A0B-B27B-BC74ACD499C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9CA02818-F7EB-4A0B-B27B-BC74ACD499C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9CA02818-F7EB-4A0B-B27B-BC74ACD499C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9CA02818-F7EB-4A0B-B27B-BC74ACD499C9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C583AF05-D517-4B7F-8955-6B61500ED3D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C583AF05-D517-4B7F-8955-6B61500ED3D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C583AF05-D517-4B7F-8955-6B61500ED3D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C583AF05-D517-4B7F-8955-6B61500ED3D8}.Release|Any CPU.Build.0 = Release|Any CPU
{6F14B066-DF7B-2409-59D8-CCCA90A4974C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6F14B066-DF7B-2409-59D8-CCCA90A4974C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F14B066-DF7B-2409-59D8-CCCA90A4974C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -519,6 +596,13 @@ Global
{66E2E2CF-967F-4564-89E8-F46FA973C99B} = {986E5482-0482-448C-B9E4-EC67A9474B85}
{0A04B1FD-06C0-4271-A910-A08C263DBC44} = {0354F050-3992-4DD4-B0EE-5FBA04AC72B6}
{9B80A705-2E31-4012-964A-83963DCDB384} = {0354F050-3992-4DD4-B0EE-5FBA04AC72B6}
+ {CD7DC0D1-FFDC-417A-89BE-7F32408F583E} = {5BA4A8FA-F7F4-45B3-AEC8-8886D35AAC79}
+ {70593549-8B26-4D63-9857-6BA8BB3E31DB} = {CD7DC0D1-FFDC-417A-89BE-7F32408F583E}
+ {E7137FB0-1988-4562-AD8D-D0D9D2EE85F6} = {CD7DC0D1-FFDC-417A-89BE-7F32408F583E}
+ {7FD1FD1E-5778-4065-AAA5-1F878129EF77} = {5BA4A8FA-F7F4-45B3-AEC8-8886D35AAC79}
+ {EB24F9FE-D7BD-4FCC-907E-AE400288C2A5} = {7FD1FD1E-5778-4065-AAA5-1F878129EF77}
+ {9CA02818-F7EB-4A0B-B27B-BC74ACD499C9} = {7FD1FD1E-5778-4065-AAA5-1F878129EF77}
+ {C583AF05-D517-4B7F-8955-6B61500ED3D8} = {7FD1FD1E-5778-4065-AAA5-1F878129EF77}
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {5BA4A8FA-F7F4-45B3-AEC8-8886D35AAC79}
{6F14B066-DF7B-2409-59D8-CCCA90A4974C} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{C55015F0-E9DF-4BF9-8131-D7539E938220} = {5BA4A8FA-F7F4-45B3-AEC8-8886D35AAC79}
diff --git a/src/apps/Directory.Build.props b/src/apps/Directory.Build.props
index d5f14e067..50f33a49d 100644
--- a/src/apps/Directory.Build.props
+++ b/src/apps/Directory.Build.props
@@ -8,10 +8,6 @@
$(NoWarn);CS0162;CS1591
-
- 3.5.0-preview.1040
-
-
diff --git a/src/apps/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj b/src/apps/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj
index 5541ab064..1b29a1ad7 100644
--- a/src/apps/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj
+++ b/src/apps/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj
@@ -1,4 +1,4 @@
-
+
diff --git a/src/apps/Elsa.ServerAndStudio.Web/Program.cs b/src/apps/Elsa.ServerAndStudio.Web/Program.cs
index 2ea41f335..63ea982e3 100644
--- a/src/apps/Elsa.ServerAndStudio.Web/Program.cs
+++ b/src/apps/Elsa.ServerAndStudio.Web/Program.cs
@@ -65,6 +65,8 @@ services
};
})
.UseWorkflowsApi()
+ .UseCompression()
+ .Use()
.AddActivitiesFrom()
.AddWorkflowsFrom();
});
diff --git a/src/common/Elsa.Features/Implementations/Module.cs b/src/common/Elsa.Features/Implementations/Module.cs
index c64056133..4821e91d7 100644
--- a/src/common/Elsa.Features/Implementations/Module.cs
+++ b/src/common/Elsa.Features/Implementations/Module.cs
@@ -47,11 +47,13 @@ public class Module : IModule
}
///
- public T Configure(Action? configure = default) where T : class, IFeature
- => Configure(module => (T)Activator.CreateInstance(typeof(T), module)!, configure);
+ public T Configure(Action? configure = null) where T : class, IFeature
+ {
+ return Configure(module => (T)Activator.CreateInstance(typeof(T), module)!, configure);
+ }
///
- public T Configure(Func factory, Action? configure = default) where T : class, IFeature
+ public T Configure(Func factory, Action? configure = null) where T : class, IFeature
{
if (!_features.TryGetValue(typeof(T), out var feature))
{
@@ -81,7 +83,7 @@ public class Module : IModule
///
public IModule ConfigureHostedService(Type hostedServiceType, int priority = 0)
{
- _hostedServiceDescriptors.Add(new HostedServiceDescriptor(priority, hostedServiceType));
+ _hostedServiceDescriptors.Add(new(priority, hostedServiceType));
return this;
}
@@ -121,7 +123,7 @@ public class Module : IModule
var ns = "Elsa";
var displayName = type.GetCustomAttribute()?.DisplayName ?? name;
var description = type.GetCustomAttribute()?.Description;
- registry.Add(new FeatureDescriptor(name, ns, displayName, description));
+ registry.Add(new(name, ns, displayName, description));
}
Services.AddSingleton(registry);
diff --git a/src/common/Elsa.Features/Services/IModule.cs b/src/common/Elsa.Features/Services/IModule.cs
index 48d45795a..da070d3f6 100644
--- a/src/common/Elsa.Features/Services/IModule.cs
+++ b/src/common/Elsa.Features/Services/IModule.cs
@@ -31,12 +31,12 @@ public interface IModule
///
/// Creates and configures a feature of the specified type.
///
- T Configure(Action? configure = default) where T : class, IFeature;
+ T Configure(Action? configure = null) where T : class, IFeature;
///
/// Creates and configures a feature of the specified type.
///
- T Configure(Func factory, Action? configure = default) where T : class, IFeature;
+ T Configure(Func factory, Action? configure = null) where T : class, IFeature;
///
/// Configures a using an optional priority to control in which order it will be registered with the service container.
diff --git a/src/modules/Elsa.Common/Features/CompressionFeature.cs b/src/modules/Elsa.Common/Features/StringCompressionFeature.cs
similarity index 87%
rename from src/modules/Elsa.Common/Features/CompressionFeature.cs
rename to src/modules/Elsa.Common/Features/StringCompressionFeature.cs
index f6b5955c1..5b2c2b0c6 100644
--- a/src/modules/Elsa.Common/Features/CompressionFeature.cs
+++ b/src/modules/Elsa.Common/Features/StringCompressionFeature.cs
@@ -8,7 +8,7 @@ using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Common.Features;
[UsedImplicitly]
-public class CompressionFeature(IModule module) : FeatureBase(module)
+public class StringCompressionFeature(IModule module) : FeatureBase(module)
{
public override void Apply()
{
diff --git a/src/modules/Elsa.Http/Extensions/HeadersExtensions.cs b/src/modules/Elsa.Http/Extensions/HeadersExtensions.cs
index 5c144c002..10f0b53c7 100644
--- a/src/modules/Elsa.Http/Extensions/HeadersExtensions.cs
+++ b/src/modules/Elsa.Http/Extensions/HeadersExtensions.cs
@@ -1,4 +1,6 @@
// ReSharper disable once CheckNamespace
+using Elsa.Http;
+
namespace Elsa.Extensions;
///
diff --git a/src/modules/Elsa.IO.Compression/Activities/CreateZipArchive.cs b/src/modules/Elsa.IO.Compression/Activities/CreateZipArchive.cs
new file mode 100644
index 000000000..c7eee4d13
--- /dev/null
+++ b/src/modules/Elsa.IO.Compression/Activities/CreateZipArchive.cs
@@ -0,0 +1,140 @@
+using System.IO.Compression;
+using System.Text.Json.Serialization;
+using Elsa.Extensions;
+using Elsa.IO.Contracts;
+using Elsa.IO.Extensions;
+using Elsa.Workflows;
+using Elsa.Workflows.Attributes;
+using Elsa.Workflows.Models;
+using Elsa.Workflows.UIHints;
+using Microsoft.Extensions.Logging;
+
+namespace Elsa.IO.Compression.Activities;
+
+///
+/// Creates a ZIP archive from a collection of entries.
+///
+[Activity("Elsa", "Compression", "Creates a ZIP archive from a collection of entries.", DisplayName = "Create Zip Archive")]
+public class CreateZipArchive : CodeActivity
+{
+ private const string DefaultArchiveName = "archive.zip";
+ private const string ZipExtension = ".zip";
+ private const string DefaultEntryNameFormat = "entry_{0}";
+
+ ///
+ [JsonConstructor]
+ public CreateZipArchive(string? source = null, int? line = null) : base(source, line)
+ {
+ }
+
+ ///
+ /// The entries to include in the ZIP archive. Can be byte[], Stream, file path, file URL, base64 string, ZipEntry objects, or arrays of these types.
+ ///
+ [Input(
+ Description = "The entries to include in the ZIP archive. Can be byte[], Stream, file path, file URL, base64 string, ZipEntry objects, or arrays of these types",
+ UIHint = InputUIHints.MultiLine
+ )]
+ public Input
public class ActivityHandle
{
- public static ActivityHandle FromActivityId(string activityId) => new() { ActivityId = activityId };
- public static ActivityHandle FromActivityNodeId(string activityNodeId) => new() { ActivityNodeId = activityNodeId };
- public static ActivityHandle FromActivityInstanceId(string activityInstanceId) => new() { ActivityInstanceId = activityInstanceId };
- public static ActivityHandle FromActivityHash(string activityHash) => new() { ActivityHash = activityHash };
+ public static ActivityHandle FromActivityId(string activityId) => new()
+ {
+ ActivityId = activityId
+ };
+
+ public static ActivityHandle FromActivityNodeId(string activityNodeId) => new()
+ {
+ ActivityNodeId = activityNodeId
+ };
+
+ public static ActivityHandle FromActivityInstanceId(string activityInstanceId) => new()
+ {
+ ActivityInstanceId = activityInstanceId
+ };
+
+ public static ActivityHandle FromActivityHash(string activityHash) => new()
+ {
+ ActivityHash = activityHash
+ };
+
public string? ActivityId { get; init; }
- public string? ActivityNodeId { get; init;}
- public string? ActivityInstanceId { get; init;}
- public string? ActivityHash { get; init;}
+ public string? ActivityNodeId { get; init; }
+ public string? ActivityInstanceId { get; init; }
+ public string? ActivityHash { get; init; }
+
+ public override string ToString()
+ {
+ return ActivityId ?? (ActivityNodeId ?? (ActivityInstanceId ?? (ActivityHash ?? "")));
+ }
}
\ No newline at end of file
diff --git a/src/modules/Elsa.Workflows.Management/Features/WorkflowManagementFeature.cs b/src/modules/Elsa.Workflows.Management/Features/WorkflowManagementFeature.cs
index 76e53ea19..ff369a7c4 100644
--- a/src/modules/Elsa.Workflows.Management/Features/WorkflowManagementFeature.cs
+++ b/src/modules/Elsa.Workflows.Management/Features/WorkflowManagementFeature.cs
@@ -34,7 +34,7 @@ namespace Elsa.Workflows.Management.Features;
///
/// Installs and configures the workflow management feature.
///
-[DependsOn(typeof(CompressionFeature))]
+[DependsOn(typeof(StringCompressionFeature))]
[DependsOn(typeof(MediatorFeature))]
[DependsOn(typeof(MemoryCacheFeature))]
[DependsOn(typeof(SystemClockFeature))]
diff --git a/src/modules/Elsa.Workflows.Management/Mappers/WorkflowStateMapper.cs b/src/modules/Elsa.Workflows.Management/Mappers/WorkflowStateMapper.cs
index cea8e3a2a..deccb8170 100644
--- a/src/modules/Elsa.Workflows.Management/Mappers/WorkflowStateMapper.cs
+++ b/src/modules/Elsa.Workflows.Management/Mappers/WorkflowStateMapper.cs
@@ -1,3 +1,4 @@
+using Elsa.Extensions;
using Elsa.Workflows.Management.Entities;
using Elsa.Workflows.State;
@@ -8,6 +9,12 @@ namespace Elsa.Workflows.Management.Mappers;
///
public class WorkflowStateMapper
{
+ ///
+ /// [Obsolete] The property key name used to store the workflow instance name.
+ ///
+ [Obsolete("This constant is obsolete and retained only for backward compatibility. Avoid using it in new code.")]
+ private const string WorkflowInstanceNameKey = "WorkflowInstanceName";
+
///
/// Maps a workflow state to a workflow instance.
///
@@ -43,6 +50,10 @@ public class WorkflowStateMapper
target.UpdatedAt = source.UpdatedAt;
target.FinishedAt = source.FinishedAt;
target.WorkflowState = source;
+
+ // Keep for backward compatibility with workflow instances created before the introduction of the Name property.
+ if (source.Properties.TryGetValue(WorkflowInstanceNameKey, out var name))
+ target.Name = name;
}
///