From a8898c41472d5e2085482d8563de319de078a6b8 Mon Sep 17 00:00:00 2001 From: Dennis Beuchler Date: Wed, 12 Jun 2024 12:59:09 +0200 Subject: [PATCH 01/11] Usage of Array.Empty instead of new array creation --- src/Moryx.ControlSystem/Cells/Session.cs | 2 +- src/Moryx.ControlSystem/Jobs/Job.cs | 4 ++-- src/Moryx.ControlSystem/Jobs/JobSchedulerBase.cs | 2 +- .../VisualInstructions/ActiveInstruction.cs | 2 +- src/Moryx.Orders/Assignment/Recipes/RecipeAssignmentBase.cs | 3 ++- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Moryx.ControlSystem/Cells/Session.cs b/src/Moryx.ControlSystem/Cells/Session.cs index 2b3e738..7bfaa11 100644 --- a/src/Moryx.ControlSystem/Cells/Session.cs +++ b/src/Moryx.ControlSystem/Cells/Session.cs @@ -16,7 +16,7 @@ public abstract class Session /// /// Empty array of constraints /// - protected static readonly IConstraint[] EmptyConstraints = new IConstraint[0]; + protected static readonly IConstraint[] EmptyConstraints = Array.Empty(); /// /// Initialize a new resource request for a certain resource diff --git a/src/Moryx.ControlSystem/Jobs/Job.cs b/src/Moryx.ControlSystem/Jobs/Job.cs index 00d68c4..175d27c 100644 --- a/src/Moryx.ControlSystem/Jobs/Job.cs +++ b/src/Moryx.ControlSystem/Jobs/Job.cs @@ -63,7 +63,7 @@ public Job(IRecipe recipe, int amount) /// public IReadOnlyList RunningProcesses { - get => _runningProcesses ?? new IProcess[0]; + get => _runningProcesses ?? Array.Empty(); protected set => _runningProcesses = value; } @@ -73,7 +73,7 @@ public IReadOnlyList RunningProcesses /// public IReadOnlyList AllProcesses { - get => _allProcesses ?? new IProcess[0]; + get => _allProcesses ?? Array.Empty(); protected set => _allProcesses = value; } } diff --git a/src/Moryx.ControlSystem/Jobs/JobSchedulerBase.cs b/src/Moryx.ControlSystem/Jobs/JobSchedulerBase.cs index 3f8d3b8..09e624b 100644 --- a/src/Moryx.ControlSystem/Jobs/JobSchedulerBase.cs +++ b/src/Moryx.ControlSystem/Jobs/JobSchedulerBase.cs @@ -24,7 +24,7 @@ public abstract class JobSchedulerBase : IJobScheduler /// /// Empty array for jobs without dependencies /// - private readonly Job[] EmptyDependencies = new Job[0]; + private readonly Job[] EmptyDependencies = Array.Empty(); /// /// Dependency map that can be helpful for job scheduling diff --git a/src/Moryx.ControlSystem/VisualInstructions/ActiveInstruction.cs b/src/Moryx.ControlSystem/VisualInstructions/ActiveInstruction.cs index a31db33..e8c52c2 100644 --- a/src/Moryx.ControlSystem/VisualInstructions/ActiveInstruction.cs +++ b/src/Moryx.ControlSystem/VisualInstructions/ActiveInstruction.cs @@ -34,7 +34,7 @@ public class ActiveInstruction /// Results of the instruction /// [Obsolete("Use the result objects in 'Results' property instead!")] - public string[] PossibleResults { get; set; } = new string[0]; + public string[] PossibleResults { get; set; } = Array.Empty(); /// /// Possible results of the instruction diff --git a/src/Moryx.Orders/Assignment/Recipes/RecipeAssignmentBase.cs b/src/Moryx.Orders/Assignment/Recipes/RecipeAssignmentBase.cs index adabcba..c8b6a61 100644 --- a/src/Moryx.Orders/Assignment/Recipes/RecipeAssignmentBase.cs +++ b/src/Moryx.Orders/Assignment/Recipes/RecipeAssignmentBase.cs @@ -1,6 +1,7 @@ // Copyright (c) 2021, Phoenix Contact GmbH & Co. KG // Licensed under the Apache License, Version 2.0 +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -55,7 +56,7 @@ public virtual Task> PossibleRecipes(ProductIdenti { var product = ProductManagement.LoadType(identity); if (product == null) - return Task.FromResult>(new IProductRecipe[0]); + return Task.FromResult>(Array.Empty()); var recipes = ProductManagement.GetRecipes(product, RecipeClassification.Default | RecipeClassification.Alternative); return Task.FromResult(recipes); From edb61f14518ee4f3f81fddd8128cd93ef3cbc4ac Mon Sep 17 00:00:00 2001 From: Dennis Beuchler Date: Wed, 12 Jun 2024 13:00:07 +0200 Subject: [PATCH 02/11] Added state display name for jobs --- src/Moryx.ControlSystem/Jobs/Job.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Moryx.ControlSystem/Jobs/Job.cs b/src/Moryx.ControlSystem/Jobs/Job.cs index 175d27c..3495874 100644 --- a/src/Moryx.ControlSystem/Jobs/Job.cs +++ b/src/Moryx.ControlSystem/Jobs/Job.cs @@ -56,7 +56,13 @@ public Job(IRecipe recipe, int amount) /// Classification of the job /// public JobClassification Classification { get; set; } - + + /// + /// Detailed display name of the state + /// TODO: Remove this property in next major and replace with reworked JobClassification + /// + public virtual string StateDisplayName { get; protected set; } + private IReadOnlyList _runningProcesses; /// /// Currently running processes of the job From 6e00ae2b558f48054d25909eedd6a503ac36bc28 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Thu, 4 Jul 2024 11:49:22 +0200 Subject: [PATCH 03/11] Bump version to 8.2.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 0e79152..fbb9ea1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.1.1 +8.2.0 From df32d3a01385b4beac20e95d2f63f147c4135c32 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Thu, 18 Jul 2024 10:52:08 +0200 Subject: [PATCH 04/11] Instructor extension did not set the new results --- VERSION | 2 +- .../VisualInstructions/VisualInstructorExtensions.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index fbb9ea1..2b0aa21 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.2.0 +8.2.1 diff --git a/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs b/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs index 1ea7a19..dc900cd 100644 --- a/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs +++ b/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs @@ -96,7 +96,8 @@ public static long Execute(this IVisualInstructor instructor, string title, Acti { Title = title, Instructions = instructions, - PossibleResults = results + PossibleResults = results, + Results = results.Select(r => new InstructionResult { Key = r, DisplayValue = r }).ToArray() }, callback); } @@ -161,11 +162,13 @@ private static long ExecuteWithEnum(this IVisualInstructor instructor, string ti throw new ArgumentException("Result type is not an enum!"); var results = EnumInstructionResult.PossibleResults(attr.ResultEnum); + var resultObjects = EnumInstructionResult.PossibleInstructionResults(attr.ResultEnum); return instructor.Execute(new ActiveInstruction { Title = title, Instructions = parameters, PossibleResults = results, + Results = resultObjects.ToArray(), Inputs = inputs }, instructionResponse => callback(EnumInstructionResult.ResultToEnumValue(attr.ResultEnum, instructionResponse.Result), instructionResponse.Inputs, activityStart)); } From 79112d70335d7caca4fa9fae28ed826dfb859197 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Thu, 5 Sep 2024 08:20:35 +0200 Subject: [PATCH 05/11] Session context struct avoids changes on previos sequence --- src/Moryx.ControlSystem/Cells/ReadyToWork.cs | 10 +++------- src/Moryx.ControlSystem/Cells/Session.cs | 17 ++++++++++------- .../ProductionSessionTests.cs | 9 +++++---- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Moryx.ControlSystem/Cells/ReadyToWork.cs b/src/Moryx.ControlSystem/Cells/ReadyToWork.cs index 5fe92c0..af53fe8 100644 --- a/src/Moryx.ControlSystem/Cells/ReadyToWork.cs +++ b/src/Moryx.ControlSystem/Cells/ReadyToWork.cs @@ -52,10 +52,8 @@ internal ReadyToWork(Session currentSession) /// /// The activity. public ActivityStart StartActivity(IActivity activity) - { - // Update process before next stage - Process = activity.Process; - return new ActivityStart(this, activity); + { + return new ActivityStart(this, activity) { Process = activity.Process }; } /// @@ -63,9 +61,7 @@ public ActivityStart StartActivity(IActivity activity) /// public SequenceCompleted CompleteSequence(IProcess process, bool processActive, params long[] nextCells) { - // Update process before next stage - Process = process; - return new SequenceCompleted(this, processActive, nextCells); + return new SequenceCompleted(this, processActive, nextCells) { Process = process }; } /// diff --git a/src/Moryx.ControlSystem/Cells/Session.cs b/src/Moryx.ControlSystem/Cells/Session.cs index 2b3e738..19574b7 100644 --- a/src/Moryx.ControlSystem/Cells/Session.cs +++ b/src/Moryx.ControlSystem/Cells/Session.cs @@ -37,7 +37,7 @@ protected Session(Session currentSession) /// /// Context class holding all session information /// - private readonly SessionContext _context; + private SessionContext _context; /// /// Unique id of the current production transaction @@ -134,24 +134,27 @@ private static ReadyToWork CreateSession(ActivityClassification classification, #endregion - private class SessionContext + private struct SessionContext { internal SessionContext(ActivityClassification classification, Guid sessionId, ProcessReference reference) { Classification = classification; SessionId = sessionId; Reference = reference; + + Tag = null; + Process = null; } - public Guid SessionId { get; } + public Guid SessionId; - public IProcess Process { get; set; } + public IProcess Process; - public ProcessReference Reference { get; set; } + public ProcessReference Reference; - public ActivityClassification Classification { get; } + public ActivityClassification Classification; - public object Tag { get; set; } + public object Tag; } } } diff --git a/src/Tests/Moryx.ControlSystem.Tests/ProductionSessionTests.cs b/src/Tests/Moryx.ControlSystem.Tests/ProductionSessionTests.cs index 52a5995..29f03f4 100644 --- a/src/Tests/Moryx.ControlSystem.Tests/ProductionSessionTests.cs +++ b/src/Tests/Moryx.ControlSystem.Tests/ProductionSessionTests.cs @@ -46,10 +46,11 @@ public void TestCreateActivityStart() { var readyToWork = Session.StartSession(ActivityClassification.Production, ReadyToWorkType.Pull, 4242); - var activityStart = readyToWork.StartActivity(new DummyActivity { Process = new Process() }); + var activityStart = readyToWork.StartActivity(new DummyActivity { Process = new Process { Id = 4242 } }); Assert.AreEqual(readyToWork.Reference, activityStart.Reference); Assert.AreEqual(readyToWork.Id, activityStart.Id); + Assert.AreNotEqual(readyToWork.Process, activityStart.Process); // Make sure process is not populated back to RTW } [Test] @@ -82,7 +83,7 @@ public void TestCreateActivityResult() { var readyToWork = Session.StartSession(ActivityClassification.Production, ReadyToWorkType.Pull, 4242); - var activityStart = readyToWork.StartActivity(new DummyActivity { Process = new Process() }); + var activityStart = readyToWork.StartActivity(new DummyActivity { Process = new Process { Id = 4242 } }); activityStart.Activity.Complete(1); var activityCompleted = activityStart.CreateResult(); @@ -96,7 +97,7 @@ public void TestCompleteSequence() { var readyToWork = Session.StartSession(ActivityClassification.Production, ReadyToWorkType.Pull, 4242); - var activityStart = readyToWork.StartActivity(new DummyActivity {Process = new Process()}); + var activityStart = readyToWork.StartActivity(new DummyActivity { Process = new Process { Id = 4242 } }); activityStart.Activity.Complete(1); var activityCompleted = activityStart.CreateResult(); @@ -123,7 +124,7 @@ public void TestContinueSession(ReadyToWorkType readyToWorkType) { var readyToWork = Session.StartSession(ActivityClassification.Production, readyToWorkType, 4242); - var activityStart = readyToWork.StartActivity(new DummyActivity { Process = new Process() }); + var activityStart = readyToWork.StartActivity(new DummyActivity { Process = new Process { Id = 4242 } }); activityStart.Activity.Complete(1); var activityCompleted = activityStart.CreateResult(); From 457aff88cce88a64fe14a03c1df2cab89bc14ffb Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Fri, 13 Sep 2024 13:32:28 +0200 Subject: [PATCH 06/11] Update VERSION to 8.2.2 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 2b0aa21..308c0cb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.2.1 +8.2.2 From 61ace1a874498f8d37eb2ab79470517ab3b7a08c Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Fri, 13 Sep 2024 13:52:36 +0200 Subject: [PATCH 07/11] Replace deprecated github action --- .github/workflows/build-and-test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 26cc887..81bc6da 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -36,7 +36,7 @@ jobs: run: ./Build.ps1 -Build -Pack - name: Upload package artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: packages path: artifacts/Packages/ @@ -58,7 +58,7 @@ jobs: run: ./Build.ps1 -UnitTests - name: Upload test results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: test-results path: artifacts/Tests/ @@ -75,7 +75,7 @@ jobs: run: ./Build.ps1 -GenerateDocs - name: Upload documentation results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: documentation path: artifacts/Documentation/ @@ -94,7 +94,7 @@ jobs: dotnet-version: ${{ env.dotnet_sdk_version }} - name: Download package artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: packages path: artifacts/Packages/ From 64f147822e1bb03f4b2ba0255e427c12991285e6 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Fri, 11 Oct 2024 09:52:15 +0200 Subject: [PATCH 08/11] Use correc invocation of instruction results --- VERSION | 2 +- .../VisualInstructions/EnumInstructionResult.cs | 14 ++++++++++++++ .../VisualInstructorExtensions.cs | 3 ++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 308c0cb..1365b92 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.2.2 +8.2.3 diff --git a/src/Moryx.ControlSystem/VisualInstructions/EnumInstructionResult.cs b/src/Moryx.ControlSystem/VisualInstructions/EnumInstructionResult.cs index 882b55b..605f6c7 100644 --- a/src/Moryx.ControlSystem/VisualInstructions/EnumInstructionResult.cs +++ b/src/Moryx.ControlSystem/VisualInstructions/EnumInstructionResult.cs @@ -49,6 +49,20 @@ public static int ResultToEnumValue(Type resultEnum, InstructionResult result) return int.Parse(result.Key); } + /// + /// Extract result from response object depending on what values is present + /// + public static int ResultToEnumValue(Type resultEnum, ActiveInstructionResponse response) + { + if(response.SelectedResult != null) + return ResultToEnumValue(resultEnum, response.SelectedResult); + + if (response.Result != null) + return ResultToEnumValue(resultEnum, response.Result); + + throw new ArgumentException("No result found on response", nameof(response)); + } + /// /// Convert string result to typed enum /// diff --git a/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs b/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs index dc900cd..5134d41 100644 --- a/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs +++ b/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs @@ -163,6 +163,7 @@ private static long ExecuteWithEnum(this IVisualInstructor instructor, string ti var results = EnumInstructionResult.PossibleResults(attr.ResultEnum); var resultObjects = EnumInstructionResult.PossibleInstructionResults(attr.ResultEnum); + return instructor.Execute(new ActiveInstruction { Title = title, @@ -170,7 +171,7 @@ private static long ExecuteWithEnum(this IVisualInstructor instructor, string ti PossibleResults = results, Results = resultObjects.ToArray(), Inputs = inputs - }, instructionResponse => callback(EnumInstructionResult.ResultToEnumValue(attr.ResultEnum, instructionResponse.Result), instructionResponse.Inputs, activityStart)); + }, instructionResponse => callback(EnumInstructionResult.ResultToEnumValue(attr.ResultEnum, instructionResponse), instructionResponse.Inputs, activityStart)); } private static VisualInstruction[] GetInstructions(ActivityStart activity) From 27a2c4af3a8639d5826a20ce4a52c8a90642d952 Mon Sep 17 00:00:00 2001 From: Christian Siewert Date: Tue, 12 Nov 2024 14:48:16 +0100 Subject: [PATCH 09/11] Add extension to create strings`.AsInstruction()`. --- .../VisualInstructorExtensions.cs | 19 ++++++++++++- .../VisualInstructorExtensionsTests.cs | 27 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 src/Tests/Moryx.ControlSystem.Tests/VisualInstructions/VisualInstructorExtensionsTests.cs diff --git a/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs b/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs index dd0bffb..278a06c 100644 --- a/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs +++ b/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) 2024, Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +using System; using System.Reflection; using Moryx.AbstractionLayer; using Moryx.ControlSystem.Cells; @@ -133,5 +136,19 @@ private static VisualInstruction[] GetInstructions(ActivityStart activity) return parameters.Instructions; } + + /// + /// Returns a text instruction for the given string. + /// + /// Instruction text + /// with type `Text` the given string as content + public static VisualInstruction AsInstruction(this string text) + { + return new VisualInstruction + { + Content = text, + Type = InstructionContentType.Text, + }; + } } } diff --git a/src/Tests/Moryx.ControlSystem.Tests/VisualInstructions/VisualInstructorExtensionsTests.cs b/src/Tests/Moryx.ControlSystem.Tests/VisualInstructions/VisualInstructorExtensionsTests.cs new file mode 100644 index 0000000..b7e0ac6 --- /dev/null +++ b/src/Tests/Moryx.ControlSystem.Tests/VisualInstructions/VisualInstructorExtensionsTests.cs @@ -0,0 +1,27 @@ +// Copyright (c) 2024, Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +using Moq; +using Moryx.ControlSystem.VisualInstructions; +using NUnit.Framework; +using System; + +namespace Moryx.ControlSystem.Tests.VisualInstructions +{ + [TestFixture] + + public class VisualInstructorExtensionsTests + { + [Test] + public void ExtensionCreatesStringAsInstruction() + { + var str = "text instruction"; + + var instruction = str.AsInstruction(); + + Assert.That(instruction.Type, Is.EqualTo(InstructionContentType.Text)); + Assert.That(instruction.Content, Is.EqualTo(str)); + } + + } +} From 1f8a5b686547d8704ce06475b7de6aec6cdff126 Mon Sep 17 00:00:00 2001 From: Marcel Vielhaus Date: Fri, 29 Nov 2024 14:31:42 +0100 Subject: [PATCH 10/11] Add `UnknownActivityAborted` session The new type is a session-wrapper for activities that should be aborted, but for which the session is unknown for a cell. It can be created and uses a new session context. --- .../Activities/ActivityClassification.cs | 7 ++++- .../Cells/ActivityCompleted.cs | 3 --- src/Moryx.ControlSystem/Cells/Session.cs | 14 ++++++++++ .../Cells/UnknownActivityAborted.cs | 26 +++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 src/Moryx.ControlSystem/Cells/UnknownActivityAborted.cs diff --git a/src/Moryx.ControlSystem/Activities/ActivityClassification.cs b/src/Moryx.ControlSystem/Activities/ActivityClassification.cs index 7548c64..17f721d 100644 --- a/src/Moryx.ControlSystem/Activities/ActivityClassification.cs +++ b/src/Moryx.ControlSystem/Activities/ActivityClassification.cs @@ -15,6 +15,11 @@ namespace Moryx.ControlSystem.Activities [Flags] public enum ActivityClassification { + /// + /// Use in case the activity classification is unkown + /// + Unknown = 0x00, + /// /// Default classification is production /// @@ -33,6 +38,6 @@ public enum ActivityClassification /// /// Activity performs a preparation, for example for a activity /// - Preparation = 0x08 + Preparation = 0x08, } } diff --git a/src/Moryx.ControlSystem/Cells/ActivityCompleted.cs b/src/Moryx.ControlSystem/Cells/ActivityCompleted.cs index 5d315fe..4ad1466 100644 --- a/src/Moryx.ControlSystem/Cells/ActivityCompleted.cs +++ b/src/Moryx.ControlSystem/Cells/ActivityCompleted.cs @@ -10,9 +10,6 @@ namespace Moryx.ControlSystem.Cells /// public class ActivityCompleted : Session, ICompletableSession { - /// - /// Initialize a new resource request for a certain resource - /// internal ActivityCompleted(IActivity completed, Session currentSession) : base(currentSession) { diff --git a/src/Moryx.ControlSystem/Cells/Session.cs b/src/Moryx.ControlSystem/Cells/Session.cs index 19574b7..9301530 100644 --- a/src/Moryx.ControlSystem/Cells/Session.cs +++ b/src/Moryx.ControlSystem/Cells/Session.cs @@ -125,6 +125,20 @@ public static ReadyToWork StartSession(ActivityClassification classification, Re return CreateSession(classification, type, ProcessReference.InstanceIdentity(identity), constraints); } + + /// + /// Creates a new for the activity + /// with a new session context and marks the activity as failed. + /// + /// + public static UnknownActivityAborted WrapUnknownActivity(IActivity unknown) + { + unknown.Fail(); + var wrapper = StartSession(ActivityClassification.Unknown, ReadyToWorkType.Unset, unknown.Process.Id) + .CompleteSequence(null, false, new long[] { }); + return new UnknownActivityAborted(unknown, wrapper); + } + private static ReadyToWork CreateSession(ActivityClassification classification, ReadyToWorkType type, ProcessReference reference, IConstraint[] constraints) { if (constraints == null) diff --git a/src/Moryx.ControlSystem/Cells/UnknownActivityAborted.cs b/src/Moryx.ControlSystem/Cells/UnknownActivityAborted.cs new file mode 100644 index 0000000..33a79ef --- /dev/null +++ b/src/Moryx.ControlSystem/Cells/UnknownActivityAborted.cs @@ -0,0 +1,26 @@ +// Copyright (c) 2024, Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +using Moryx.AbstractionLayer; + +namespace Moryx.ControlSystem.Cells +{ + /// + /// Message send by the resource managment when it aborted an activity for an + /// unkown session. + /// + public class UnknownActivityAborted : ActivityCompleted + { + internal UnknownActivityAborted(IActivity aborted, Session wrapper) + : base(aborted, wrapper) + { + aborted.Fail(); + AbortedActivity = aborted; + } + + /// + /// Activity that was aborted + /// + public IActivity AbortedActivity { get; } + } +} From e1dbcf285daacc358006bf78b84fd57ebbee4420 Mon Sep 17 00:00:00 2001 From: Marcel Vielhaus Date: Wed, 4 Dec 2024 15:17:19 +0100 Subject: [PATCH 11/11] Bump version to 8.2.4 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 1365b92..11cb5b7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.2.3 +8.2.4