Skip to content
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

CAS Integration 4A - Supplier Maintenance Errors #3258

Closed
19 tasks done
HRAGANBC opened this issue May 9, 2024 · 3 comments
Closed
19 tasks done

CAS Integration 4A - Supplier Maintenance Errors #3258

HRAGANBC opened this issue May 9, 2024 · 3 comments

Comments

@HRAGANBC
Copy link
Collaborator

HRAGANBC commented May 9, 2024

User Story

As a Ministry user, I need to know if SIMS could not successfully verify and assign a supplier number and site, this could be due to an identified manual intervention requirement or due to an error with the request to CAS. This needs to provide me context in which this occurred so I know if I can retry or resolve it. Retrying involves asking SIMS to attempt the action again with the current information (eventually). Resolving means that I have reviewed CAS and SIMS, making any necessary updates in either system and SIMS will not need to attempt the action again. This information will be used to create UI or populate a report.

Acceptance Criteria

  • Update the CAS table column order, add new columns, update column names (ignore differences in the status label or formatting):

image.png

  • User should see the response message for any CAS error or manual intervention pre-validation error records.

  • If Manual Intervention is required the associated Error message based on the situation:

    • "Address outside of Canada cannot be processed."
    • "Given name required for creation."
  • For error responses from CAS set the status to "Manual Intervention" include the Error Message received from CAS (it comes in as a string, multiple are split by bars. See CAS 2A)

  • Any of these errors should make the Supplier isValid = false and in cases where Supplier found but create Site failed, save any valid Supplier info

  • Retry button means creating a new pending CAS request and is only available to the business-administrator group (can be linked to the existing cas-edit-supplier role)

    • Student data may be updated (Given Name, Last Name, SIN, Address Line 1, City, etc) and we need to perform the same attempt again with the most current student info.
    • On retry provide success toast pop message "A new CAS pending verification record was created. A new attempt will be made to get information from CAS."
  • Include all error responses, including those from GetSupplier requests.

Business Context

  • Identification of almost certain errors are noted as Manual Interventions. These will not be able to be resolved through automatic SIMS-CAS communication and will require a user to review CAS and update CAS and/or SIMS as a result.
  • Some errors are due to technical issues and not as a result of an error response from CAS. These will be automatically retried right away.
  • Errors that we receive a response from CAS about may need to be resolved manually (see Manual Interventions above.) Some error responses will require that SIMS retries the same attempt with potentially new student data (name, address, sin).
  • List of Errors SWS Feb 2024.pdf

Technical

  • Please see the reference for the Vuetify with the row expander: https://v2.vuetifyjs.com/en/components/data-tables/#expandable-rows
  • Create new columns on DB to save the list of errors (array of string), suggested column name errors.
  • For CAS errors, split the result by "|" and save as list.
  • Retry operation should create a record following the same creation when a new student account is created.
  • Disable the "Retry" button if there is already a pending record.
  • Ensure API will block the creation of a pending record when one is already in place.
  • PRs
    • DB migrations, saving reasons from pre-validations and handling the CAS bad requests.
    • UI changes and retry.
  • E2E Tests for queue-consumers and the new API.
@HRAGANBC HRAGANBC changed the title CAS Integration - Handle Supplier Maintenance Errors CAS Integration 6 - Handle Supplier Maintenance Errors May 9, 2024
@HRAGANBC HRAGANBC changed the title CAS Integration 6 - Handle Supplier Maintenance Errors CAS Integration 4 - Handle Supplier Maintenance Errors May 9, 2024
@HRAGANBC HRAGANBC changed the title CAS Integration 4 - Handle Supplier Maintenance Errors CAS Integration 4 - Handle Supplier Maintenance Errors (Student Profile and Aggregate Inventory) May 9, 2024
@michesmith michesmith added Student Student Features Integration and removed Student Student Features labels May 9, 2024
@michesmith michesmith added the Business Items under Business Consideration label Jun 4, 2024
@CarlyCotton
Copy link
Collaborator

Need to incorporate Name and SIN updates on SIMS into error handling to resolve manually with CAS.

@CarlyCotton CarlyCotton changed the title CAS Integration 4 - Handle Supplier Maintenance Errors (Student Profile and Aggregate Inventory) CAS Integration 4A - Supplier Maintenance Errors Oct 22, 2024
@CarlyCotton CarlyCotton self-assigned this Oct 22, 2024
@CarlyCotton CarlyCotton added Dev & Architecture Development and Architecture and removed Business Items under Business Consideration labels Nov 7, 2024
@andrewsignori-aot
Copy link
Collaborator

@CarlyCotton we will disable the "Retry" if there is already a pending record created.

@CarlyCotton
Copy link
Collaborator

@andrewsignori-aot That works. Can we be specific and say "Pending supplier verification" status?

@andrewsignori-aot andrewsignori-aot removed the Dev & Architecture Development and Architecture label Nov 7, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 5, 2024
1. Captured the prevalidation errors when it happens during the CAS
calls and saved it in the cas_suppliers table with supplierStatus -
ManualIntervention.

> Given name required for creation.
> Address outside of Canada cannot be processed.

2. Captured the know errors during the CAS service calls and saved it in
the cas_suppliers table with supplierStatus - ManualIntervention.
The know errors are split by "|" and saved as list in the error column
in cas_suppliers table.

> createSupplierAndSite
> createSiteForExistingSupplier
> getSupplierInfoFromCAS

3. E2E test cases were created for the error capture for the above know
error and existing E2E is changed to capture the prevalidation error.

---------

Co-authored-by: guru-aot <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Dec 9, 2024
CAS errors are shown in the row expander of the CAS Supplier Information
table.

![image](https://github.com/user-attachments/assets/2679c99c-7fe0-4b35-adcb-fb715f3278fc)

E2E test case is created and existing is updated for the changed API.

Failure in the sonarcloud is due to code duplication but I am not able
to find the duplication in the code submitted in this PR.

---------

Co-authored-by: guru-aot <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Dec 11, 2024
Retry button is disabled, if the student already has a supplier in
Pending supplier verification.

![image](https://github.com/user-attachments/assets/9d3d0bfe-87ce-469a-8a20-5af1546ceaac)

Retry enabled when student does not have a Pending supplier
verification.

![image](https://github.com/user-attachments/assets/6624430f-bcdb-4ada-8550-9b32d6156108)

Retry will create a new record in cas_suppliers table with status as
PendingSupplierVerification.

---------

Co-authored-by: guru-aot <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Dec 11, 2024
Trim function was called after the split, it should have been called
before it.

![image](https://github.com/user-attachments/assets/c3886867-cb91-4525-97a1-818eea9cf36c)

---------

Co-authored-by: guru-aot <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Dec 12, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 12, 2024
The create student action happening when Ministry user trying to approve
a student. The SIN validation table is not inserted. This causes the
search to fail as it uses the below query to fetch.


![image](https://github.com/user-attachments/assets/d0138e14-e475-478e-9435-cbf944db3ebf)

This is a bug created during the cas supplier pending verification logic
centralization that happened in the #3258 ticket.

Co-authored-by: guru-aot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants