Skip to content

Conversation

@somasorosdpc
Copy link
Contributor

@somasorosdpc somasorosdpc commented Feb 10, 2026

COB runs can fail for Progressive Loans if there are no entry for Saved Progressive Model in DB.

  • If model is missing, use reprocess all transactions.
  • If model is missing on COB Accrual Processing in LoanAccrualsProcessingServiceImpl

@somasorosdpc somasorosdpc force-pushed the FINERACT-2421/fix-missing-progressive-model branch 5 times, most recently from bb818b3 to 69fc174 Compare February 11, 2026 13:40
@adamsaghy adamsaghy marked this pull request as ready for review February 12, 2026 14:26
@somasorosdpc somasorosdpc force-pushed the FINERACT-2421/fix-missing-progressive-model branch 2 times, most recently from 6c6a32d to 1167af4 Compare February 12, 2026 15:22
case NONE -> throw new IllegalStateException("Unexpected PreClosureInterestCalculationStrategy: NONE");
};

// TODO: usually used for read operations, if model is incorrect (changed state), we need to wait till something
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not a TODO item

extends JpaSpecificationExecutor<ProgressiveLoanModel>, JpaRepository<ProgressiveLoanModel, Long> {

Optional<ProgressiveLoanModel> findOneByLoanId(Long loanId);
Optional<ProgressiveLoanModel> findOneByLoanId(Long loan_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please undo


@Override
public Long removeByLoanId(Long loanId) {
return loanModelRepository.removeByLoan_Id(loanId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid using snake case method names


private ChangedTransactionDetail processLatestTransactionProgressiveInterestRecalculation(
AdvancedPaymentScheduleTransactionProcessor advancedProcessor, Loan loan, LoanTransaction loanTransaction) {
// TODO: Lets recalculate the model if it is incorrect, it is used by WRITE operations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this.


TransactionCtx transactionCtx;
if (transactionProcessor instanceof AdvancedPaymentScheduleTransactionProcessor) {
// Fixed: prevented to use it without a model. shouldReprocessLoan used for it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this

@Override
public void updateModel(Loan loan) {
// recalculate the model if it is incorrect, it is used by WRITE operations
// Fixed on caller side
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this.

@somasorosdpc somasorosdpc force-pushed the FINERACT-2421/fix-missing-progressive-model branch from 1167af4 to a56c07a Compare February 12, 2026 15:43
… Runs

* COB Periodic Accruals Create model if model is not saved before calculate new accrual
* Force Reprocess All Transactions in case there is no Saved Model
* Create Internal API Endpoint and LoanStepDef to remove  ProgressiveLoanInterestScheduleModel by loanId
@somasorosdpc somasorosdpc force-pushed the FINERACT-2421/fix-missing-progressive-model branch from a56c07a to 4a102e0 Compare February 12, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants