From db39babeaafe0624b87f3fe1041f1f574caa2240 Mon Sep 17 00:00:00 2001 From: Andrew Boni Signori <61259237+andrewsignori-aot@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:19:47 -0700 Subject: [PATCH] #3878 - Update PTMSFAA File Name (#3880) Added a gap to skip some sequence numbers while generating the MSFAA sequence to avoid conflicts with legacy MSFAA. --- ...msfaa-part-time-process-integration.scheduler.e2e-spec.ts | 4 ++-- .../msfaa-integration/msfaa-request.processing.service.ts | 5 +++++ .../src/constants/system-configurations-constants.ts | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sources/packages/backend/apps/queue-consumers/src/processors/schedulers/esdc-integration/msfaa-integration/_tests_/msfaa-part-time-process-integration.scheduler.e2e-spec.ts b/sources/packages/backend/apps/queue-consumers/src/processors/schedulers/esdc-integration/msfaa-integration/_tests_/msfaa-part-time-process-integration.scheduler.e2e-spec.ts index 630029ffbc..f1f693ad32 100644 --- a/sources/packages/backend/apps/queue-consumers/src/processors/schedulers/esdc-integration/msfaa-integration/_tests_/msfaa-part-time-process-integration.scheduler.e2e-spec.ts +++ b/sources/packages/backend/apps/queue-consumers/src/processors/schedulers/esdc-integration/msfaa-integration/_tests_/msfaa-part-time-process-integration.scheduler.e2e-spec.ts @@ -84,7 +84,7 @@ describe( getProcessDateFromMSFAARequestContent(createMSFAARequestContentMock); const uploadedFile = getUploadedFile(sftpClientMock); expect(uploadedFile.remoteFilePath).toBe( - `MSFT-Request\\DPBC.EDU.MSFA.SENT.PT.${processDateFormatted}.001`, + `MSFT-Request\\DPBC.EDU.MSFA.SENT.PT.${processDateFormatted}.010`, ); // Assert process result. expect(msfaaRequestResults).toStrictEqual([ @@ -106,7 +106,7 @@ describe( ] = uploadedFile.fileLines; // Validate header. expect(header).toBe( - `100BC MSFAA SENT ${processDateFormatted}${processTimeFormatted}000001 `, + `100BC MSFAA SENT ${processDateFormatted}${processTimeFormatted}000010 `, ); // Validate records. expect(msfaaPartTimeMarried).toBe( diff --git a/sources/packages/backend/libs/integrations/src/esdc-integration/msfaa-integration/msfaa-request.processing.service.ts b/sources/packages/backend/libs/integrations/src/esdc-integration/msfaa-integration/msfaa-request.processing.service.ts index 139bfd93ed..e23ae0f603 100644 --- a/sources/packages/backend/libs/integrations/src/esdc-integration/msfaa-integration/msfaa-request.processing.service.ts +++ b/sources/packages/backend/libs/integrations/src/esdc-integration/msfaa-integration/msfaa-request.processing.service.ts @@ -12,6 +12,7 @@ import { MSFAAIntegrationService } from "./msfaa.integration.service"; import { ESDCFileHandler } from "../esdc-file-handler"; import { ConfigService } from "@sims/utilities/config"; import { MSFAANumberService } from "@sims/integrations/services"; +import { MSFAA_SEQUENCE_GAP } from "@sims/services/constants"; @Injectable() export class MSFAARequestProcessingService extends ESDCFileHandler { @@ -76,6 +77,10 @@ export class MSFAARequestProcessingService extends ESDCFileHandler { )}`, async (nextSequenceNumber: number, entityManager: EntityManager) => { try { + this.logger.log( + `Applying MSFAA sequence gap to the sequence number. Current sequence gap ${MSFAA_SEQUENCE_GAP}.`, + ); + nextSequenceNumber += MSFAA_SEQUENCE_GAP; this.logger.log("Creating MSFAA request content..."); // Create the Request content for the MSFAA file by populating the // header, footer and trailer content. diff --git a/sources/packages/backend/libs/services/src/constants/system-configurations-constants.ts b/sources/packages/backend/libs/services/src/constants/system-configurations-constants.ts index 1b894726fb..22e62e259f 100644 --- a/sources/packages/backend/libs/services/src/constants/system-configurations-constants.ts +++ b/sources/packages/backend/libs/services/src/constants/system-configurations-constants.ts @@ -63,6 +63,11 @@ export const ESDC_SIN_VALIDATION_SEQUENCE_GROUP_NAME = "ESDC_SIN_VALIDATION"; */ export const MSFAA_FULL_TIME_FILE_CODE = "PBC.EDU.MSFA.SENT."; export const MSFAA_PART_TIME_FILE_CODE = "PBC.EDU.MSFA.SENT.PT."; +/** + * Sequence gap to be added to MSFAA sequence numbers to avoid conflicts + * with the MSFAA sequence numbers generated by the legacy system. + */ +export const MSFAA_SEQUENCE_GAP = 9; /** * Report the SFAS import progress every time that certain