using AutomationDAL.CustomCode.DocumentFlow; using AutomationDAL.DTO.DocumentFlow; using GB5Shared.DTO.Framework.Login; namespace AutomationBLL.DocumentFlow; public class DocumentFlowBLL : IDocumentFlowBLL { private readonly IDocumentFlowDAL _dal; public DocumentFlowBLL(IDocumentFlowDAL dal) => _dal = dal; public async Task GetByOrderStage(string orderId, string stage, LoginDTO login, CancellationToken ct) => await _dal.GetByOrderStage(orderId, stage, login, ct).ConfigureAwait(false); public async Task> GetByOrder(string orderId, LoginDTO login, CancellationToken ct) => await _dal.GetByOrder(orderId, login, ct).ConfigureAwait(false); public async Task MarkPending(string orderId, string stage, long runId, string? ackCallbackUrl, LoginDTO login, CancellationToken ct) => await _dal.UpsertPending(orderId, stage, runId, ackCallbackUrl, login, ct).ConfigureAwait(false); // No-ops harmlessly (0 rows affected) for runs that aren't event-driven — not every // TRUNEXECUTION row has a TDOCUMENTFLOW row pointing at it. public async Task UpdateStatusByRunId(long runId, string status, LoginDTO login, CancellationToken ct) => await _dal.UpdateStatusByRunId(runId, status, login, ct).ConfigureAwait(false); public async Task GetByRunId(long runId, LoginDTO login, CancellationToken ct) => await _dal.GetByRunId(runId, login, ct).ConfigureAwait(false); }