Tips & Tricks - Automatically Delete Data on a Scheduled Basis
In this article, you'll learn how to use a time-controlled process to flag data that is subject to a retention period or must be deleted after a defined period of time for deletion.
Carefully review any processes that automatically delete data before deploying them in a production environment.
Here you can download a ZIP file containing a sample application with a process (Intrexx version 12.0.0 or later).
Application
When you open the application, you'll see that it is designed for managing documents and contains the Boolean data field "Delete" in the "Documents" data group.
Process
The filter in the global timer "Delete after 3 years" shifts the current date back in time to define the threshold for deletion. For example, if the creation date of the respective record falls below this threshold, the record is deleted. Why is the date being moved back in time?
In this sample graph, the data record from June 1, 2016, would be deleted after 3 years if the threshold were set to today or, with a +3-year offset, to a future date. The threshold does not take effect until the current date in the example has passed January 1, 2021. For the data set from June 1, 2016, June 1, 2019 would be the threshold. Therefore, the current date must always be shifted back by the value corresponding to the date on which the deletion is to take place—for example, -3 years or -14 days.
In the data group action "Set Delete Flag," the Boolean data field from the sample application is assigned the user-defined value "Yes" (true) in the field mapping. This action applies to all records that match the filter in the global timer "For deletion after 3 years. "
In the second part of the process, the records marked for deletion can be permanently deleted. Deletion occurs with a time delay to allow for recovery in case of an emergency. In Intrexx Share, a similar process is used when a user deletes their Share profile or when the user record is deleted. The profile will be permanently deleted after a 24-hour delay. Within this time frame, the profile owner or administrator can undo the profile deletion. The check for deletion can also be based, for example, on a release date (document management, approvals) or on the end of the appointment in the calendar.




