Skip to main content

How To Configure Data Purging

Introduction

Purging is the process of freeing up space in the database or of deleting obsolete data that is not required by the system. The purge process can be based on the age of the data or the type of data. Regular purging of aged or redundant data from the system improves the efficiency of both storage and processing.

Enactor Retail has facilities to automate the process by creation of Scheduled Jobs that perform regular purging of files and data to a policy-determined age of retention (specified in days). Purging of files and data may also be applied manually and more specifically targeted by scheduling one-off jobs using the Purging tool described in this guide.


Overview

This guide covers the configuration for the following:

  1. Purging Configuration - a convenient interface for manual purging of data and files, allowing one-off targeted purge operations
  2. Location Configuration - automated purging of data and files using the Purging tab on Location or Location Template Maintenance, executed as a scheduled job via the Diary
  3. Diary Configuration - creating a scheduled System Job to run the SysPurgeProcessor process for regular automated purging
  4. Monitoring - viewing purge job status and results via Scheduled Job Maintenance

Prerequisites

Before starting, you should have the following resources in place:

  • Enactor Estate Manager
  • Enactor POS (configured within the UK Region, connected to the Estate Manager)
  • Standard Configuration, including base configuration and regionally appropriate data

You should be familiar with the following:

  • Estate Manager configuration
  • Data broadcasting

Configuration Steps - Purging Configuration

The Purging configuration option provides a convenient interface for manual purging of data and files. This is a more specifically targeted approach by scheduling one-off jobs using the Purging tool described below.

The purging option facilitates deletion of all files from a specified Directory or all instances of an Entity (i.e. entries of a database table) subjecting to a "Purge entities older than (days)" parameter.

Accessing the Purge Tool

Navigate to the Purge application, or the path:

Main Menu > Administration > Data Management > Purging

The Purge screen is displayed:

Purge screen

The Purge application - manual purging of entities and directories

Purge Configuration Fields

Set the appropriate values on the Purge option as follows:

FieldDescription
Entity Type - AvailableLists all available entity types. Select the entities that require purging by transferring them from the left table to the right table. Use Move, Move All, Remove, Remove All options as appropriate.
Entity Type - SelectedThe transferred entities will be listed in this field.
Purge entities older than (days)Enter a numeric value in the range 0-9999 indicating the number of days after which purging of entities should occur. Zero indicates that the selected entities will not be purged.
DirectoriesSelect the required directories to purge from the dropdown list and select the Add button to confirm the selection. Multiple directories can be added.
Purge files older than (days)Enter a numeric value in the range 0-9999 indicating the number of days after which purging of files should occur. Zero indicates that the selected files will not be purged.
Runtime ContextSelect the runtime context in which the service is expected to execute: Web Retail Processing, Web Order Processing, or Web Customer Processing.
warning

When data is purged it will no longer be available. Ensure that your retention periods are appropriate for your business requirements before executing a purge.

Select Purge to execute the purge operation.


Configuration Steps - Location Configuration

An alternate means of data purging is provided under the Purging tab of Location and Location Template Maintenance. This automates purging of files from the file system and data from the database. It will attempt to apply the purging policy on any physical device (POS or Server) on which it executes in a given Location.

The process is normally executed as a Scheduled Job and typically scheduled for regular execution in the Diary function.

tip

Use the Location Template Maintenance for a more convenient way of configuring purging, if the purging configurations are to be the same across a set of locations.

Accessing Location Maintenance

Navigate to Location Maintenance, or the path:

Main Menu > Configuration > Organisation > Locations

Edit the location you wish to define the purging instructions and navigate to the Purging tab.

Directory Purging Sub Tab

The Directory Purging sub-tab applies to directories of the file system. Multiple directory entries may be specified for purging by specifying the file system pathname and optionally a Purge Age property value.

Location Maintenance - Purging tab - Directory Purging sub-tab

Location Maintenance - Purging tab - Directory Purging sub-tab

Set the appropriate values on the Directory Purging sub-tab as follows:

FieldDescription
Default Directory Purge Age (days)Enter a numeric value in the range 0-9999. Zero means do not purge. The default directory purge age (days) when populated will purge all data within the directories listed.
DirectoriesSelect the required directories to purge from the dropdown list and select the Add button to confirm the selection. Multiple directories can be added.
Purge Age (days)Enter a numeric value in the range 0-9999 for the purge age of the directory specified in the previous field. The data in the system will be purged according to the values here using a regular job which will run as defined by the user, e.g. daily, weekly, etc.
info

In the event that a purge age is added to each individual directory, this will overrule the default value set in the first field.

Available Purge Directories

The following directories are available for selection, along with their descriptions and the devices on which they exist:

DirectoryDescriptionDevices
${Common.ApplicationHome}/logsContains all the log files that are generated from the device start to end time.Estate Manager, Back Office, Mobile Server, Master POS, POS
${Common.ApplicationHome}/logs/OldLogsLog files are moved into this directory from the logs directory when they are older than 24 hours.Estate Manager, Back Office, Mobile Server, Master POS, POS
${Common.ApplicationHome}/DownloadsContains files that are generated and ready for other devices to download from during a broadcast.Estate Manager
${Common.ApplicationHome}/Queues/TransactionsIn/processedContains files that are processed when manually importing any type of transaction files in the Estate Manager.Estate Manager
${Common.ApplicationHome}/Queues/TransactionsIn/failedContains files that have failed when manually importing any type of transaction files in the Estate Manager.Estate Manager
${Common.ApplicationHome}/Queues/BackOfficeTransactionsIn/processedContains files that are processed when manually importing any type of transaction files in the Back Office.Back Office
${Common.ApplicationHome}/Queues/BackOfficeTransactionsIn/failedContains files that have failed when manually importing any type of transaction files in the Back Office.Back Office
${Common.ApplicationHome}/Queues/Transactions/tmpContains files that have been used when manually importing retail and employee transaction files.Estate Manager
${Common.ApplicationHome}/Queues/CMTransactions/tmpContains files that are Cash Management related such as terminal float, terminal cashup, safe finalise, etc.Estate Manager
${Common.ApplicationHome}/Queues/SystemEvents/tmpContains files that are system events related such as logging in and out of the device, etc.Estate Manager
${Common.ApplicationHome}/ExportsContains files that have been generated when File Exports is run in the Estate Manager.Estate Manager
${Common.ApplicationHome}/ManuallyImportedFilesContains files that have been dropped into this directory to manually import into the Estate Manager.Estate Manager
${Common.ApplicationHome}/Imports/EmployeeContains files that have been dropped into this directory to manually import Employees.Estate Manager, Back Office
${Common.ApplicationHome}/Imports/OrganisationContains files that have been dropped into this directory to manually import Organisations.Estate Manager, Back Office
${Common.ApplicationHome}/Imports/PriceContains files that have been dropped into this directory to manually import Prices.Estate Manager, Back Office
${Common.ApplicationHome}/Imports/ProductContains files that have been dropped into this directory to manually import Products.Estate Manager, Back Office
${Common.ApplicationHome}/Imports/Product_OtherContains files that have been dropped into this directory to manually import data containing other product related details.Estate Manager, Back Office
${Common.ApplicationHome}/Imports/SellingCodeContains files that have been dropped into this directory to manually import Selling Codes.Estate Manager, Back Office
${Common.ApplicationHome}/Imports/UsersContains files that have been dropped into this directory to manually import Users.Estate Manager, Back Office

Entity Purging Sub Tab

The Entity Purging sub-tab applies to entities in the database. The entities available for purging are pre-defined and listed for entry of individually applied data retention policies. This enables override of a globally applied default policy.

Location Maintenance - Purging tab - Entity Purging sub-tab

Location Maintenance - Purging tab - Entity Purging sub-tab

Set the appropriate values on the Entity Purging sub-tab as follows:

FieldDescription
Default Purge Age (days)Enter a numeric value in the range 0-9999. Zero means do not purge. The default purge age (days) when populated will purge all data within the entity types listed.
Entity TypeAll purgeable entities are shown in a list.
Purge Age (days)Enter a numeric value in the range 0-9999 for the purge age of the entity specified in the previous field. The data in the system will be purged according to the values here using a regular job which will run as defined by the user, e.g. daily, weekly, etc.
info

In the event that a purge age is added to each individual entity, this will overrule the default value set in the first field.

Select Save.


Configuration Steps - Creating the Purging Diary Event

The purging policy can be applied in a given location by scheduling regular execution of the SysPurgeProcessor process using the Diary function.

Accessing the Diary

Select the Diary icon in the top right corner after signing in to the Estate Manager.

Diary icon in the Estate Manager header

The Diary icon in the Estate Manager header bar

The Diary screen is displayed:

Diary main screen

The Diary screen showing existing scheduled jobs

Creating a New System Job

Select Create a new System Job.

Set the start date and select System Job as the Diary Entry Type.

Create a new Diary Entry dialog

Create a new Diary Entry - select System Job as the entry type

Select Create to proceed.

Diary - General Tab

Diary - General tab

Diary System Job - General tab configuration

Set the appropriate values on the General tab as follows:

FieldDescription
LocationSelect the location you wish to link the scheduled job to from the dropdown list.
Device TypeSpecify the device type on which you wish the Purging Policy applied.
SubjectEnter a user-friendly, meaningful subject that can be alphanumeric.
Start DateEnter a date specifying the first day on which the job runs.
Start TimeEnter a time specifying the time the job will run.
End TimeSpecify an expiry time, some hours ahead, by which the job must complete. The job may be queued or require a retry, but will need to be completed before the end time.
OccursSpecify the frequency of the job by selecting one of the available options: Once, At Minute Intervals, Every Hour, Every Day, Every Week, Every Month. Typically run daily.
Interval (minutes only)Enter a numeric value indicating the time between executions.
HiddenSelect checkbox to indicate not to display in listings of Scheduled Jobs unless explicitly requested.
CategorySelect the appropriate category from the dropdown list of all available categories.

Diary - Job Tab

Diary - Job tab

Diary System Job - Job tab configuration

Set the appropriate values on the Job tab as follows:

FieldDescription
Process IDEnter EstateDirector/Purge/SysPurgeProcessor. This identifies the process the job runs against. Note: This is case-sensitive.
Submitted Job IDEnter an applicable Job ID as necessary.

Select Save.


Monitoring Purge Jobs

When the purge function is run, either through the Purging maintenance or as scheduled in the Diary, there is a scheduled job that is run for it. The status and other information of this can be viewed by navigating to the Scheduled Job Maintenance.

Accessing Scheduled Job Maintenance

Navigate to Scheduled Job Maintenance, or the path:

Main Menu > Administration > Processing > Scheduled Jobs

There will be a purging job record with the Description of (PurgeProcessor) as follows:

Scheduled Job Maintenance screen

Scheduled Job Maintenance - showing the PurgeProcessor job with Successful status

Viewing the Application Process Log

Clicking on the ! icon of that record will navigate to the Application Process Log of that entry where more information regarding the purging record can be found:

Application Process Log showing purge results

Application Process Log - showing purge job results including files purged count

The message "17 '${Common.ApplicationHome}/logs/OldLogs' files purged" displayed above shows that there have been 17 files that have been purged from the Old Logs directory when this purging job was run.


Broadcasting

To deliver the configuration changes to the POS, broadcast the following entities:

  • Locations
  • Diary Event
info

If store server purging is configured, the diary event entity would need to be broadcast to the appropriate store server.