ЕСОЗ - публічна документація
RC_UNZR info synchronization (DMS)
- 1 Purpose
- 2 Key points
- 3 Data flow
- 3.1 UML
- 3.2 Step description
Purpose
This job is designed for getting personal information from the EIS MVS registry by UNZR.
Key points
Job executes by request for a single unzr at once.
Job doesn’t make any corrections in person’s unzr before sending it to the service.
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.
The data received from the job is saved, but not linked to the Person.
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
Step description
Step 1. Create or update unzr_info
Get record from mimir.unzr_data table by unzr:
if not found - create a record.
if found - updated the record.
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
ЕСОЗ - публічна документація