block_funds_with_bank

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_available_status = 'FUNDS_AVAILABLE'

AND

( ( funds_block_status = "PENDING_CHECK" AND funds_block_retries < retry_limit) OR (funds_block_status = 'FUNDS_BLOCK_FAILURE" AND funds_block_retries < retry_limit) )

Business logic

Pick up Eligible - disbursement_envelope

Pick up Bank Details from table - benefit_program

Get Bank Connector Instance - from Bank Connector Factory

Invoke - Block Funds API

If Success and Funds are Blocked, update the following

  1. disbursement_envelope_batch_status.funds_blocked_with_bank = FUNDS_BLOCK_SUCCESS

  2. disbursement_envelope_batch_status.funds_blocked_latest_timestamp = now()

  3. disbursement_envelope_batch_status.funds_blocked_latest_error_code = null

  4. disbursement_envelope_batch_status.funds_blocked_retries = +1

  5. disbursement_envelope_batch_status.funds_blocked_reference_number = block reference number from bank

If Success and Funds could not be blocked, update the following

  1. disbursement_envelope_batch_status.funds_blocked_with_bank = FUNDS_BLOCK_FAILURE

  2. disbursement_envelope_batch_status.funds_blocked_latest_timestamp = now()

  3. disbursement_envelope_batch_status.funds_blocked_latest_error_code = error code from bank

  4. disbursement_envelope_batch_status.funds_blocked_retries = +1

  5. disbursement_envelope_batch_status.funds_blocked_reference_number = blank

If Failure, update the following

  1. disbursement_envelope_batch_status.funds_blocked_with_bank = FUNDS_BLOCK_FAILURE

  2. disbursement_envelope_batch_status.funds_blocked_latest_timestamp = now()

  3. disbursement_envelope_batch_status.funds_blocked_latest_error_code = error code from bank

  4. disbursement_envelope_batch_status.funds_blocked_retries = +1

  5. disbursement_envelope_batch_status.funds_blocked_reference_number = blank

Last updated

Logo

Copyright © 2024 OpenG2P. This work is licensed under Creative Commons Attribution International LicenseCC-BY-4.0 unless otherwise noted.

#712: Pramod's Jun 3 changes

Change request updated