ЕСОЗ - публічна документація
[AUTO] Terminate Person requests
Configuration
Process configuration
Parameter | Description | Value |
---|---|---|
PERSON_REQUEST_AUTOTERMINATION_SCHEDULE | (Cron Format) How often to perform termination | `* * * * *` |
PERSON_REQUEST_EXPIRATION | (Days, integer > 0) Person request lifetime | prm.global_parameters.person_request_expiration |
PEROSN_REQUEST_AUTOTCLEANING_SCHEDULE | (Cron Format) How often to perform termination | `* * * * *` |
PERSON_REQUEST_DATA_CLEANING | (Days, integer > 0) Person request data lifetime | prm.global_parameters.person_request_autocleaning |
Expiration person request
Search candidates
If person_request.inserted_at < ( now() - PERSON_REQUEST_EXPIRATION) and status = 'NEW' or 'APPROVED`
Update person request
Delete personal data from person requests: person_data, authentication_method_current,printout_form, documents, tax_id, first_name, last_name, birth_date, person_documents.
Update status for all records to EXPIRED:
status = 'EXPIRED'
updated_at = now()
updated_by = SYSTEM_USER
On get api/person_requests/{{person_request_id}} if person_requst.statsu - expired
, then error - not_found
Autocleaning person request
If person_request.inserted_at < ( now() - PERSON_REQUEST_DATA_CLEANING) and data is not NULL:
Delete personal data from person requests: person_data, authentication_method_current, printout_form, documents, tax_id, first_name, last_name, birth_date, person_documents.
update person_requests
updated_by = SYSTEM_USER
updated_at = timestamp
ЕСОЗ - публічна документація