Capacity purge

The capacity purge deletes capacity data from the system, and thus reduces the load on frequently accessed tables.

Any enterprise that uses the console must schedule purge transactions.

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

  • All resource pool standard capacity periods with effective to date earlier than or equal to the current date minus the purge criterion’s retention days.
  • All resource pool overridden capacity with the capacity date earlier than or equal to the current date minus the purge criterion’s retention days.
  • All resource pool capacity consumption with consumption date less than or equal to the current date minus the purge criterion’s retention days.
  • All resource pool capacity consumption details where the appointment date is earlier than the system date minus the purge criterion’s retention days or ManualReservationPurgeLeadDays for manually created reservations.
  • All resource pool capacity consumption details where the expiration date is passed and the reservation ID is not blank.

Attributes

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

Table 1. Capacity purge attributes
Attribute Value
Base Transaction ID CAPACITYPRG
Base Document Type General
Base Process Type General
Abstract Transaction No
APIs Called None
User Exits Called YFSBeforePurgeUE

Criteria parameters

The following are the criteria parameters for this transaction:

Table 2. Capacity 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. Valid values are:
  • Y, which is the default value. Moves qualifying records from the regular tables that are listed under Tables Purged to the corresponding history tables.
  • N - Test mode. Determines the rows that are moved to history tables without moving them.
PurgeCode Required. Cannot be modified. Used for internal calculations, such as determining retention days. Corresponds with the PurgeCode used in Business Rules Purge Criteria.
ColonyID Required in a multi schema deployment where a table might exist in multiple schemas. Runs the agent for the colony.
IgnoreLeadDaysForInactive Optional. Set this to purge consumption and consumption detail records corresponding to the inactive resource pools by ignoring the retention days.
The valid values include:
  • N, which is the default value. Purges consumption and consumption detail records for inactive resource pools based on the retention days.
  • Y. Purges consumption and consumption detail records for inactive resource pools by ignoring the retention days.

Statistics tracked

The following statistics are tracked for this transaction:

Table 3. Capacity purge statistics
Statistic Name Description
NumStdCapacityPeriodsPurged Number of standard capacity periods purged.
NumCapacityOverridesPurged Number of capacity overrides purged.
NumCapacityConsumptionsPurged Number of capacity consumptions purged.

Pending job count

For this transaction, the pending job count is the total number of records that can be purged from the YFS_RES_POOL_STD_CAPCTY_PERD, YFS_RES_POOL_CAPCTY_OVERRIDE, YFS_RES_POOL_CONSMPTN_DTLS and YFS_RES_POOL_CAPCTY_CONSMPTN tables.

Events raised

None.

Tables purged

  • The YFS_RES_POOL_STD_CAPCTY_PERD table is purged when EFFECTIVE_TO_DATE <= (CurrentDate - LeadDays)
  • The YFS_RES_POOL_CAPCTY_OVERRIDE table is purged when CAPACITY_DATE <= (CurrentDate - LeadDays)
  • The YFS_RES_POOL_CAPCTY_CONSMPTN table is purged when CONSUMPTION_DATE <= (CurrentDate - LeadDays), or if a manual reservation is taken, when CONSUMPTION_DATE <= (CurrentDate - Manual Reservation Retention Days). When the table is purged, YFS_RES_POOL_CONSMPTN_DTLS is also purged.
  • The YFS_RES_POOL_CONSMPTN_DTLS table is purged when RESERVATION_EXPIRATION_DATE <= (CurrentDate - LeadDays)