Work order purge

This time-triggered transaction purges all the work orders for a period greater than the retention days specified in the Work Order Purge criteria and those, which are either in the status of canceled or completed.

You can use purge codes pseudo-logic to analyze purges. If the following conditions are met, a work order is picked up for purge:

  • The last modified date of the work order should exceed the retention day period.
  • The order associated with the work order should be purged.

    If a work order of type, Provided service or Delivery service is canceled, the work order is eligible for purge even if the corresponding sales order is not purged.

  • The work order should be in a pickable status by the purge transaction.

Attributes

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

Table 1. Work order purge attributes
Attribute Value
Base Transaction ID WORK_ORDER_PURGE
Base Document Type Work Order
Base Process Type VAS
Abstract Transaction No
APIs Called None
User Exits Called YFSBeforePurgeUE

Criteria parameters

The following are the criteria parameters for this transaction:

Table 2. Work order purge criteria parameters
Parameter Description
Action Required. Triggers the transaction. If left blank, it defaults to Get, the only valid value.
PurgeCode Required. Cannot be modified. Used for internal calculations, such as determining retention days. Corresponds with the PurgeCode used in Business Rules Purge Criteria.
Live Optional. Mode in which to run. Defaults to Y.
  • Y - Default value. Moves qualifying records from the regular tables listed under Tables Purged to the corresponding history tables.
  • N - Test mode. Determines the rows that are moved to history tables without actually moving them.
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.
Node Optional. Node for which the Work Order Purge needs to be run. If not passed, then all nodes are monitored.
AgentCriteriaGroup Optional. Used to classify nodes. This value can be accepted by Sterling Order Management System Software 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 Application Platform > System Administration > Agent Criteria Groups.

ColonyID Required in a sharded deployment where a table may exist in multiple schemas. Runs the agent for the colony.
Task Queue Filter Criteria Optional. Determines the jobs to be fetched by the agent. The value assigned to this parameter is matched against the custom value stored in the FILTER_CRITERIA column of YFS_TASK_Q table, while fetching the jobs.
Note: VOID is a valid task queue filter criteria value which is used to match records with NULL value in the FILTER_CRITERIA column of YFS_TASK_Q table.

For more information, see Workload segregation for task queue agents.

Statistics tracked

The following statistics are tracked for this transaction:

Table 3. Work order purge statistics
Statistic Name Description
NumWorkOrdersPurged Number of work orders purged.

Pending job count

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

Events raised

None.

Tables purged

YFS_AUDIT

YFS_WO_APPT_USER

YFS_WORK_ORDER

YFS_WORK_ORDER_ACTIVITY

YFS_WORK_ORDER_ACTY_DTL

YFS_WORK_ORDER_HOLD_TYPE

YFS_WORK_ORDER_HOLD_TYPE_LOG

YFS_WORK_ORDER_APPT

YFS_WORK_ORDER_AUDT_DTL

YFS_WORK_ORDER_COMPONENT

YFS_WORK_ORDER_COMP_TAG

YFS_WORK_ORDER_PROD_DEL

YFS_WORK_ORDER_SERVICE_LINE

YFS_WORK_ORDER_STS_AUDIT

YFS_WORK_ORDER_TAG