resolve

Trigger

  1. resolve API invoked by mapper_resolution_worker (Celery worker task)

  2. Worker invoked by mapper_resolution_beat_producer (Celery beat producer)

mapper_resolution_beat_producer

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'

  1. Pick up all "PENDING" records from mapper_resolution_batch_status

  2. Dispatch a Task to Resolution Worker Task with Payload = mapper_resolution_batch_id

mapper_resolution_worker

  1. Payload received - disbursement_mapper_resolution_batch_id

  2. get a list of disbursement_id, beneficiary_id from disbursement_batch_control

  3. Create a Map of <beneficiary_id, disbursement_id>

  4. Create Payload for Mapper - Resolve API - with List of Beneficiary IDs

  5. Invoke Mapper - Resolve API, send the list of beneficiary IDs, receive Financial Address

SUCCESS (from mapper resolution API invoke)

  1. Use the Map of <beneficiary_id, disbursement_id> to insert into the table disbursement_mapper_resolution_details

  2. Update table - mapper_resolution_batch_status (resolution_status = PROCESSED, resolution_attempts+ = 1)

  3. Insert resolution details into mapper_resolution_details (use the map of <beneficiary_id, disbursement_id> for this

FAILURE (from mapper resolution API invoke)

  1. Update table - mapper_resolution_batch_status (resolution_status = PENDING, latest_error_code, resolution_attempts+ = 1)

mapper_resolution_details

AttributeDescription

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

Last updated

Logo

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