Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 2.6 KB

File metadata and controls

52 lines (35 loc) · 2.6 KB
layout
title description tableOfContents outline pagination
visible
true
visible
visible
true
visible
true
visible
true

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

frequencyhourly (specified by configuration yml)
attemptsyes. subject to a configurable limit specified by configuration yml
driving tablemapper_resolution_batch_status
eligible recordsresolution_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_idNon Unique Index
disbursement_idUnique Index
beneficiary_idNon Unique Index
mapper_resolved_fa
mapper_resolved_phone_number
mapper_resolved_email_address
mapper_resolved_name