Skip to main content

Data retention

By default, Grexx Platform retains a full history of case and task data, including any changes made to attribute values. The data is retained even when a case is closed or a task is completed. This ensures you have an audit trail for every case and task in each of your DTAP environments.

In some circumstances you may want to remove case and/or task data. For example, you may want to remove data in order to:

  • Comply with legal requirements.
  • Improve your application's performance by reducing the size of your database.
  • Remove test data from your environments.

You can use options in the casetype and activity settings to control when data is removed from your application. If you have more complex requirements, you can configure data retention profiles and apply them to individual attributes (or platform attributes) or to casetypes.

Delete closed cases

When configuring a casetype in your Studio, you can use the Days after which closed cases are deleted option to remove closed cases from your application. This option should only be used if you do not want to retain a record of closed cases and you do not need the option to reopen cases in future.

When you enable this option closed cases and all associated data are deleted, including:

  • All case metadata (such as the case ID, date created, and reference).
  • All attribute values (i.e. case data).
  • All tasks associated with the case.

The data is automatically deleted the specified number of days after the case has been closed. Once deleted, the case cannot be reopened. For more information about closing and reopening cases, see Close cases

Note that this option has the same effect as applying a data retention profile with the Cleanup closed cases including underlying tasks and data option. If you only want to delete a subset of closed cases (such as only closed cases created before a specific date or by a particular user), use a data retention profile with a suitable dataset to identify the cases.

Delete completed tasks

When configuring an activity in your Studio, you can use the Days after which completed tasks are deleted option to remove finished or cancelled tasks from the task history for a case.

When you configure this option, both the task data (the values entered in the form fields) and the task metadata (such as the date the task was created, due date, and associated case ID) are removed.

The data is automatically deleted the specified number of days after the task is finished or cancelled. Once deleted, the task is no longer listed in the task history for the case. This can be useful if you have generated a large number of automated tasks (such as tasks to manipulate data) and you do not need to keep a record of them.

Note that you cannot use a data retention profile to delete tasks; a data retention profile can only delete the data entered in the task's form fields.

Tip:

You can view the task history for a case from Developer Tools.

Configure data retention profiles

Data retention profiles provide some more advanced options for controlling when data is removed from your application.

You can create and update data retention profiles from your Studio: select Platform > Data retention profiles. You can then apply profiles to attributes, platform attributes and casetypes. When you apply a data retention profile to a casetype, it is automatically applied to all attributes on that casetype.

When you configure a data retention profile, the following Clean up options are available:

OptionDescription
Casedata of open casesDeletes values from attributes on open cases. The data cannot be restored.
Casedata that's overwrittenDeletes only the previous values from an attribute's history. The current attribute value remains.
Casedata of closed casesRemoves values from attributes when a case is closed. The case metadata is not removed. If the case is reopened, the attribute values are not restored.
Closed cases including underlying tasks and dataDeletes the case (including all metadata) and all underlying tasks and attribute values when a case is closed. The case cannot be restored.
Task data (from audit trails)Deletes any values that have been entered in the task's form fields. Tasks themselves remain in the "Task history" of a case, but the task data is no longer available when you inspect a task.
Only use cache, never store (to database)Stores data in the request session cache, rather than writing to the database. This is useful for attribute values that you only want to use temporarily. Note the following limitations:
1. The data cannot be used in a dataset.
2. The data does not survive multiple requests (no attribute values in the audit trail, mapping for tasks that become mandatory, async ESS etc).
3. Existing data is not immediately adjusted (but will be synchronized over time).
4. Unpredictable behavior of the reference/relatedcases/cached-calculatedfield/compilecache.

To configure a data retention profile, you must specify Data retention data age in days. This is the number of days for which data is retained before the data retention profile takes effect.

You can also use a dataset to identify the cases to which you want to apply the data retention profile. This is useful if you do not want to apply the data retention profile to all cases (or specific attributes of cases) of a particular casetype. When specifying a dataset, you must also specify the page (i.e. a single case) that will be used to calculate the dataset.

Note that data is only deleted if the data retention profile has been applied to the attribute or casetype and the case is included in the dataset. If the dataset includes cases to which the data retention profile has not been applied, that data is not deleted.