Retention policy

Older and unused items must be removed from the system to prevent unnecessary database growth.

Retention policies can automatically assist in minimizing the database size. Defining the retention period and the number of versions to retain for certain items helps in cleaning up unused items, managing database growth, and optimizing performance.

Any changes you make in the retention policy are tracked in the audit log entries. On upgrading TotalAgility from an earlier version, the retention settings remain as they were previously set before the upgrade.

See Configure the retention policy.

Also, see "Retention policies" in the Kofax TotalAgility Best Practices Guide.

Version based retention

By default, the last ten versions of an item are retained and the minimum is 1 version. You can retain several major versions of forms, processes (including skins), business rules, classification groups, extraction groups, Folder types, Document/Activity variants, Data models, Packages, Test suites, and Quick Apps. For example, retain the last 15 versions of a process. You can optionally retain all versions of an item.

  • A process version cannot be deleted if there is any job based on it (live or finished).

  • The extraction group is not removed even if there are documents that reference it. Therefore, there is no need to check the existing documents.

  • When a package is deleted, the associated items remain in the system.

  • When a test suite is deleted, the associated business processes remain in the system.

  • The activity variants are versioned based on the document type variants, and are deleted along with the document variant versions.

Time based retention

By default, the time based items are set with a custom retention period. You can optionally configure the items to retain indefinitely.

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.

The time-based retention policy relies exclusively on the LastAccessedAt property to determine if a document qualifies for retention. If a document is accessed for read-only purposes, the LastAccessedAt property is not changed. This property is only updated when the document is changed. For example, if the document is changed in Capture Client, the LastAccessedAt property is updated when you complete or cancel the activity. Or, if the document is changed via the SDK call, the LastAccessedAt property is updated when the changes are persisted in 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. After document deletion, if there are no documents left within the folder hierarchy, the retention policy also deletes the root folder.

  • Folders: Where the LastAccessedAt date of the root folders is greater than the retention period (the value from document retention is used) and if the folder hierarchy does not contain any documents, and the folder hierarchy does not contain locked folders.

    • The retention policy does not delete the subfolders separately; they are deleted as part of root folder that matches the retention policy.

    • The retention policy does not delete Online Learning folders or their subfolders.

  • KCM packs: Where the created date is greater than the retention period.

You can configure the retention period for a specific process to get jobs purged by the Retention Policy system task.

See "Retain indefinitely" under History, reporting and execution.

Document based retention
By default, the document retention period is set to six months. You can optionally configure to retain the documents indefinitely.

When the retention period runs:

  • For all document types that do not have specific retention settings, the general retention behavior based on the "Last Access Time" timestamp and the period set in system settings is used.

  • For all document types with a specific setting to use "Last Access Time" or "Finished Time", the retention policy deletes the document based on the settings configured for the latest version for that specific document type.

  • If the retention policy deletes all documents from the root folder, the root folder is also deleted.

  • The root folder is deleted if it has no documents (even with empty subfolders) and its "Last Access Time" is older than the general retention period configured for the documents. The online learning folders are not deleted during retention policy execution.

Retention process execution
The Retention Policy system task handles deleting items from the database.

The retention policy always deletes all the documents found, that are ready for deletion. It splits these documents into chunks according to the default "Retention chunk size" setting. A single TotalAgility system task executes a chunk of documents. This is needed as the time limit for the single system task is five minutes. For example, if you have huge hierarchies with a lot of data, the system task may fail to delete the default 250 documents within 5 minutes. In such a case, the chunk size can be decreased. The smaller this number is, the more system tasks are created, or vice versa.

See Configure the retention policy