From a01e61aafe210a853da2f01fb44898b7125463c5 Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 3 Nov 2026 20:34:34 +0100 Subject: [PATCH] Add CloseWorkflowCommand with MediatR support Introduce CloseWorkflowCommand and CloseWorkflowResult records in CloseWorkflowCommand.cs within the DigitalData.TaskFlow namespace. The command encapsulates data for closing a workflow, including WisagId, Source, ProcessId, ClosingMethodId, Comment, and RejectionReasonId. The result record provides ResultCode and ResultMessage to convey the operation's outcome. These changes utilize MediatR, aligning with the CQRS pattern for state modification. --- .../Workflows/Commands/CloseWorkflowCommand.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/core/DigitalData.TaskFlow.Application/Features/Workflows/Commands/CloseWorkflowCommand.cs diff --git a/src/core/DigitalData.TaskFlow.Application/Features/Workflows/Commands/CloseWorkflowCommand.cs b/src/core/DigitalData.TaskFlow.Application/Features/Workflows/Commands/CloseWorkflowCommand.cs new file mode 100644 index 0000000..63ff33a --- /dev/null +++ b/src/core/DigitalData.TaskFlow.Application/Features/Workflows/Commands/CloseWorkflowCommand.cs @@ -0,0 +1,15 @@ +using MediatR; + +namespace DigitalData.TaskFlow.Application.Features.Workflows.Commands; + +public sealed record CloseWorkflowCommand( + int WisagId, + string Source, + long ProcessId, + int ClosingMethodId, + string? Comment, + byte? RejectionReasonId) : IRequest; + +public sealed record CloseWorkflowResult( + int ResultCode, + string ResultMessage);