bankdeposit-scene-depositCash.spp
bankdeposit/deposit/bankdeposit-scene-depositCash.spp
Download original file · Bank deposit source contents
1domain bankdeposit;23Scenario serial depositCash(4DepositRequest,5DepositAccount,6CashSettlementAccount,7InterestIncomeAccount,8CollectionInterestIncomeAccount,9PrincipalRecoveryAccount,10AccountEligibility,11CashAccountControl,12DepositProduct,13BusinessDay,14CashChannel,15CashAuthorizationPolicy,16AuthorizationEvidence,17AdmissionDecision,18DepositFeeParty,19DepositFeeContext,20DepositFeeRate,21DepositFeePlan,22DepositPlan,23DepositDetailPolicy,24CashDepositAgreement,25DepositBankProfile,26DepositOperatorFacts,27DepositNotices,28CashFailureRecord,29DepositAccounting,30DepositPostingLine[],31DepositPostingTotals,32DepositAccrualState,33DepositInterestPolicy,34InterestCalendar,35AgreementTerm,36AgreementPolicy,37AgreementBand[],38DepositAccrualPlan39) {40checkCashInput;41checkDetailPolicy;42parallel {43findDepositAccount;44findAccountEligibility;45findCashSettlementAccount;46findInterestIncomeAccount;47findCollectionInterestIncomeAccount;48findPrincipalRecoveryAccount;49findDepositAccrualState;50}51identify(depositAccount);52identify(accountEligibility);53identify(cashSettlementAccount);54identify(interestIncomeAccount);55identify(collectionInterestIncomeAccount);56identify(principalRecoveryAccount);57identify(depositAccrualState);58checkAccountParticipants;59describeAccountBalance;60checkCashControl;61checkDepositEligibility;62checkDepositOperatorBinding;63checkDepositBranchRange;64assessDepositDocumentNotices;65assessCashAdmission;66mergeDepositNotices;67checkCashAuthorization;68checkFeeAccount;69classifyDepositFee;70if (depositFeePlan.applicable) {71prepareFeeLookup;72findDepositFeeRate;73}74checkRequiredFeeIdentified;75checkFeeRate;76calculateDepositFee;77checkKernelInput;78calculateDepositPlan;79checkPlan;80classifyDepositAccounting;81checkDepositAccounting;82checkPostingRules;83calculateDepositPostings;84checkDepositPostings;85checkAccrualPolicy;86checkAccrualDates;87calculateDepositAccrual;88prepareDepositAgreement;89preserveDepositPostingEvidence;90transaction {91settleCashDeposit bounds {92cashSettlementAccount.balance: [null, null];93depositAccount.interestBase: [0, null];94depositAccount.overdraftInterest: [null, 0];95depositAccount.collectionInterest: [null, 0];96depositAccount.overdraftPrincipal: [null, 0];97};98deriveOverdraftExposure;99accumulateAccrual;100updateDepositAccrualState;101completeDepositMetadata;102updateAccountEligibility;103insertCashDepositAgreement;104attachDepositPostings;105insertDepositPostingLine;106} fail {107recordDepositFailure;108if (ResultInfo.failure.recoveryStatus == "ROLLED_BACK"109|| ResultInfo.failure.recoveryStatus == "REVERSED") {110confirmNoCashMovement;111}112transaction {113insertCashFailureRecord;114}115}116}