How can we archive all those cases from pega which got resolved before 2 days of the create date time.How to configure a utility for this and also is there any OOTB configuration provided by pega for archival?
Pega Cloud provides an OOTB functionality for auto archival. Goto the Case Type>Settings>Archival then check Enable archival checkbox and provide the number of days to consider that are resolved earlier than. You can get more details about the process here:
https://docs-previous.pega.com/system-administration/86/case-archiving-and-purging-overview?
@SohamM95 I will check this approach once
@SohamM95 could also provide the other configuration that is via utility.Like i just know the basics that an activity needs to run but in order to do so what are the process that we need to follow.
It is no longer recommended to setup the archival process manually. Pega used to have an archival utility before which they stopped supporting. You can get more details here:
https://community.pega.com/video-library/pega-7-data-archival-utility-demo
Since in the OOTB process, Pega runs a lot of jobs and a lot of tables are utilized to maintain data integrity, it better to follow the OOTB wizard. You can still go through the process in the following link and try to replicate the logic in your own way:
https://docs-previous.pega.com/system-administration/87/case-archiving-process
@SohamM95 actually my lead wants both the approach one via OOTB configuration that you already have provided and other via a utility.
So coming to this utility I am using a job scheduler and then created an activity inside it and that activity I am calling a RD to fetch the list of Resolved cases before 2 days of the current date time but in that logic itself I am confused that how to delete the instances.
Please find the screenshot attached:
Archival Utility.docx (442 KB)
@SohamM95 thanks
@SohamM95 and @TanyaS58 , OOTB Case Archival is the correct way, if you want to set up archiving on an on-going basis. It not only deletes the case, but it’s children and associated data like history, pulse, attachments, etc.
Logically your activity should work, keep in the mind the page references. But here once you delete you wont be able to retrieve the data anytime in future. Also delete-by-handle is an expensive function, for each record its going to hit the database which is not recommended. Try to run the delete in a queue processor or while looping set pyIsRecordDeleted to true, then run a job later when there is low number of users in the system and remove those records.
@SohamM95 even if we try to delete in a queue then what will be the logic for this as calling the RD and queue processor in job scheduler’s activity then writing a separate activity for queue processor but how to delete then?
