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
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.
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.
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.
Schedule Purge Jobs
You can add configuration options to schedule the purge of service records .
- Open your Context Services application in the Genesys Administrator interface or the Configuration Manager interface.
- In the Annexes tab, create one or more sections called scheduled-job-XX, where XX is any convenient identifier.
- Create options and assign values to them, as described in the table below.
Service Purging Options
You can create as many scheduled-job-XX sections as you need with the following 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.
TipYou should set the same values as for the HTTP POST event operation headers used in the Context Services queries.
||Immediately||Specifies the type of purge to perform. The time limit is set through the period and period-type options.
|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.
|Immediately||Specifies the units to use for the period option calculation.
|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.