Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Data flow
Scheduller starts according to UNZR_PERSON_SYNCHRONIZATION_SCHEDULE cron parameter. It creates oban job that selects UNZR_PERSONS_SYNCHRONIZATION_BATCH_SIZE Persons that match to some filter parameters. For each the job receives Person data on input and returns the result of reconciliation with the MVS registry to output (details in “Step description” section below):
if UNZR is found - set verification status to VERIFIED along with verification reason AUTO. The unzr_data is saved and linked to the Person.
if UNZR is not found for the person - set verification status to NOT_VERIFIED and verification reason is set to AUTO. The unzr_data is not saved and not linked to the Person;
if person has no UNZR - set verification status to VERIFICATION_NOT_NEEDED and verification reason to
INITIALAUTO_DATA_ABSENT. Sync isn't performed, unzr_data is not saved and not linked to the Person;if UNZR is incorrect - set verification status to NOT_VERIFIED and verification reason to
INITIALAUTO_INCORRECT_DATA. In this case UNZR value will be cleared, sync isn't performed.if technical error received - the verification status and reason doesn’t change. The unzr_data is not saved, Person is not updated;
...
View file | ||
---|---|---|
|
Step description
Step 1.1 Update Person
Invoke the Step If person_verifications.unzr_verification_status still IN_REVIEW
...
If a person has no UNZR (persons.unzr is empty), then update person_verifications record by person_id:
unzr_data_id = null
unzr_data_status = null
unzr_synced_at = null
unzr_verification_status = VERIFICATION_NOT_NEEDED
unzr_verification_reason =
INITIALAUTO_DATA_ABSENTunzr_unverified_at = null
If the person has UNZR, but it does not match a regex
^[0-9]{8}-[0-9]{5}$
, then:Update person_verifications record by person_id:
unzr_data_id = null
unzr_data_status = null
unzr_synced_at = null
unzr_verification_status = NOT_VERIFIED
unzr_verification_reason =
INITIALAUTO_INCORRECT_DATAunzr_unverified_at = current datetime
Update persons record by id:
unzr = null