Skip to main content
Version: Next

Archiving Profiles

Archiving in Process Studio allows moving old or closed records to secondary databases. This operation optimizes production database performance while ensuring the preservation and accessibility of historical data.

The archiving interface consists of two inseparable elements: Profiles (the business rule) and Databases (the physical destination).


1. Archive Database Management

Before creating a profile, you must declare one or more destination databases.

List of archiving profiles and databases

Declare an archive database

To add a database, use the New > Archive Database menu.

Archive database configuration dialog

  • Database Name: Logical identifier used in profiles.
  • Database Type:
    • Application: SQL database with the same structure as production. This is the recommended mode as it allows easy restoration and reporting.
    • Archive: XML mode where each document is stored as flat XML flow.
  • Connection String: SQL connection string to the destination database.
  • Remote URI: APS destination service URL (usually identical to production for local archiving).
  • Schema (Catalog): Name of the SQL catalog (Database) used.

2. Archiving Profile Configuration

A profile defines what to archive, from where and to where.

Archiving profile details

Profile parameters

  • Source & archive database: Selection of previously declared databases.
  • Linked tables: List of additional tables (e.g., detail tables, junction tables) whose data must be moved along with the main record. Enter table names separated by semicolons.
  • Filter query: SQL query determining which records are eligible for archiving.
    • The query must imperatively return a list of IDs (GUID) from the Documents table.
    • Example: SELECT id FROM Documents WHERE state = 100 AND date_modification < GETDATE() - 365 (to archive documents closed for more than one year).

3. Technical Operation

Triggering

Archiving is not instantaneous. It is performed by a Service Agent named ArchiveAgent. This agent goes through all Active profiles and executes archiving rules according to its schedule (Cron Expression).

Movement process

When a record matches a profile's criteria:

  1. The agent checks schema consistency between source and destination.
  2. The record and all its related data (fields, workflow, history, attachments) are copied to the archive database.
  3. Once the copy is confirmed, the record is permanently deleted from the production database.

Restoration

If you use an Application type database, it is possible to restore an archived document to production. The operation reverses the process: data is moved from the archive database to production, then deleted from the archive.