cboddeposit-scene-reverseCash.spp
cboddeposit/reversal/cboddeposit-scene-reverseCash.spp
Download original file · Bank deposit source contents
1domain cboddeposit;23Scenario serial reverseCash(4DepositAccount,5CashSettlementAccount,6InterestIncomeAccount,7CollectionInterestIncomeAccount,8PrincipalRecoveryAccount,9AccountEligibility,10CashAccountControl,11CashDepositAgreement,12CashReversalAgreement,13DepositReversalCapacity,14DepositAccrualState,15CashReversalMetadataPlan,16DepositOperatorFacts,17CashChannel,18CashFailureRecord,19DepositPostingLine[],20CashReversalPostingLine[],21DepositPostingTotals22) {23parallel {24findDepositAccount;25findCashSettlementAccount;26findInterestIncomeAccount;27findCollectionInterestIncomeAccount;28findPrincipalRecoveryAccount;29findAccountEligibility;30findCashDepositAgreement;31findDepositAccrualState;32}33identify(DepositAccount);34identify(CashSettlementAccount);35identify(InterestIncomeAccount);36identify(CollectionInterestIncomeAccount);37identify(PrincipalRecoveryAccount);38identify(AccountEligibility);39identify(CashDepositAgreement);40identify(DepositAccrualState);41checkAccountParticipants;42checkOriginalDepositAccount;43checkOriginalSettlementAccounts;44checkXbodCashReversalPath;45checkCoreDepositReversalEligibility;46checkOriginalCashMovement;47listDepositPostings;48checkOriginalDepositPostings;49checkCashReversalCapacity;50checkCashReversalFacts;51calculateXbodCashReversalMetadata;52prepareCashReversalAgreement;53prepareCashReversalPostings;54checkDepositPostings;55transaction {56reverseCashDeposit bounds {57DepositAccount.interestBase: [0, null];58DepositAccount.overdraftInterest: [0, null];59DepositAccount.collectionInterest: [0, null];60DepositAccount.overdraftPrincipal: [0, null];61DepositAccount.overdraftExposure: [0, null];62CashSettlementAccount.balance: [null, null];63InterestIncomeAccount.balance: [0, null];64CollectionInterestIncomeAccount.balance: [0, null];65PrincipalRecoveryAccount.balance: [0, null];66};67completeCashReversal;68updateDepositAccrualState;69updateAccountEligibility;70updateCashDepositAgreement;71insertCashReversalAgreement;72attachCashReversalPostings;73insertCashReversalPostingLine;74} fail(CashReversalAgreement) {75recordReversalFailure;76if (ResultInfo.failure.recoveryStatus == "ROLLED_BACK"77|| ResultInfo.failure.recoveryStatus == "REVERSED") {78confirmNoCashMovement;79}80transaction {81insertCashFailureRecord;82}83}84}