Difference between revisions of "Auto Deletion"
Line 12: | Line 12: | ||
Delete Configuration for the Progress Task MetaClass where limit is set to 30 days | Delete Configuration for the Progress Task MetaClass where limit is set to 30 days | ||
[[File:Example_DeleteConfig.png]] | [[File:Example_DeleteConfig.png]] | ||
+ | <br /> | ||
Result: All Instances of this MetaClass which have an older CTS than 30 days will be marked for soft-deletion. | Result: All Instances of this MetaClass which have an older CTS than 30 days will be marked for soft-deletion. | ||
Revision as of 10:49, 13 May 2025
UBIK includes a configurable approach to automatic instance deletion, allowing flexibility in managing different MetaClasses. This can be done via the MetaClass DELETE_CONFIGURATION which is provided from a UBIK database and can be found under System.Main.Base.
The deletion configuration is divided into two main categories:
Soft Deletion
A soft delete limit can be set, specifying the number of days beyond which records older than the CTS (Creation Timestamp) will be marked as soft-deleted. When an instance undergoes soft deletion, its delete status is updated to deleted, making it invisible within UBIK. However, the record remains in the SQL database, where it is marked as deleted for reference purposes.
Hard Deletion
(Not Yet Functional) A hard delete limit can be configured, specifying the number of days where soft-deleted records are marked as hard-deleted and can be permanently removed from the database. While soft deletion is currently functional, hard deletion is planned for future implementation.
Example
Delete Configuration for the Progress Task MetaClass where limit is set to 30 days
Result: All Instances of this MetaClass which have an older CTS than 30 days will be marked for soft-deletion.
Deletion Workflow
The DeleteManager component needs to be initialized (via WhoBert for example) to handle the deletion process. Within the DeleteManager, this method must be executed:
ExecuteSoftDelete: This method updates the record's delete status and ensures it can no longer be accessed in UBIK Studio while retaining the record in SQL for reference. Future steps involve finalizing the DeleteManager and implementing hard deletion to complete the workflow.
delManager.ExecuteSoftDelete();