create_disbursements
Triggered by Batch job
driver condition
frequency | hourly (specified by configuration yml) |
retries | yes. subject to a configurable limit specified by configuration yml |
driving table | disbursement_envelope_batch_status |
eligible envelopes | disbursement_schedule_date <= today AND cancellation_status = 'NOT_CANCELLED' AND number_of_disbursements = number_of_disbursements_received AND funds_blocked_status = 'FUNDS_BLOCK_SUCCESS' |
Business logic
Pick up eligible disbursement_envelopes
For each eligible_envelope, pick up disbursements, where shipment_to_bank_status = 'PENDING'
In one batch, maximum number of disbursements is subject to configuration value specified - maximum_disbursements_in_single_api
get instance of bank connector using bank connector factory
invoke the disburse API and send the disbursement payload
on success response, update disbursement_batch_status.shipment_to_bank_status = 'PROCESSED'
Last updated