Show
all
PROJ-135 5.3 In a production application, work object data
volume can grow to a size where hundreds of megabytes of database storage
is required. The Purge/Archive wizards enable you to use an agent to
automatically delete old work object data from the respective tables
and/or stores them in ZIP archive files. Purging and archiving old work
objects and their related history and attachment records helps maintain
system performance by reducing database processing demands.
Scope
Archiving work object data enables you to retrieve them if needed
for audits or for backups. Note the following:
- You can use the wizards to purge the work objects without
archiving them. Because there is no easy way to ever recover the
deleted work objects, use this option with care.
- You cannot use the wizard to archive only. Archiving always
occurs with purging, which removes the rows from the tables.
Overview
You use the Purge/Archive wizard to set up the agent activity in
two phases:
Phase 1: Configure the activity — Define the dataset
that will be purged/archived. The dataset comprises a work pool in
your application, and a set of work types (classes), folders, and
covers within the work pool. The dataset is also qualified by the age
of resolved work objects to be purged/archived. Each configuration is
an instance in class Data-Admin-ArchiveSettings.
Phase 2: Schedule the activity — For each cycle you
specify:
- Start date and the frequency of each purge/archive cycle.
- Number of items you want to purge and/or archive. If this value
is less than the number of items in the age group defined in Step
1, the oldest items are purged. The others remain in the source
tables until the next cycle.
- A time limit for processing items within each purge/archive
cycle. If the time limit is exceeded, the process stops and
restarts after a defined number of hours has elapsed. These
settings help spread out processing demands during a single
cycle.
At the defined cycle start time, the purge/archive agent first
populates an archive ZIP file with the work objects and their data as
defined in Step 1. The agent then deletes the table data. Although the
work objects are purge/archived, the work object ID is left unchanged,
to allow restoration or archived wok items without affecting current
work objects.
About the ZIP
file
The ZIP files created by the wizard uses the following naming
convention:
<workpool name_dataset name_ file creation
date_runn >
for example:
MyCo-Classgroup_AlphaPurge_20070409T22440_0.zip
A run value of 0 (zero) designates the first
run.
The ZIP files are stored in the Process Commander system temporary
directory configured for your installation.
Prerequisites
Before you use the Purge/Archive Wizard, do the following:
- Enable the agent activity by selecting SysAdmin > Agent
Schedule from the Rules Explorer tool. Open the
Pega-ImportExport agent
instance for the appropriate application RuleSet and server node.
On the Schedule tab, select the
Enabled? option for the
Assign-Archive.ProcessAssignments activity. Do not
modify the default Pattern and Interval
(sec) values. Save the Agent Scheduled form. XXXXXXXXXXXXXXXXXXX INCORRECT PER KEDAR JOG 10/25/2010 XXXXXXXXXXXX
- Establish a destination archive system that is a copy (same
rules and data schemas) of the source production system that you
are archiving. Maintaining a copy system enables you to upload,
import, archive, and access ZIP file data without the need for
subsequent clean-up and reconfiguration.
- Identify the work pools and the work types you are
purging/archiving.
- Identify whether there are folder items and/or covers that you
want to purge/archive. Note that if any data items within a folder
or cover are unresolved, then none of the items are purged or
archived during the cycle.
- Estimate the average size of the work objects and their related
data. The wizard removes items by count, not by size. Knowing the
size of your objects helps you estimate the archive ZIP file sizes
and the table sizes required for your target database. History,
attachments, and links for each work object in your application are
included in your ZIP files.
Indexes created for work objects are deleted but not archived. The
indexes are recreated when the work objects are recovered from the
archive. For example, work party indexes (table
pc_index_workparty
) are purged but not archived. When the
work object is recovered, the work party index is recreated.
Using the
wizards
Two wizards comprise the Purge/Archive wizard:
Configuration wizard: Select > System > Tools > Purge/Archive Configure when you are:
- Creating and configuring a purge/archive agent dataset and
defining the age of work objects you want to purge/archive.
- Modifying the configuration of a purge/archive agent dataset
(change work types and work object age)
Scheduling wizard: Select
> System > Tools > Purge/Archive Schedule when you are:
- Creating a purge/archive process schedule for an agent activity
configuration (created in the Configuration wizard)
- Reviewing the history of purge/archive activity and
modifications to the agent work object
- Modifying the schedule information for a purge/archive
configuration
- Removing the schedule for a purge/archive configuration
Click the Help button () on any form for information about that form.
Restoring archived
work objects
To retrieve archived work objects in your archive system, select> Application > Import & Export > Import.
By default, a setting in prconfig.xml
limits the size
of an imported file to 25MB. To upload files that exceed this limit,
you can either change the setting or use a file transfer tool such as
FTP. For more information, see the Pega Developer Network article
PRKB-24095 How to import large archive .zip files
using the Import Rules/Data tool.
Testing the
Purge/Archive wizard
Before using the wizard in a full-scale production system, it is
strongly recommended that you test the wizard as follows:
- Schedule a near-term purge/archive cycle using a test set of
resolved work objects. Confirm that they and their related data are
deleted from your application
pc_work
table and from
the tables listed above in the preceding Prerequisites section. You
can use Find by ID to verify that the items are not available.
- Use the Scheduling wizard and enter the agent information
(workpool and name) you used for the test. This opens the work
object form. In the Interval Statistics section,
open the entry for the date of the run. Verify that the number of
work objects and work-related records purged/archived are correct.
Verify that the ZIP file has been created.
- Purge a cover work object that contains resolved work objects.
Verify that all the work objects inside the cover were successfully
deleted.
- Purge a folder work object that contains a cover. Verify that
the cover was deleted.
- Purge a folder that contains a cover that, in turn, contains
resolved and unresolved work objects. Confirm that none of them are
purged.
- Create a folder with a work object inside the folder. Check for
an entry in the table
pc_link_folder
. Purge the folder
and then verify that the entry in the link table is deleted.
- Upload and import the ZIP file into your archive system. Verify
that all the data is recovered.
Security
By default, only operators who hold the
PegaRULES:SysAdm4 role can use these wizard, and the
agent activity is not enabled.
To configure this facility:
- Identify an access role associated with the operators who are
to hold the privilege. Open the Rule-Access-Role-Obj
rule for the role you want to grant access, using
@baseclass as the second key part. On the Privileges tab, add the
PurgeArchiveConfigure privilege to the list with the
appropriate access level. Save the form.
- XXXXXXXXXXXXXXXXXXX INCORRECT PER KEDAR JOG 10/25/2010 XXXXXXXXXXXX Open the Agent Schedule data instance named Pega-ImportExport. (In a multinode cluster, open the one
that is enabled.) On the Schedule tab,
enable the Assign-Archive.ProcessAssignments activity.
Select Periodic pattern and enter an arbitrary
numerical value in the Interval (sec) field. (The
settings in the Purge/Archive Scheduling wizard override this
value).
- Select the Enabled? option. Save the Agent
Schedule form.
Tools, accelerators, and wizards