Jump to: navigation, search

Purge Services

Steps to schedule purges of the service database. You can configure purges either from the Genesys Administrator or from the Configuration Manager interfaces. Your application can also perform purges by itself with a purge query.

Usage of Purging Capabilities

Important
The purging capabilities of Context Services are not available for Profile management.

The purge features delete all the service information, including nested task, state records, and extensions. Options enable you to select the type of services to delete (started, completed, or both), and to set up a time limit (or expiration date) which is compared to the Started time or Completed time field of the services.

You can schedule tasks to periodically purge the database in the Configuration Server and Genesys Administrator interfaces. All the scheduled tasks are stored in the Configuration Server. Administrators should use these interfaces to:

  • Schedule purging jobs for all or for anonymous services.
  • Schedule the purge of started services which are not completed at the purge date time.
  • Schedule the purge of started services which are completed at the purge date time.

You should be aware that:

  • You cannot select the services to delete according to their nested states and tasks.
  • Context Services does not check data integrity during the purge job.
  • Context Services does not check that the sub-states or sub-tasks are all completed.
  • There is no interface to display or retrieve information about the purge progress.
  • You cannot interrupt a purge task.
  • You can set up multiple purging tasks.
Important

Starting 8.5.105, you can update your services with a TTL or an expiration date by using the Update Expiration Time query. You can also modify Start Events and End Events to add one of these parameters.

Purging Criterias

If you schedule a purge, you must choose one of the criteria listed below:

  • purge.service.all to purge all the services which received a started event prior to the limit date.
  • purge.service.started.anonymous to purge the anonymous services which received a started event prior to the limit date and are not completed at the date of the purge.
  • purge.service.started to purge the services which received a started event prior to the limit date and are not completed at the date of the purge.
  • purge.service.completed to purge the services which received a started event prior to the limit date and are completed at the date of the purge.
  • purge.service.completed.anonymous to purge the anonymous services which received a started event prior to the limit date and are completed at the date of the purge.


Important
You can use these criteria in the Genesys Administrator and Configuration Manager interfaces, and in the purge query.

Schedule Purge Jobs

You can add configuration options to schedule the purge of service records .

  1. Open your Context Services application in the Genesys Administrator interface or the Configuration Manager interface.
  2. In the Annexes tab, create one or more sections called scheduled-job-XX, where XX is any convenient identifier.
  3. Create options and assign values to them, as described in the table below.
Important
If you have multiple scheduled-job-XX sections, be careful to have no overlap of the scheduled times (specified by the cron-expression option). Only one purge operation can be executed at a given time: if one operation is not finished when a second one should start, the second operation does not start at all.

Service Purging Options

You can create as many scheduled-job-XX sections as you need with the following options.

Purging Options
Option name Mandatory Default value Valid values Changes Take Effect Description
enabled No false true, false Immediately true to enable the scheduled job.
organization No N/A <ContactCenterId>[.<GroupId>] Immediately Organization ID in the form <ContactCenterId>[.<GroupId>] where ContactCenterId refers to the tenant (DBID or Name) and GroupId is a sub-tenant.
Tip
You should set the same values as for the HTTP POST event operation headers used in the Context Services queries.
.
action Yes purge.service.all
  • purge.service.all
  • purge.service.started
  • purge.service.completed.anonymous
  • purge.service.started
  • purge.service.completed.anonymous
Immediately Specifies the type of purge to perform. The time limit is set through the period and period-type options.
  • purge.service.all to purge all the services which received a started event prior to the configured period.
  • purge.service.started.anonymous to purge the anonymous services which received a started event prior to the configured period and are not completed at the date of the purge.
  • purge.service.started to purge the services which received a started event prior to the configured period and are not completed at the date of the purge.
  • purge.service.completed to purge the services which received a started event prior to the configured period are completed at the date of the purge.
  • purge.service.completed.anonymous to purge the anonymous services which received a started event prior to the configured period and are completed at the date of the purge.
period Yes 5 Any positive integer from 1 to 9999 Immediately Sets the time frame for the purge depending on the period-type option.

If you set period to 6 and period-type to days, the purge deletes all the services older than 6 days. See also the period-type option.

period-type Yes months
  • hours
  • days
  • months
  • years

Immediately Specifies the units to use for the period option calculation.
  • hours to purge services older than n hours, where n is the period option's value.
  • days to purge services older than n days, where n is the period option's value.
  • months (default) to purge services older than n months, where n is the period option's value.
  • years to purge services older than n years, where n is the period option's value.
cron-expression Yes 0 20 * * 5

(i.e. Fire at 8pm every Friday)

Cron expression as described at Cron Expression Immediately Explanation of the provided sample:
0   20    *    *    5 
┬    ┬    ┬    ┬    ┬ 
│    │    │    │    │ 
│    │    │    │    └──────── day of week (0 - 7) (Sunday=0 or 7)
│    │    │    └───────────── month (1 - 12)
│    │    └────────────────── day of month (1 - 31) 
│    └─────────────────────── hour (0 - 23)
└──────────────────────────── min (0 - 59)

Setting Options in Cluster Mode

If you deploy your Context Services application in cluster mode (which is the default deployment), you must also set the purge options in your Cluster Server application. Because Context Services is a custom component from an architecture stand-point, Cluster deployment is detailed in the GMS Deployment Guide.

This page was last edited on September 7, 2018, at 12:58.
Comments or questions about this documentation? Contact us for support!