Task Purge

This transaction uses the YFS_Task table to find the tasks (as well as task batches and batch locations) that can be purged and then archives them to history tables. This purge also updates records in YFS_User_Tran_Constraints to inactive if there are no open tasks for the set of references in the YFS_User_Tran_Constraints record.

You can use the pseudo-logic of purge codes to benefit in analyzing purges. A task is picked up for purge if it meets the following conditions:

Attributes

The following are the attributes for this time-triggered transaction:

Table 1. Task Purge Attributes
Attribute Value
Base Transaction ID TASKPURGE
Base Document Type General
Base Process Type TASK_EXECUTION
Abstract Transaction No
APIs Called None
User Exits Called YFSBeforePurgeUE

Criteria Parameters

The following are the criteria parameters for this transaction:

Table 2. Task Purge Criteria Parameters
Parameter Description
Action Required. Triggers the transaction. If left blank, it defaults to Get, the only valid value.
Number of Records To Buffer Optional. Number of records to retrieve and process at one time. If left blank or specified as 0 (zero), it defaults to 5000.
Live Optional. Mode in which to run. Defaults to N.
  • Y - Production mode. Deletes records from the statistics tables. Default.
  • N - Test mode. Generates a report that lists the statistics eligible for being purged.
PurgeCode Required. Cannot be modified. Used for internal calculations, such as determining retention days. Corresponds with the PurgeCode used in Business Rules Purge Criteria.
Organization Code Optional. Organization for which the Task purge needs to be run. If not passed, then all organizations are monitored.
AgentCriteriaGroup Optional. Used to classify nodes. This value can be accepted by WMS time-triggered transactions that only perform their tasks on the nodes with a matching node transactional velocity value.

Valid values are: LOW, HIGH, and any additional values defined by the Hub from Sterling Application Platform > System Administration > Agent Criteria Groups.

ColonyID Required in a multischema deployment where a table may exist in multiple schemas. Runs the agent for the colony.

Statistics Tracked

The following statistics are tracked for this transaction:

Table 3. Task Purge Statistics
Statistic Name Description
NumTasksPurged Number of tasks purged.

Pending Job Count

For this transaction the pending job count is the number of records that can be purged from the YFS_TASK table.

Events Raised

None.

Tables Purged

YFS_TASK

YFS_TASK_STATUS_AUDIT

YFS_BATCH

YFS_BATCH_LOCATION

YFS_AUTO_USER_CONSTRAINTS (When there are no open tasks for the references in the constraints)