Tips & tricks - Automatically delete data on a scheduled basis

In this workshop, you will discover how you can use a time-controlled process to mark data for deletion that is subject to a retention period or needs to be deleted after a defined time period.

Processes that automatically delete data should be checked carefully before they are implemented into a live system.

Here you can download a ZIP file with a sample application with process (from Intrexx version 12.0.0).

Application

When you open the application, you will see that it is intended for managing documents and contains the Boolean data field "Delete" in the "Documents" data group.

Process

The filter in the global timer "For deletion after 3 years" moves the current date into the past in order to define the threshold for deletion. If, for example, the creation date of the respective data record falls below this threshold, the data record is deleted. Why is the date moved into the past?

In this example graphic, the data record from 01.06.2016 would be deleted when the threshold is today or lies +3 years in the future (based on an automatic deletion after 3 years). The threshold becomes active when the current date exceeds 01.01.2021 in our example. The threshold for the data record from 01.06.2016 would be 01.06.2019. Therefore the current data must always be moved into the past (e.g. -3 years) so that the deletion is performed correctly.

In the data group action "Set deletion indicator", the Boolean data field from the example application is assigned the user-defined value "Yes" (true) in the field assignment. This action is performed for all data records to which the filter in the global timer "For deletion after 3 years" applies.

The data records marked for deletion can be deleted permanently in the next step of the process. The deletion is performed with a timed offset so that the data record can be restored in an emergency. In Intrexx Share, a similar procedure is used when a user deletes their share profile or the user data record is deleted. After a 24 hour delay, the profile is deleted permanently. Within these 24 hours, the profile deletion can be undone either by the profile owner or the administrator. The deletion validation can, for example, also be applied based on a release date (document management, approvals) or on the end of an appointment in the calendar.