From 22336f502751bed9a4f9e26760f42d54e00cbe17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Stenr=C3=B8jl?= Date: Wed, 20 Nov 2024 10:24:49 +0100 Subject: [PATCH] Rename --- .../V1/NotifyAggregatedMeasureDataHandler.cs | 10 +++++----- .../V1/NotifyAggregatedMeasureDataTriggerV1.cs | 4 ++-- .../Api/CancelScheduledOrchestrationInstanceTrigger.cs | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/ProcessManager.Orchestrations/Processes/BRS_023_027/V1/NotifyAggregatedMeasureDataHandler.cs b/source/ProcessManager.Orchestrations/Processes/BRS_023_027/V1/NotifyAggregatedMeasureDataHandler.cs index 6dd50004ba..28fac46dcd 100644 --- a/source/ProcessManager.Orchestrations/Processes/BRS_023_027/V1/NotifyAggregatedMeasureDataHandler.cs +++ b/source/ProcessManager.Orchestrations/Processes/BRS_023_027/V1/NotifyAggregatedMeasureDataHandler.cs @@ -26,24 +26,24 @@ internal class NotifyAggregatedMeasureDataHandler( private readonly IStartOrchestrationInstanceCommands _manager = manager; public async Task ScheduleNewCalculationAsync( - ScheduleOrchestrationInstanceCommand dto) + ScheduleOrchestrationInstanceCommand command) { // TODO: // Server-side validation => Validate "period" is midnight values when given "timezone" etc. // See class Calculation and method IsValid in Wholesale. // Here we show how its possible, based on input, to decide certain steps should be skipped by the orchestration. - IReadOnlyCollection skipStepsBySequence = dto.InputParameter.IsInternalCalculation + IReadOnlyCollection skipStepsBySequence = command.InputParameter.IsInternalCalculation ? [NotifyAggregatedMeasureDataOrchestrationV1.EnqueueMessagesStepSequence] : []; var orchestrationInstanceId = await _manager .ScheduleNewOrchestrationInstanceAsync( - identity: new UserIdentity(new UserId(dto.UserIdentity.UserId), new ActorId(dto.UserIdentity.ActorId)), + identity: new UserIdentity(new UserId(command.UserIdentity.UserId), new ActorId(command.UserIdentity.ActorId)), name: "BRS_023_027", version: 1, - inputParameter: dto.InputParameter, - runAt: dto.RunAt.ToInstant(), + inputParameter: command.InputParameter, + runAt: command.RunAt.ToInstant(), skipStepsBySequence: skipStepsBySequence) .ConfigureAwait(false); diff --git a/source/ProcessManager.Orchestrations/Processes/BRS_023_027/V1/NotifyAggregatedMeasureDataTriggerV1.cs b/source/ProcessManager.Orchestrations/Processes/BRS_023_027/V1/NotifyAggregatedMeasureDataTriggerV1.cs index 4589d21f06..92b0f01d1c 100644 --- a/source/ProcessManager.Orchestrations/Processes/BRS_023_027/V1/NotifyAggregatedMeasureDataTriggerV1.cs +++ b/source/ProcessManager.Orchestrations/Processes/BRS_023_027/V1/NotifyAggregatedMeasureDataTriggerV1.cs @@ -37,10 +37,10 @@ public async Task Run( Route = "processmanager/orchestrationinstance/brs_023_027/1")] HttpRequest httpRequest, [FromBody] - ScheduleOrchestrationInstanceCommand dto, + ScheduleOrchestrationInstanceCommand command, FunctionContext executionContext) { - var orchestrationInstanceId = await _handler.ScheduleNewCalculationAsync(dto).ConfigureAwait(false); + var orchestrationInstanceId = await _handler.ScheduleNewCalculationAsync(command).ConfigureAwait(false); return new OkObjectResult(orchestrationInstanceId.Value); } } diff --git a/source/ProcessManager/Api/CancelScheduledOrchestrationInstanceTrigger.cs b/source/ProcessManager/Api/CancelScheduledOrchestrationInstanceTrigger.cs index c29f6f763c..b1fab5c09a 100644 --- a/source/ProcessManager/Api/CancelScheduledOrchestrationInstanceTrigger.cs +++ b/source/ProcessManager/Api/CancelScheduledOrchestrationInstanceTrigger.cs @@ -40,13 +40,13 @@ public async Task Run( Route = "processmanager/orchestrationinstance/cancel")] HttpRequest httpRequest, [FromBody] - CancelScheduledOrchestrationInstanceCommand dto, + CancelScheduledOrchestrationInstanceCommand command, FunctionContext executionContext) { await _command .CancelScheduledOrchestrationInstanceAsync( - new UserIdentity(new UserId(dto.UserIdentity.UserId), new ActorId(dto.UserIdentity.ActorId)), - new OrchestrationInstanceId(dto.Id)) + new UserIdentity(new UserId(command.UserIdentity.UserId), new ActorId(command.UserIdentity.ActorId)), + new OrchestrationInstanceId(command.Id)) .ConfigureAwait(false); return new OkResult();