Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…2817) Changed the processes for workers `VerifyAssessmentCalculationOrder` and `WorkflowWrapUp` to allow: - The SUM of awards for past applications. - Checking future impacted applications to create reassessments. ### Changes in worker `VerifyAssessmentCalculationOrder` - The output DTO now allows adding dynamic properties besides the required `isReadyForCalculation`. - A new dynamic property will be created for every grant award present in previous applications for the same student and same program year. The grants totals will be grouped per offering intensity, and they will be displayed following the examples below. - programYearTotalFullTimeCSGD - programYearTotalFullTimeCSGP - programYearTotalFullTimeSBSD - programYearTotalFullTimeBCAG - programYearTotalFullTimeSBSD - programYearTotalPartTimeCSGD - programYearTotalPartTimeCSGP - programYearTotalPartTimeSBSD - programYearTotalPartTimeBCAG - programYearTotalPartTimeSBSD - The totals are returned by a new method `getProgramYearPreviousAwardsTotals` that uses the same centralized logic to determine the past applications (`getSequencedApplications`) introduced in the previous PR #2732 - Having the awards segregated per intensity would allow the workflow to decide which ones must be combined. For instance, the values for CSGP and SBSD will be added together later to process the assessment calculations while grants like CSPT, CSGD, and BCAG will have their values added per offering intensity. In this way, the worker's responsibility is to provide the granular total while the workflow responsibility is to decide how to SUM them. - The method `getSequencedApplications` was changed to optionally receive a "reference date" that is needed to determine the past applications when the application being verified was never calculated (doesn't have an assessment date) needed to place this application into the chronology order. #### E2E Tests - Should sum the grants from two past applications with different offering intensities when the applications are for the same student and program year. - Should consider the grant from only one disbursement from a valid past application when the past application has two disbursements and the second COE is declined. - Should not return any program year total awards when there are no applications in the past for the same student and program year. ### Changes in worker `WorkflowWrapUp` - Added the previously created method `assessImpactedApplicationReassessmentNeeded` to the `WorkflowWrapUp` worker to ensure that a future application (if any) will be reassessed. - The method `updateAssessmentStatusAndSaveWorkflowData` is executed in a transaction with `assessImpactedApplicationReassessmentNeeded` to ensure that they will rollback together in case an error happen, which would allow the worker to be retried. - The method `updateAssessmentStatusAndSaveWorkflowData` is now used to ensure the worker idempotency. #### E2E Tests - Should find the next impacted assessment and create a reassessment when there is an application for the same student and program year in the future. - Should return job completed when the workflow data is already set. ### E2E Tests Global - Created the method `getOutputVariables` to allow the assertion of output variables sent to Camunda. - Created the method `getResultType` to replace the previous way of checking the job result status.
- Loading branch information