ЕСОЗ - публічна документація

RC_UNZR info synchronization (DMS)

Purpose

This job is designed for getting personal information from the EIS MVS registry by UNZR.

Key points

  1. Job executes by request for a single unzr at once.

  2. Job doesn’t make any corrections in person’s unzr before sending it to the service.

  3. It is assumed that unzr is unique within EIS MVS register. So if such record does not exists in unzr_info table (MIMIR db) it will be created, if exists - updated.

  4. The data received from the job is saved, but not linked to the Person.

  5. The job has no influence on person’s verification and related to isolated process.

Data flow

Job is triggered for a single UNZR by RC_(GraphQL) Sync UNZR info (DMS) mutation. It starts an oban job, which in turn executes a call to the unzr service and awaits a response from it. Result and status of the job is stored in the RC_MVS integration data model (DMS) | unzr_info table, which can always be retrieved by RC_(GraphQL) Get UNZR info (DMS) query.

UML

 

Get UNZR info job v2.drawio.png

 

Step description

Step 1. Create or update unzr_info

Get record from mimir.unzr_data table by unzr:

  • if not found - create a record.

  • id - generate uuid

  • unzr - UNZR from the request

  • job_status - status of the new job that is equal to “pending“ according to JOB_PROCESSING_STATUS dictionary

  • info - is null for the new record

  • synced_at - is null, the date and time when “info“ was successfully synced with register

  • inserted_by - employee’s user who triggered the job

  • updated_by - employee’s user who triggered the job

  • inserted_at - current date and time

  • updated_at - current date and time

  • if found - updated the record.

  • job_status - status of the new job that is equal to “pending“ according to JOB_PROCESSING_STATUS dictionary

  • updated_by - employee’s user who called the “unzr” api from admin panel

  • updated_at - current date and time

Step 2. Call unzr service

Get information related to UNZR in the EIS MVS register - invoke RPC call with third-party “unzr“ service RC_MVS Trembita methods_EN (DMS warranty) | unzr using the following request params:

  • unzr - unzr from input

Step 3. Update unzr_info

If information was found at Step 2 and job was successfully completed by obtaining filled info from the register, then update unzr_info record with following data:

  • job_status = processed, according to JOB_PROCESSING_STATUS dictionary

  • info = info, received from response of the “unzr“ service

  • synced_at = current date and time

  • updated_at = current date and time

  • updated_by = user, related to an employee triggered the job

Step 4. Update unzr_info

If information was not found at Step 2 and job was successfully completed , but obtained info from the register was empty, then update unzr_info record with following data:

  • job_status = processed, according to JOB_PROCESSING_STATUS dictionary

  • info = null, received empty info in response from the “unzr“ service

  • synced_at = current date and time

  • updated_at = current date and time

  • updated_by = user, related to an employee triggered the job

Step 5. Update unzr_info

If error received at Step 2 from the “unzr” service or job was failed by another reasons, then update unzr_info record with following data:

  • job_status = failed, according to JOB_PROCESSING_STATUS dictionary

  • updated_at = current date and time

  • updated_by = user, related to an employee triggered the job

ЕСОЗ - публічна документація