-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIMS to SFAS Bridge File - Initial Setup (Students only) #3738
Comments
# SIMS To SFAS Bridge DB Migrations and Scheduler Setup ## DB Migration - DB Migration to create new table `sims.sfas_bridge_logs` (Table name modified to plural and the column for file name little different in comparison with technical AC). - The table `sims.sfas_bridge_logs` has only creation respective audit columns as it is never expected to receive update. - DB migration to add the new scheduler `sims-to-sfas-integration`. It is scheduled to run at `12:00 AM 4:00 AM 8:00 AM 12:00 PM 12:00 AM 4:00 PM 8:00 AM` with cron expression `0 0,4,8,12,16,20 * * *` - Added Enum and other dependencies to enable the scheduler. ## Rollback Evidence ![image](https://github.com/user-attachments/assets/22100671-009e-4039-9e8a-a22c507d2347) ![image](https://github.com/user-attachments/assets/78fe1f23-fb45-491c-b5af-3c439c6f0b05)
@dheepak-aot Based on our conversation and the confirmation I have received from SFAS team, I have added an AC:
|
@dheepak-aot Based on our conversation, I have added an AC to clarify the expectation for when we have 0 records to send when it's scheduled. The expectation is that we WONT send a file if there are no records to send. (Confirmed with HJ confirmed via email 2024-10-22 that this is fine. |
# SIMS TO SFAS - INTEGRATION IMPLEMENTATION FOR STUDENT DATA RECORDS ## ENV - [x] Added a new env variable `SFAS_SEND_FOLDER`. Declared it as github env, not as secret. ## PROCESS - [x] File generated with following name structure `SIMS-TO-SFAS-YYYYMMDD-HHMMSS.TXT` ![image](https://github.com/user-attachments/assets/39411500-a070-4bf4-a0dc-d312a3e450e0) - [x] Student data is retrieved to build the file for all students who has one or more of the following updates since last run date. - Student or User data - Sin validation data - Cas supplier data - Overawards data - [x] Students with at least one submitted application are considered to extract the data. As submitted applications can be cancelled and also the Draft applications can be cancelled, application status NOT Draft could be tricky. So used the condition of application with current assessment NOT NULL to identify a submitted application. - [x] When one or more students with updates are present, then a file is produced and sent to SFAS SFTP location. **Summary:** ![image](https://github.com/user-attachments/assets/11b9ff5d-3dbf-44ca-9989-c7899ba104c9) **Process Logs:** ![image](https://github.com/user-attachments/assets/7ec7ef8a-0ddf-41e9-a767-5003637864c3) - [x] When no students with updates are present, then no file is produced. **Summary:** ![image](https://github.com/user-attachments/assets/4a43e594-a262-4841-ae4e-5dbd7d46f75d) **Process Logs:** ![image](https://github.com/user-attachments/assets/326c2561-e17d-484c-a3cc-c61a608fe73c) ## TECHNICAL CONTEXT - STEPS involved in creation of the bridge data file ``` STEP 1 [Implemented]: Get the reference date of last bridge file sent. If there is no bridge file sent, it is null. STEP 2 [Implemented]: Get all the student ids of students who has one or more student data related change since last bridge file date. STEP 3 [TODO]: Get all the student ids and application details of students who has one or more application data related change since last bridge file date. STEP 4 [TODO]: Get all the student ids and restriction details of students who has one or more restriction data related change since last bridge file date. STEP 5 [Partially Implemented]: Consolidate all the studentIds produced in STEPS 2,3 and 4. STEP 6 [Partially Implemented]: Get student details of students who has one or more student data related change using consolidated studentIds. STEP 7 [Implemented]: Build header, footer and student records for file lines. STEP 8 [TODO]: Build application records and restriction records for file lines. STEP 9[Implemented]: Upload the file to SFTP and create bridge file log. ``` - For future implementations and areas, search for `TODO: SIMS to SFAS` in the code.
# SIMS TO SFAS E2E TESTS ## TEST SCENARIOS - [x] Created a test to validate the file generation when there is a student data update, between the most recent bridge file date and current bridge execution date. - [x] Created a test to validate no generation of bridge file, when there is an update on student data but the student does not have any submitted application. ![image](https://github.com/user-attachments/assets/3f7fa224-b7c4-4f37-a1d9-9407987e4840) ## New Library for mocking the current date retuned by the code - To mock the current date(`new Date()`) returned, a new library [mockdate](https://www.npmjs.com/package/mockdate) has been added.
To Support QA: Records ValidationHeader Length: 61 Student Data Record Length: 164 Footer Length: 12 Index position Student Data:Record Type: 1-4 Student ID: 4-14 Student Given Name: 14-29 Student Last Name: 29-54 Student Birth Date: 54-62 Student SIN: 62-71 Student PD Status: 71-72 PD Effective Date: 72-80 Student PPD Status: 80-81 PPD Effective Date: 81-89 --- Blank Fields ---- FT MSFAA Number: 89-99 FT MSFAA Signed Date: 99-107 PT MSFAA Number: 107-117 PT MSFAA Signed Date: 117-125 ----- end Blank fields --- CAS Supplier Number: 125-132 CAS Supplier Site Number: 132-135 FT CSL Overaward: 135-145 FT BCSL Overaward: 145-155 ---Blank Field----- |
Story Description
As an SFAS system administrator, I want to receive data from SIMS to correlate with the data in SFAS. This requires creating a bridge file to communicate SIMS data to SFAS so that SFAS can enforce rules and limits in its own system.
This ticket's goal is to enable the boilerplate around schedules and initial file creation exporting only the students.
Acceptance Criteria
File Specification
Records to Include
Business Context
Full File Specifications and Ongoing Comments https://bcgov.sharepoint.com/:w:/r/teams/00371/Shared%20Documents/General/b)%20Development%20and%20Testing/SIMS%20Business%20Requirements/Under%20Development%20Requirements/SIMS%20to%20SFAS%20Data%20Bridge.docx?d=w588bf9022725400f998ea8cce1c27448&csf=1&web=1&e=JvpAU1
Technical
libs\integrations\src\sfas-integration
.sfas-integration.processing.service.ts
), create a new processing service dedicated to generating the file.sims.sfas_bridge_log
The text was updated successfully, but these errors were encountered: