diff --git a/Elsa.sln.DotSettings b/Elsa.sln.DotSettings
index c882dee0a..21965872e 100644
--- a/Elsa.sln.DotSettings
+++ b/Elsa.sln.DotSettings
@@ -2,6 +2,7 @@
True
True
True
+ True
True
True
True
diff --git a/src/bundles/Elsa.WorkflowServer.Web/Program.cs b/src/bundles/Elsa.WorkflowServer.Web/Program.cs
index c187a5f36..f36d9d744 100644
--- a/src/bundles/Elsa.WorkflowServer.Web/Program.cs
+++ b/src/bundles/Elsa.WorkflowServer.Web/Program.cs
@@ -19,6 +19,7 @@ using Elsa.Persistence.EntityFrameworkCore.Sqlite.Modules.ActivityDefinitions;
using Elsa.Persistence.EntityFrameworkCore.Sqlite.Modules.Labels;
using Elsa.Persistence.EntityFrameworkCore.Sqlite.Modules.Management;
using Elsa.Persistence.EntityFrameworkCore.Sqlite.Modules.Runtime;
+using Elsa.ProtoActor.Extensions;
using Elsa.Requirements;
using Elsa.Scheduling.Extensions;
using Elsa.WorkflowContexts.Extensions;
@@ -34,6 +35,9 @@ using Elsa.WorkflowServer.Web.Jobs;
using FastEndpoints;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization;
+using Microsoft.Data.Sqlite;
+using Proto.Persistence.Sqlite;
+using Event = Elsa.Workflows.Core.Activities.Event;
var builder = WebApplication.CreateBuilder(args);
var services = builder.Services;
@@ -68,9 +72,9 @@ services
identity.CreateDefaultUser = true;
identity.IdentityOptions = options => identitySection.Bind(options);
})
- //.UseRuntime(runtime => runtime.UseProtoActor(proto => proto.PersistenceProvider = _ => new SqliteProvider(new SqliteConnectionStringBuilder(sqliteConnectionString))))
.UseRuntime(runtime =>
{
+ runtime.UseProtoActor(proto => proto.PersistenceProvider = _ => new SqliteProvider(new SqliteConnectionStringBuilder(sqliteConnectionString)));
runtime.UseEntityFrameworkCore(ef => ef.UseSqlite(sqliteConnectionString));
runtime.WorkflowStateExporter = sp => sp.GetRequiredService();
})
diff --git a/src/designer/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx b/src/designer/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx
index 949a73fbe..4f356c161 100644
--- a/src/designer/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx
+++ b/src/designer/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx
@@ -498,6 +498,7 @@ export class FlowchartComponent implements ContainerActivityComponent {
};
private onNodeContextMenu = async (e: PositionEventArgs) => {
+ debugger;
const node = e.node as ActivityNodeShape;
const activity = e.node.data as Activity;
diff --git a/src/modules/Elsa.Expressions/Helpers/ObjectConverter.cs b/src/modules/Elsa.Expressions/Helpers/ObjectConverter.cs
index af901425b..ce2fe5c8b 100644
--- a/src/modules/Elsa.Expressions/Helpers/ObjectConverter.cs
+++ b/src/modules/Elsa.Expressions/Helpers/ObjectConverter.cs
@@ -33,10 +33,10 @@ public static class ObjectConverter
options.ReferenceHandler = ReferenceHandler.Preserve;
options.PropertyNameCaseInsensitive = true;
options.Converters.Add(new JsonStringEnumConverter());
-
+
if (value is DahomeyJsonNode { ValueKind: JsonValueKind.Object } dahomyJsonObject)
return ToObject(dahomyJsonObject, targetType, options);
-
+
if (value is JsonElement { ValueKind: JsonValueKind.Object } jsonObject)
return jsonObject.Deserialize(targetType, options);
@@ -56,7 +56,9 @@ public static class ObjectConverter
var targetTypeConverter = TypeDescriptor.GetConverter(underlyingTargetType);
if (targetTypeConverter.CanConvertFrom(underlyingSourceType))
- return targetTypeConverter.IsValid(value) ? targetTypeConverter.ConvertFrom(value) : targetType.GetDefaultValue();
+ return targetTypeConverter.IsValid(value)
+ ? targetTypeConverter.ConvertFrom(value)
+ : targetType.GetDefaultValue();
var sourceTypeConverter = TypeDescriptor.GetConverter(underlyingSourceType);
@@ -65,8 +67,14 @@ public static class ObjectConverter
if (underlyingTargetType.IsEnum)
{
- if (underlyingSourceType != typeof(string))
+ if (underlyingSourceType == typeof(string))
+ return Enum.Parse(underlyingTargetType, (string)value);
+
+ if (underlyingSourceType == typeof(int))
return Enum.ToObject(underlyingTargetType, value);
+
+ if (underlyingSourceType == typeof(double))
+ return Enum.ToObject(underlyingTargetType, Convert.ChangeType(value, typeof(int)));
}
try
@@ -75,7 +83,9 @@ public static class ObjectConverter
}
catch (InvalidCastException e)
{
- throw new TypeConversionException($"Failed to convert an object of type {sourceType} to {underlyingTargetType}", value, underlyingTargetType, e);
+ throw new TypeConversionException(
+ $"Failed to convert an object of type {sourceType} to {underlyingTargetType}", value,
+ underlyingTargetType, e);
}
}
diff --git a/src/modules/Elsa.Http/Activities/HttpEndpoint.cs b/src/modules/Elsa.Http/Activities/HttpEndpoint.cs
index f2eef3b1b..27ada6c23 100644
--- a/src/modules/Elsa.Http/Activities/HttpEndpoint.cs
+++ b/src/modules/Elsa.Http/Activities/HttpEndpoint.cs
@@ -62,6 +62,6 @@ public class HttpEndpoint : Trigger
// Generate bookmark data for path and selected methods.
var path = context.Get(Path);
var methods = context.Get(SupportedMethods);
- return methods!.Select(x => new HttpEndpointBookmarkData(path!, x.ToLowerInvariant())).Cast