Retention policy
To optimize the database size, configure the retention policy for the items in the system so that the item is automatically removed from the database, once the retention period is over. Retention policy defines the retention period and the number of versions to retain for certain items. See Configure the retention policy.
You can optionally retain a number of major versions of the following items:
Retention period
The retention period is the number of days, months or years for which an item can be retained. Once the retention period is over, the item is automatically removed from the database. You can define the retention period for the following:
-
Internal users where the end date is greater than the retention period.
-
External users where the end date is greater than the retention period.
-
Audit log entries where the date logged is greater than the retention period.
-
Documents where the LastAccessedAt date is greater than the retention period.
-
CCM packs where the created date is greater than the retention period.
You can configure the retention period for a specific process. The retention period defined at the process level takes precedence over the system settings. See Configure the advanced properties for a process.
The retention period for a job is defined at the process level. SeeRetention policy system task
The Retention Policy system task handles deleting items from the database (See Manage system tasks). By default, this system task runs once a week (minimum: 1 hour). If you want to review the items marked for deletion, the system task can be scheduled to run less frequently. On the contrary, if you want to delete the items without viewing them, the system task can be scheduled to run more frequently.
For example, if the retention policy system task runs weekly (on a Sunday) and a job is to be retained for 1 week:
- Job is completed on Monday (1st)
- The earliest the job can be deleted is Monday (8th)
- Retention Policy task runs on Sunday (7th). As the job is not ready to be deleted, it will remain in the system.
- Retention Policy task next runs on the following Sunday (14th). The job will now be deleted.
Depending on the frequency of the retention policy task in relation to the retention policy of the item, something to be retained for 1 week may actually take nearly 2 weeks to be deleted.
If you set the Retention Policy for a month, the system task deletes the items regardless of number of days in a month. For example:
-
System task executes on March 29, YYYY 17:00. If this is not a leap year, all jobs (based on Process ABC) completed and terminated before February 28, YYYY 17:00 are deleted.
-
System task executes on March 29, YYYY 17:00. If this is a leap year, all jobs (based on Process ABC) completed and terminated before February 29, YYYY 17:00 are deleted.