resolve
Last updated
Last updated
Copyright © 2024 OpenG2P. This work is licensed under Creative Commons Attribution International LicenseCC-BY-4.0 unless otherwise noted.
resolve API invoked by mapper_resolution_worker (Celery worker task)
Worker invoked by mapper_resolution_beat_producer (Celery beat producer)
Pick up all "PENDING" records from mapper_resolution_batch_status
Dispatch a Task to Resolution Worker Task with Payload = mapper_resolution_batch_id
Payload received - disbursement_mapper_resolution_batch_id
get a list of disbursement_id, beneficiary_id from disbursement_batch_control
Create a Map of <beneficiary_id, disbursement_id>
Create Payload for Mapper - Resolve API - with List of Beneficiary IDs
Invoke Mapper - Resolve API, send the list of beneficiary IDs, receive Financial Address
SUCCESS (from mapper resolution API invoke)
Use the Map of <beneficiary_id, disbursement_id> to insert into the table disbursement_mapper_resolution_details
Update table - mapper_resolution_batch_status (resolution_status = PROCESSED, resolution_attempts+ = 1)
Insert resolution details into mapper_resolution_details (use the map of <beneficiary_id, disbursement_id> for this
FAILURE (from mapper resolution API invoke)
Update table - mapper_resolution_batch_status (resolution_status = PENDING, latest_error_code, resolution_attempts+ = 1)
Attribute | Description |
---|---|
frequency
hourly (specified by configuration yml)
attempts
yes. subject to a configurable limit specified by configuration yml
driving table
mapper_resolution_batch_status
eligible records
resolution_status = 'PENDING'
mapper_resolution_batch_id
Non Unique Index
disbursement_id
Unique Index
beneficiary_id
Non Unique Index
mapper_resolved_fa
mapper_resolved_phone_number
mapper_resolved_email_address
mapper_resolved_name