From d09eb0791ac3c946642d8211e15ceba7b4f0107e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Milewski?= Date: Tue, 6 Feb 2024 13:00:36 +0100 Subject: [PATCH] 0.8.1-alpha --- .../Stateflows.Common.csproj | 2 +- .../Stateflows.Testing.csproj | 2 +- .../Stateflows.Common.Transport.csproj | 2 +- .../Stateflows/Activities/Classes/ForkNode.cs | 7 +++ .../Stateflows/Activities/Classes/JoinNode.cs | 7 +++ Core/Stateflows/Activities/Engine/Executor.cs | 1 + .../ActivityBuilderSpecialsExtensions.cs | 6 +++ ...cturedActivityBuilderSpecialsExtensions.cs | 6 +++ ...cturedActivityBuilderSpecialsExtensions.cs | 6 +++ Core/Stateflows/Stateflows.csproj | 2 +- .../Stateflows.Extensions.PlantUml.csproj | 2 +- .../Stateflows.Locks.DistributedLock.csproj | 2 +- ...kup.Storage.EntityFrameworkCore.6.0.csproj | 52 ------------------- .../DependencyInjection.cs | 0 .../Entities/Context_v1.cs | 0 .../EntityFrameworkCore/Entities/Trace_v1.cs | 0 .../IStateflowsDbContext_v1.cs | 0 ...eflows.Storage.EntityFrameworkCore.csproj} | 2 +- .../Stateflows/EntityFrameworkCoreStorage.cs | 0 .../Utils/DbSetExtensions.cs | 0 ...Transport.AspNetCore.SignalR.Client.csproj | 2 +- ...eflows.Transport.AspNetCore.SignalR.csproj | 2 +- 22 files changed, 42 insertions(+), 61 deletions(-) create mode 100644 Core/Stateflows/Activities/Classes/ForkNode.cs create mode 100644 Core/Stateflows/Activities/Classes/JoinNode.cs delete mode 100644 Storage/Stateflows.Storage.EntityFrameworkCore.6.0/Stateflows - Backup.Storage.EntityFrameworkCore.6.0.csproj rename Storage/{Stateflows.Storage.EntityFrameworkCore.6.0 => Stateflows.Storage.EntityFrameworkCore}/DependencyInjection.cs (100%) rename Storage/{Stateflows.Storage.EntityFrameworkCore.6.0 => Stateflows.Storage.EntityFrameworkCore}/EntityFrameworkCore/Entities/Context_v1.cs (100%) rename Storage/{Stateflows.Storage.EntityFrameworkCore.6.0 => Stateflows.Storage.EntityFrameworkCore}/EntityFrameworkCore/Entities/Trace_v1.cs (100%) rename Storage/{Stateflows.Storage.EntityFrameworkCore.6.0 => Stateflows.Storage.EntityFrameworkCore}/EntityFrameworkCore/IStateflowsDbContext_v1.cs (100%) rename Storage/{Stateflows.Storage.EntityFrameworkCore.6.0/Stateflows.Storage.EntityFrameworkCore.6.0.csproj => Stateflows.Storage.EntityFrameworkCore/Stateflows.Storage.EntityFrameworkCore.csproj} (98%) rename Storage/{Stateflows.Storage.EntityFrameworkCore.6.0 => Stateflows.Storage.EntityFrameworkCore}/Stateflows/EntityFrameworkCoreStorage.cs (100%) rename Storage/{Stateflows.Storage.EntityFrameworkCore.6.0 => Stateflows.Storage.EntityFrameworkCore}/Utils/DbSetExtensions.cs (100%) diff --git a/Core/Stateflows.Common/Stateflows.Common.csproj b/Core/Stateflows.Common/Stateflows.Common.csproj index 3cc659c0..b320f2f9 100644 --- a/Core/Stateflows.Common/Stateflows.Common.csproj +++ b/Core/Stateflows.Common/Stateflows.Common.csproj @@ -12,7 +12,7 @@ Stateflows;state-machine;activity;workflow - 0.8.0-alpha + 0.8.1-alpha README.md LICENSE ..\..\NuGet diff --git a/Core/Stateflows.Testing/Stateflows.Testing.csproj b/Core/Stateflows.Testing/Stateflows.Testing.csproj index ea15e73f..7b0261bd 100644 --- a/Core/Stateflows.Testing/Stateflows.Testing.csproj +++ b/Core/Stateflows.Testing/Stateflows.Testing.csproj @@ -2,7 +2,7 @@ netstandard2.1 - 0.8.0-alpha + 0.8.1-alpha Stateflows framework testing utilities Stateflows True diff --git a/Core/Stateflows.Transport.Common/Stateflows.Common.Transport.csproj b/Core/Stateflows.Transport.Common/Stateflows.Common.Transport.csproj index 9812a82d..099ffbfd 100644 --- a/Core/Stateflows.Transport.Common/Stateflows.Common.Transport.csproj +++ b/Core/Stateflows.Transport.Common/Stateflows.Common.Transport.csproj @@ -3,7 +3,7 @@ netstandard2.1 Stateflows framework transport abstractions - 0.8.0-alpha + 0.8.1-alpha Stateflows https://www.stateflows.net stateflows-logo-1024.png diff --git a/Core/Stateflows/Activities/Classes/ForkNode.cs b/Core/Stateflows/Activities/Classes/ForkNode.cs new file mode 100644 index 00000000..06ac7e39 --- /dev/null +++ b/Core/Stateflows/Activities/Classes/ForkNode.cs @@ -0,0 +1,7 @@ +namespace Stateflows.Activities +{ + public sealed class ForkNode : ActivityNode + { + public const string Name = "Stateflows.Activities.ForkNode"; + } +} diff --git a/Core/Stateflows/Activities/Classes/JoinNode.cs b/Core/Stateflows/Activities/Classes/JoinNode.cs new file mode 100644 index 00000000..17de7919 --- /dev/null +++ b/Core/Stateflows/Activities/Classes/JoinNode.cs @@ -0,0 +1,7 @@ +namespace Stateflows.Activities +{ + public sealed class JoinNode : ActivityNode + { + public const string Name = "Stateflows.Activities.JoinNode"; + } +} diff --git a/Core/Stateflows/Activities/Engine/Executor.cs b/Core/Stateflows/Activities/Engine/Executor.cs index dd15a42e..8af15488 100644 --- a/Core/Stateflows/Activities/Engine/Executor.cs +++ b/Core/Stateflows/Activities/Engine/Executor.cs @@ -485,6 +485,7 @@ public async Task DoHandleNodeAsync(Node node, NodeScope nodeScope, IEnumerable< var inputTokens = input ?? streams.SelectMany(stream => stream.Tokens).ToArray(); + nodeScope = nodeScope.CreateChildScope(); lock (node.Graph) { Debug.WriteLine($">>> Executing node {node.Name}, threadId: {nodeScope.ThreadId}"); diff --git a/Core/Stateflows/Activities/Registration/Interfaces/Extensions/ActivityBuilder/ActivityBuilderSpecialsExtensions.cs b/Core/Stateflows/Activities/Registration/Interfaces/Extensions/ActivityBuilder/ActivityBuilderSpecialsExtensions.cs index e8be1dfb..5a88b1d7 100644 --- a/Core/Stateflows/Activities/Registration/Interfaces/Extensions/ActivityBuilder/ActivityBuilderSpecialsExtensions.cs +++ b/Core/Stateflows/Activities/Registration/Interfaces/Extensions/ActivityBuilder/ActivityBuilderSpecialsExtensions.cs @@ -22,6 +22,9 @@ public static IActivityBuilder AddJoin(this IActivityBuilder builder, string joi b => joinBuildAction(b) ) as IActivityBuilder; + public static IActivityBuilder AddJoin(this IActivityBuilder builder, JoinBuildAction joinBuildAction) + => builder.AddJoin(ActivityNodeInfo.Name, joinBuildAction); + public static IActivityBuilder AddFork(this IActivityBuilder builder, string forkNodeName, ForkBuildAction forkBuildAction) => (builder as BaseActivityBuilder) .AddNode( @@ -35,6 +38,9 @@ public static IActivityBuilder AddFork(this IActivityBuilder builder, string for b => forkBuildAction(b) ) as IActivityBuilder; + public static IActivityBuilder AddFork(this IActivityBuilder builder, ForkBuildAction forkBuildAction) + => builder.AddFork(ActivityNodeInfo.Name, forkBuildAction); + public static IActivityBuilder AddMerge(this IActivityBuilder builder, string mergeNodeName, MergeBuildAction mergeBuildAction) => (builder as BaseActivityBuilder) .AddNode( diff --git a/Core/Stateflows/Activities/Registration/Interfaces/Extensions/ReactiveStructuredActivityBuilder/ReactiveStructuredActivityBuilderSpecialsExtensions.cs b/Core/Stateflows/Activities/Registration/Interfaces/Extensions/ReactiveStructuredActivityBuilder/ReactiveStructuredActivityBuilderSpecialsExtensions.cs index d4451a30..f1eb5cb8 100644 --- a/Core/Stateflows/Activities/Registration/Interfaces/Extensions/ReactiveStructuredActivityBuilder/ReactiveStructuredActivityBuilderSpecialsExtensions.cs +++ b/Core/Stateflows/Activities/Registration/Interfaces/Extensions/ReactiveStructuredActivityBuilder/ReactiveStructuredActivityBuilderSpecialsExtensions.cs @@ -21,6 +21,9 @@ public static IReactiveStructuredActivityBuilder AddJoin(this IReactiveStructure b => buildAction(b) ) as IReactiveStructuredActivityBuilder; + public static IReactiveStructuredActivityBuilder AddJoin(this IReactiveStructuredActivityBuilder builder, JoinBuildAction joinBuildAction) + => builder.AddJoin(ActivityNodeInfo.Name, joinBuildAction); + public static IReactiveStructuredActivityBuilder AddFork(this IReactiveStructuredActivityBuilder builder, string forkNodeName, ForkBuildAction buildAction) => (builder as BaseActivityBuilder) .AddNode( @@ -34,6 +37,9 @@ public static IReactiveStructuredActivityBuilder AddFork(this IReactiveStructure b => buildAction(b) ) as IReactiveStructuredActivityBuilder; + public static IReactiveStructuredActivityBuilder AddFork(this IReactiveStructuredActivityBuilder builder, ForkBuildAction forkBuildAction) + => builder.AddFork(ActivityNodeInfo.Name, forkBuildAction); + public static IReactiveStructuredActivityBuilder AddMerge(this IReactiveStructuredActivityBuilder builder, string mergeNodeName, MergeBuildAction buildAction) => (builder as BaseActivityBuilder) .AddNode( diff --git a/Core/Stateflows/Activities/Registration/Interfaces/Extensions/StructuredActivityBuilder/StructuredActivityBuilderSpecialsExtensions.cs b/Core/Stateflows/Activities/Registration/Interfaces/Extensions/StructuredActivityBuilder/StructuredActivityBuilderSpecialsExtensions.cs index a650ebe9..f393651b 100644 --- a/Core/Stateflows/Activities/Registration/Interfaces/Extensions/StructuredActivityBuilder/StructuredActivityBuilderSpecialsExtensions.cs +++ b/Core/Stateflows/Activities/Registration/Interfaces/Extensions/StructuredActivityBuilder/StructuredActivityBuilderSpecialsExtensions.cs @@ -21,6 +21,9 @@ public static IStructuredActivityBuilder AddJoin(this IStructuredActivityBuilder b => joinBuildAction(b) ) as IStructuredActivityBuilder; + public static IStructuredActivityBuilder AddJoin(this IStructuredActivityBuilder builder, JoinBuildAction joinBuildAction) + => builder.AddJoin(ActivityNodeInfo.Name, joinBuildAction); + public static IStructuredActivityBuilder AddFork(this IStructuredActivityBuilder builder, string forkNodeName, ForkBuildAction forkBuildAction) => (builder as BaseActivityBuilder) .AddNode( @@ -34,6 +37,9 @@ public static IStructuredActivityBuilder AddFork(this IStructuredActivityBuilder b => forkBuildAction(b) ) as IStructuredActivityBuilder; + public static IStructuredActivityBuilder AddFork(this IStructuredActivityBuilder builder, ForkBuildAction forkBuildAction) + => builder.AddFork(ActivityNodeInfo.Name, forkBuildAction); + public static IStructuredActivityBuilder AddMerge(this IStructuredActivityBuilder builder, string mergeNodeName, MergeBuildAction mergeBuildAction) => (builder as BaseActivityBuilder) .AddNode( diff --git a/Core/Stateflows/Stateflows.csproj b/Core/Stateflows/Stateflows.csproj index d45d2337..0b978a1f 100644 --- a/Core/Stateflows/Stateflows.csproj +++ b/Core/Stateflows/Stateflows.csproj @@ -3,7 +3,7 @@ netstandard2.1 Stateflows framework core - 0.8.0-alpha + 0.8.1-alpha Stateflows https://www.stateflows.net stateflows-logo-1024.png diff --git a/Extensions/Stateflows.Extensions.PlantUml/Stateflows.Extensions.PlantUml.csproj b/Extensions/Stateflows.Extensions.PlantUml/Stateflows.Extensions.PlantUml.csproj index 1b870403..0452b874 100644 --- a/Extensions/Stateflows.Extensions.PlantUml/Stateflows.Extensions.PlantUml.csproj +++ b/Extensions/Stateflows.Extensions.PlantUml/Stateflows.Extensions.PlantUml.csproj @@ -3,7 +3,7 @@ netstandard2.1 PlantUML extension for Stateflows framework - 0.8.0-alpha + 0.8.1-alpha Stateflows https://www.stateflows.net stateflows-logo-1024.png diff --git a/Locks/Stateflows.Locks.DistributedLock/Stateflows.Locks.DistributedLock.csproj b/Locks/Stateflows.Locks.DistributedLock/Stateflows.Locks.DistributedLock.csproj index 25c2b9a8..cea5bbca 100644 --- a/Locks/Stateflows.Locks.DistributedLock/Stateflows.Locks.DistributedLock.csproj +++ b/Locks/Stateflows.Locks.DistributedLock/Stateflows.Locks.DistributedLock.csproj @@ -4,7 +4,7 @@ netstandard2.1 enable DistributedLock locking for Stateflows framework - 0.8.0-alpha + 0.8.1-alpha Stateflows https://www.stateflows.net stateflows-logo-1024.png diff --git a/Storage/Stateflows.Storage.EntityFrameworkCore.6.0/Stateflows - Backup.Storage.EntityFrameworkCore.6.0.csproj b/Storage/Stateflows.Storage.EntityFrameworkCore.6.0/Stateflows - Backup.Storage.EntityFrameworkCore.6.0.csproj deleted file mode 100644 index 31b05041..00000000 --- a/Storage/Stateflows.Storage.EntityFrameworkCore.6.0/Stateflows - Backup.Storage.EntityFrameworkCore.6.0.csproj +++ /dev/null @@ -1,52 +0,0 @@ - - - - net6.0 - enable - enable - Entity Framework Core 6.0 storage for Stateflows framework - 0.7.0-alpha - Stateflows - https://www.stateflows.net - stateflows-logo-1024.png - git - https://github.com/Stateflows/framework - Stateflows;state-machine;activity;workflow;EF;EFCore;EntityFrameworkCore;entity-framework-core - True - README.md - LICENSE - ..\..\NuGet - - - - $(WarningsAsErrors);NU1605 - - - - $(WarningsAsErrors);NU1605 - - - - - True - \ - - - True - \ - - - True - \ - - - - - - - - - - - - diff --git a/Storage/Stateflows.Storage.EntityFrameworkCore.6.0/DependencyInjection.cs b/Storage/Stateflows.Storage.EntityFrameworkCore/DependencyInjection.cs similarity index 100% rename from Storage/Stateflows.Storage.EntityFrameworkCore.6.0/DependencyInjection.cs rename to Storage/Stateflows.Storage.EntityFrameworkCore/DependencyInjection.cs diff --git a/Storage/Stateflows.Storage.EntityFrameworkCore.6.0/EntityFrameworkCore/Entities/Context_v1.cs b/Storage/Stateflows.Storage.EntityFrameworkCore/EntityFrameworkCore/Entities/Context_v1.cs similarity index 100% rename from Storage/Stateflows.Storage.EntityFrameworkCore.6.0/EntityFrameworkCore/Entities/Context_v1.cs rename to Storage/Stateflows.Storage.EntityFrameworkCore/EntityFrameworkCore/Entities/Context_v1.cs diff --git a/Storage/Stateflows.Storage.EntityFrameworkCore.6.0/EntityFrameworkCore/Entities/Trace_v1.cs b/Storage/Stateflows.Storage.EntityFrameworkCore/EntityFrameworkCore/Entities/Trace_v1.cs similarity index 100% rename from Storage/Stateflows.Storage.EntityFrameworkCore.6.0/EntityFrameworkCore/Entities/Trace_v1.cs rename to Storage/Stateflows.Storage.EntityFrameworkCore/EntityFrameworkCore/Entities/Trace_v1.cs diff --git a/Storage/Stateflows.Storage.EntityFrameworkCore.6.0/EntityFrameworkCore/IStateflowsDbContext_v1.cs b/Storage/Stateflows.Storage.EntityFrameworkCore/EntityFrameworkCore/IStateflowsDbContext_v1.cs similarity index 100% rename from Storage/Stateflows.Storage.EntityFrameworkCore.6.0/EntityFrameworkCore/IStateflowsDbContext_v1.cs rename to Storage/Stateflows.Storage.EntityFrameworkCore/EntityFrameworkCore/IStateflowsDbContext_v1.cs diff --git a/Storage/Stateflows.Storage.EntityFrameworkCore.6.0/Stateflows.Storage.EntityFrameworkCore.6.0.csproj b/Storage/Stateflows.Storage.EntityFrameworkCore/Stateflows.Storage.EntityFrameworkCore.csproj similarity index 98% rename from Storage/Stateflows.Storage.EntityFrameworkCore.6.0/Stateflows.Storage.EntityFrameworkCore.6.0.csproj rename to Storage/Stateflows.Storage.EntityFrameworkCore/Stateflows.Storage.EntityFrameworkCore.csproj index c48e2021..ab3965df 100644 --- a/Storage/Stateflows.Storage.EntityFrameworkCore.6.0/Stateflows.Storage.EntityFrameworkCore.6.0.csproj +++ b/Storage/Stateflows.Storage.EntityFrameworkCore/Stateflows.Storage.EntityFrameworkCore.csproj @@ -5,7 +5,7 @@ enable enable Entity Framework Core 6.0 storage for Stateflows framework - 0.7.0-alpha + 0.8.1-alpha Stateflows https://www.stateflows.net stateflows-logo-1024.png diff --git a/Storage/Stateflows.Storage.EntityFrameworkCore.6.0/Stateflows/EntityFrameworkCoreStorage.cs b/Storage/Stateflows.Storage.EntityFrameworkCore/Stateflows/EntityFrameworkCoreStorage.cs similarity index 100% rename from Storage/Stateflows.Storage.EntityFrameworkCore.6.0/Stateflows/EntityFrameworkCoreStorage.cs rename to Storage/Stateflows.Storage.EntityFrameworkCore/Stateflows/EntityFrameworkCoreStorage.cs diff --git a/Storage/Stateflows.Storage.EntityFrameworkCore.6.0/Utils/DbSetExtensions.cs b/Storage/Stateflows.Storage.EntityFrameworkCore/Utils/DbSetExtensions.cs similarity index 100% rename from Storage/Stateflows.Storage.EntityFrameworkCore.6.0/Utils/DbSetExtensions.cs rename to Storage/Stateflows.Storage.EntityFrameworkCore/Utils/DbSetExtensions.cs diff --git a/Transport/Stateflows.Transport.AspNetCore.SignalR.Client/Stateflows.Transport.AspNetCore.SignalR.Client.csproj b/Transport/Stateflows.Transport.AspNetCore.SignalR.Client/Stateflows.Transport.AspNetCore.SignalR.Client.csproj index 4ebb134f..977e8b53 100644 --- a/Transport/Stateflows.Transport.AspNetCore.SignalR.Client/Stateflows.Transport.AspNetCore.SignalR.Client.csproj +++ b/Transport/Stateflows.Transport.AspNetCore.SignalR.Client/Stateflows.Transport.AspNetCore.SignalR.Client.csproj @@ -5,7 +5,7 @@ enable enable Stateflows;state-machine;activity;workflow;SignalR;signal-r - 0.8.0-alpha + 0.8.1-alpha SignalR transport client for Stateflows framework True Stateflows diff --git a/Transport/Stateflows.Transport.AspNetCore.SignalR/Stateflows.Transport.AspNetCore.SignalR.csproj b/Transport/Stateflows.Transport.AspNetCore.SignalR/Stateflows.Transport.AspNetCore.SignalR.csproj index 4bc4feb9..56e56f5f 100644 --- a/Transport/Stateflows.Transport.AspNetCore.SignalR/Stateflows.Transport.AspNetCore.SignalR.csproj +++ b/Transport/Stateflows.Transport.AspNetCore.SignalR/Stateflows.Transport.AspNetCore.SignalR.csproj @@ -4,7 +4,7 @@ net6.0 enable enable - 0.8.0-alpha + 0.8.1-alpha SignalR transport for Stateflows framework Stateflows https://www.stateflows.net