From 859ff5902e8c67bb563d5841e40eed60cb4fd496 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 15 Apr 2026 13:33:39 +0200 Subject: [PATCH] Include References in InsertResultCommand for all results Add request.References to InsertResultCommand in both PreprocessingBehavior and PostprocessingBehavior, ensuring references are recorded with both success and error results. --- .../Common/Behaviors/InvokeAction/PostprocessingBehavior.cs | 6 ++++-- .../Common/Behaviors/InvokeAction/PreprocessingBehavior.cs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ReC.Application/Common/Behaviors/InvokeAction/PostprocessingBehavior.cs b/src/ReC.Application/Common/Behaviors/InvokeAction/PostprocessingBehavior.cs index c4ded54..58efd76 100644 --- a/src/ReC.Application/Common/Behaviors/InvokeAction/PostprocessingBehavior.cs +++ b/src/ReC.Application/Common/Behaviors/InvokeAction/PostprocessingBehavior.cs @@ -26,7 +26,8 @@ public class PostprocessingBehavior(IRecDbContext context, ISender sender) : IPi Status = RecStatus.OK, ActionId = request.Action.Id, InfoDetail = info, - Type = ResultType.Post + Type = ResultType.Post, + References = request.References }, cancel); } } @@ -39,7 +40,8 @@ public class PostprocessingBehavior(IRecDbContext context, ISender sender) : IPi Status = RecStatus.Error, ActionId = request.Action.Id, Error = error, - Type = ResultType.Post + Type = ResultType.Post, + References = request.References }, cancel); if (request.Action.ErrorAction == ErrorAction.Stop) diff --git a/src/ReC.Application/Common/Behaviors/InvokeAction/PreprocessingBehavior.cs b/src/ReC.Application/Common/Behaviors/InvokeAction/PreprocessingBehavior.cs index 6cc3794..8265559 100644 --- a/src/ReC.Application/Common/Behaviors/InvokeAction/PreprocessingBehavior.cs +++ b/src/ReC.Application/Common/Behaviors/InvokeAction/PreprocessingBehavior.cs @@ -23,7 +23,8 @@ public class PreprocessingBehavior(IRecDbContext context, ISender sender) : IPip Status = RecStatus.OK, ActionId = request.Action.Id, InfoDetail = JsonSerializer.Serialize(result), - Type = ResultType.Pre + Type = ResultType.Pre, + References = request.References }, cancel); } } @@ -34,7 +35,8 @@ public class PreprocessingBehavior(IRecDbContext context, ISender sender) : IPip Status = RecStatus.Error, ActionId = request.Action.Id, Error = ex.ToString(), - Type = ResultType.Pre + Type = ResultType.Pre, + References = request.References }, cancel); if (request.Action.ErrorAction == ErrorAction.Stop)