Rules for the Purge Activity

The following rules are applied for purging:

  • Only events with the SUCCESS, ERROR, and CANCELLED statuses are considered for purge.
  • All logs for records with the SUCCESS, ERROR, and CANCELLED statuses and ERROR, INPROGRESS, and IDENTIFIED statuses or NOOPERATION sub-operation are purged.
  • If two or more records exist with the SUCCESS status having same operation in the repository and no channel or partner is involved, then the earlier of the two is purged and the later is retained. Note that records in ERROR or CANCELLED states will be purged automatically.
  • All records with the status SUCCESS, ERROR, and CANCELLED and for Sync validate and preview are deleted. If two or more records exist with the SUCCESS status having same operation in the repository with the same channel and partner combination, then the earlier of the two is purged and the later is retained. Note that records in ERROR or CANCELLED status are automatically purged.
  • All process logs that do not have any product logs associated are purged. Before deleting, any associated documents are collected and stored in the purgedDocument table. Same is true for any associated record collections.
  • All processes that do not have process logs are purged. ProcessDetail and ProcessState are automatically purged while Process is purged.
  • All process logs which do not have any associated product logs are purged.
  • All attribute logs that refer to any process log are purged.
  • All events that do not have any processes associated are purged. EventDetail is automatically purged when Event is purged.
  • All work items for which no processes exist are purged.
  • All work items which do not have process logs are deleted. WorkItemDetail is automatically purged while WorkItem is purged.
  • All associated documents and record collections are purged.
  • All associated tables (eventdetail, workitemdetail, processdetail, processstate, conversationkey, recordList, recordCollectionDetail) are purged when parent table is purged.
  • For all product logs in the ERROR state older than cutoff date, error logs are purged.
  • For all product logs earlier than the cutoff date, if the same operation is repeated after the cutoff date, the product logs are purged.
  • All record collections which do not have a process log are purged. RecordsCollectionDetail and RecordList are automatically purged when RecordCollection is purged.
  • General documents whose references do not exist in the process log are purged.
  • When records are deleted, any associated relationships (Relationship table) and principal key entries (PrincipalKey table) are also deleted.
  • Historical Data (Repository Records):
    • All records from MCT tables which do not have any product logs associated with them are deleted.
    • All records from multi-value tables and shared multi-value tables which do not have ProductKey and ModVersion in the respective repositories (MCT) tables are deleted.
    • For completed events (status as success, error, or cancelled) - error, in-progress, and redundant productlogs are deleted.
    • For in-progress events and deleted records, productlogs are not deleted.
    • If the repositories are specified in the FileWatcher, the records are deleted from only those MCT tables which do have any product logs associated with them.
    • Version V1 of any record is not deleted from the MCT.
    • All records from BCT tables which do not have a corresponding synchronization event or product log are deleted.
    • If a repository is specified, MCT and BCT records are deleted for the specified catalogs only. If no repository is specified, MCT and BCT records are deleted from all repositories across the enterprise.
    • To delete record versions, you need to specify DeleteRecordVersions as Y in File Watcher and pass the DeleteRecordVersions parameter in the workflow.
    • To delete both history and data, you need to define two activities: one for deleting history and one for deleting data. In one activity, do not include the DeleteRecordVersions parameter. Transitions must always be from delete history to delete record versions and it must be conditional.
Note: Purge does not delete product logs for inprogress events or deleted records.