Transaction Purging
Transactional data which is older than N number of days(based on LMD(Last Modified Date)) will be purged. A TB WF(Table Workflow) called "PurgeTransactionTables" runs every day at 2A.M. and purges the transactional data. For this Workflow to run, you need to add data to ExternalReference. The data added into ExternalReference defines all the modules where the transactional data needs to be purged.
Field |
Value |
REF_TYPE |
PLT.ModelPurge or PLT.ModelAuditPurge |
EXTERNAL_VALUE |
ModelType |
LOCAL_VALUE |
Retention Period(in days) |
For example, if you need to purge the Alert table and the keep the data only for 6 months that is 180 days, then you need to add the data as:
Field |
Value |
REF_TYPE |
PLT.ModelPurge |
EXTERNAL_VALUE |
Alert |
LOCAL_VALUE |
180 |
You can add additional purge criteria, like only purge if (state= 'Cancelled' or state='Closed'). To add additional purge criteria, you can register the fragment using com.transcendsys.platform.server.purge.ModelPurgeRegistry class using ModelContextListener
com.transcendsys.platform.server.purge.ModelPurgeRegistry.register(Alert.MODEL_TYPE,
"state in ('Cancelled','Closed')"
);
Along with additional purge criteria, you can also define:
Commit chunk size using ExternalReference. Default value of commit chunk size is 1000.
Field
Value
REF_TYPE
PLT.PurgeTransactionLog
EXTERNAL_VALUE
ChunkSize
LOCAL_VALUE
chunk size value
PROC_LOG Threshold size. Default threshold log value is 5000
The PROC_LOG table is used to add log from procedure for later analysis or for error reporting. For example: "1000 rows successfully deleted from table ALERT" or "Purging of Alert table is failed because of such and such error"
Based on the set threshold value, the table is auto purged and PLT will not log any more records to the PROC_LOG. For example: "Logging Threshold reached for table ALERT. No more errors will be logged for this"
Field
Value
REF_TYPE
PLT.PurgeTransactionLog
EXTERNAL_VALUE
ProcLogThreshold
LOCAL_VALUE
threshold value, i.e. 5000
To run the PROC_LOG manually:
BEGIN
PURGE_TRANSACTIONS(
'ALERT'
,
'SYS_ALERT_ID'
, 20,
'1=1'
, 100, 1000, 5000);
END
;
Parameter Table:
Field
Value
Table Name
ALERT
Surrogate Key
SYS_ALERT_ID
Retention(in days)
180 (This means proc will delete all records from ALERT Table which are older than 180 days)
Additional Query Fragment
Instance Value ChainID
9495
ChunkSize
1000
Log Threshold value
5000
To monitor the execution of PROC_LOG table:
SELECT
*
FROM
PROC_LOG;