Back Forward Understanding the Pega-RULES agents

Concepts and terms

Show all 

The agents in the Pega-RULES RuleSet perform general system housecleaning and periodic processing. The agents in this agents rule are:

System Cleaner

By default, this agent runs the standard Code-.SystemCleaner activity once each day for housekeeping tasks, including purging older records (instances) from log tables, any requestors that have no activity during at least 48 hours, and any nodes that have not responded to the pulse for 30 days.

If desired, you can add an activity similar to Code-.SystemCleaner to another agent to purge outdated information and recover tablespace. Make sure the agent has access to the needed RuleSet Versions, and take care not to purge instances that are referenced in other tables. CLINB 9/20/05 clinic

Similarly, you can change the idle requestor purge criteria to a value less than 48 hours, by overriding the test in the called activity System-Requestor-Context.CleanupExpired. SR-1355

C-2655Once each day, this activity calls Log-Usage.UsageCleaner, which trims older rows of the pr_perf_stats table (corresponding to the Log-Usage class). This activity starts a stored procedure, passing a number of days to retain based on the value of the pxProcess.pxLogUsage RetentionPeriod property. (Through a prconfig.xml setting, you can set this retention period. The default is 30 days.)

System Pulse

System pulse processing, defined by the activity Code-.SystemPulse, typically occurs every 60 seconds. B-20293 Rows of the pr_sys_updatescache database table (corresponding to the System-Updates-Cache) class form the input queue. Rows of this table have one of five record types in this table:

In a multinode system, changes to the contents of the rule cache are synchronized during the pulse operation. Accordingly, changes to a rule that a developer saves on one node may in some cases not be reflected in processing that occurs on another node, for up to a minute (or another value depending on pulse configuration). Processing on the first node accesses the updated rule from its cache, but processing on the second node may temporarily access a stale copy from its cache.

To see a list of updates not yet posted by pulse processing, review the standard report System-Updates-Cache.InstanceList.All. (Use the System Management application to find more complete information.)

Pulse processing also notices updates to access groups made on one node and makes them effective on the current node.

After a developer clicks the Generate Library   button on the Packages tab of a Library form (or equivalently selects the Compile Libraries checkbox on the Import Archive form), the system promptly extracts and compiles (on the developer's node) the functions in that library. At the next opportunity, system pulse processing on each other node of a multinode cluster compiles that library, thus keeping the compiled versions synchronized across all nodes. PROJ-338

System Indexer

The standard activity Code-.SystemIndexer updates the search index cache that supports the operations of the full-text search facility. Typically, this runs every 60 seconds. Accordingly, when you save a rule, it may not be retrieved search operation for up to a minute.

(You can enable or disable index processing through the Search landing page.)

RuleUsageSnapshot

The standard activity Code-.RuleUsageSnapshot normally runs once every 24 hours. If the system has run for at least an hour since startup, this activity takes a snapshot of the rule assembly cache, writing out instances of the Log-RuleUsage class and Log-RuleUsage-Details class.

Data in those classes is accessed during the next system startup, to populate the rules assembly cache. See Working with the rules assembly cache. PROJ-454 5.3

StaticContentCleaner

The standard activity Code-.StaticContentCleaner deletes (or "prunes") files from the server file system containing static content, such as images (JPG, PNG, or GIF file type), style sheets (CSS file type) and JavaScript files (JS file types) in the StaticContent folder. Normally running once an hour, this activity deletes extracted static content that is older than NNN days, where NNN is the value of the following setting in the prconfig.xml file:PROJ-872 5.4

<env name="http/staticcontentminpruningage" value="NNN" />

In a production system, if the prconfig.xml file contains no http/staticcontentminpruningage entry, the activity uses 30 days as the default retention period, purging the static content directories and files that are more than 30 days old. TASK-2538 In a non-production system (based on a production level setting of 1, 2, 3, or 4), if the prconfig.xml file contains no such parameter, the default retention period is 3 days. Bug-10935 BERRB 2/4/08

Eliminating older static content reduces the number of files and subdirectories in the server's StaticContent directory, saving disk space and improving file access. If a user with a specific RuleSet list later attempts to access a static content file that was purged, the file is re-extracted from the Rule-File-zzzz rule in the PegaRULES database on demand.

The DateTime property pxProcess.pxAdminSystem.pxLastStaticContentPruning on the Process page identifies the last time this activity started.

TipIn a production setting, RuleSet lists, images, CSS style sheets, and JavaScript files — typically those items derived from rules — change only infrequently. Changing the prconfig.xml setting to a larger value than 3 days may improve some user response times slightly by reducing on-demand extractions.

SystemWorkIndexer

The SystemWorkIndexer agent periodically updates Lucene indexes to support text-based searches for work objects. Lucene indexes for work objects are created only when the dynamic system setting PegaRULES:indexwork/enabled is set to true. A checkbox on the Advanced tab of the Class form controls which work objects are indexed. See Search Landing page.

Application users accessing Process Commander from the User composite portal (or another composite portal that incorporates the @baseclass.FindWork section) can search for work objects using full-text search. GROVS 1/29/09

Definitions agent, pulse, lookup list cache, Lucene, rules assembly, rule cache, static content
Related topics Agents — Concepts and terms
About Agents rules
About Agent Schedule data instances
Understanding Caching
How to analyze system-wide usage with the Log-Usage class
Standard rules Atlas — Standard Agents

UpConcepts