In what order do TotalAgility (KTA) archived jobs and documents get deleted?
The first thing to understand related to the archiving/retention and deletion of jobs and documents is that the two are not associated with one another.
- Each has their own rules for retention and deletion, so deleting a job has no bearing on the deletion of documents used in that job.
Job Retention is configured in each process map in the extended properties.
- See the screenshot for the setting in a KTA 7.7 environment (example).
- There is also a setting in the Retention Policy setup in KTA Designer System Settings for configuring the number of jobs to delete when the Archive task runs. See the screenshot for this setting.
- When a job is Completed or Terminated it will be archived.
- Then according to the Retention settings, the job will be deleted when the time passes the configured timeframe for retention.
- This time is based on the Completion/Termination date of the job.
- The oldest jobs will be deleted first according to how many jobs are configured to be deleted when the task runs.
Document Retention is configured in the Retention Policy in the System Settings in KTA Designer.
- See the screenshot for this configuration (example).
- The oldest documents are also deleted first according to the policy settings.
- However, the time value the document deletion is based on is the date/time value in the 'LastAccessedAt' column in the Document table of the TotalAgility Documents database.
- Accordingly, care must be taken to be sure that no jobs exist longer than the time specified for document retention, otherwise, live documents could possibly be deleted.
There is also a Delete activity under the 'Capture' activity section in a process map that can be used for deleting documents when they are no longer needed for a job.
- This will remove the documents from the Repository (database) with no retention.
From KTA version 7.8 and later, it is also possible to choose to delete documents based on the date those were marked as "finished" instead of the last accessed date, and also to have different retention criteria per document type.See image below to illustrate.
To mark a document as finished, please refer to the article below on the options available:
Level of Complexity