Archive case and its associated artifacts
This article demonstrates the step-by-step configurations of how to archive old, resolved cases and their associated artifacts (such as child cases, work history and attachments).
Client use case
Client has been running Pega application for many years and the volume of resolved cases and associated data (such as history, attachments) have grown very large in size. This has been increasing the database usage and also adding an overhead to the database performance. The client requirement is to archive them to the secondary storage repository that still allows to search and view the cases but purge them from the primary database.
Configuration steps
Step 1 - Configure the archival policy for a case type.
Once saved, this creates a new data instance under the Data-Retention-Policy class.
Any additional update to the case archiving policy can be made to the Data-Retention-Policy instance directly, which will also automatically reflect the change in the case type editor.
To set the archiving policy in upper environments, we packaged the Data-Retention-Policy instance from DEV and migrated. After that, we can directly update the instance as needed in each environment (i.e. we could configure a different archiving policy per environment).
Step 2 - Set dataarchival/batchPipelineEnabled DSS to 'true'.
Step 3 - Enable the pyPegaArchiverUsingPipeline job scheduler and set the schedule.
- Save the OOTB job scheduler to your application ruleset and modify.
Validations
Validate 1 - Go to Admin Studio to verify that the job scheduler ran successfully.
Validate 2 - Go to the Log-ArchivalSummary class and run the pyInstanceList report definition to verify.
Validate 3 - Search the archived cases using the OOTB case search.
Select Archived work items only in the Include dropdown.
Open the archived case and verify the ARCHIVED status.
Validate 4 - Ask Pega Cloud administrator to verify that an archive sub-folder is created in the Pega Cloud File storage and contains the archived zip file.
Alternatively, we can run a data page (D_pxListFiles) to verify that the archived zip file is successfully created in the file storage.
- folderPath="archive/archivedclasses/XXXXX-Work-ASAP-Authorization/2021/06/03/"
Additional notes
- The archival process also archives certain artifacts within a case, such as child cases, work history, attachments, pulse replies including link attachments, declarative indexes, etc. Refer to this Pega docs article for more information.
- Pega docs on case archiving and purging - click here