You are here: System operations > Agents > Agents rules > Pega-RULES agents

Pega-RULES agents

The four agents in the Pega-RULES ruleset perform general system housecleaning and periodic processing:

SystemPulse

The Pega Platform uses two types of system pulse processing: database pulse and cluster-based pulse.

Database pulse

When the Pega Platform is configured to use database pulse processing, the activity Code-.SystemPulse is used to synchronize the contents of the in-memory rule cache on a node with rules that are stored in the PegaRULES database.

This process is set to a default interval of 60 seconds. To see the date and time of the most recent pulse on each node, in the System Management Application (SMA), select Administration > Pulse Status.

Note: To change the system from using database pulse to using cluster-based pulse, first update the value attribute for initialization/pulse/transport to "cluster" in the prconfig.xml file or the Dynamic System Settings, and then perform a complete cluster shutdown and startup.

The rows of the pr_sys_updatescache database table, which corresponds to the System-Updates-Cache class, form the input queue. Rows of this table have one of the following record types:

To see a list of updates not yet posted by pulse processing, review the standard report System-Updates-Cache.InstanceList.All..

During pulse processing, library recompilation requested on one node is propagated and repeated on other nodes. After a developer clicks Generate Library on the Packages tab of a Library form or selects the Compile Libraries check box on the Import Archive form, the system 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, keeping the compiled versions synchronized across all nodes.

Cluster-based pulse

When the Pega Platform is configured to use cluster-based pulse, the system sends pulse messages directly to the other nodes. Any changes to rules are immediate and are not synchronized during the pulse operation. The SystemPulse agent is bypassed during this process, acting as a heartbeat for the system that updates the last pulse time in the database. As a result, the pr_sys_updates cache table remains empty at all times.

When cluster-based pulse is used in a multinode system, changes to the contents of the rule cache are synchronized during the pulse operation. However, any changes to a rule saved on one node are immediately reflected in processing that occurs on any other nodes.

SystemIndexer

The standard activity Code-.SystemIndexer updates the search index cache that supports the operations of the full-text search facility for rules and data instances. Typically, this activity runs every 60 seconds, so after saving a new or updated rule, the updated information might not immediately be displayed in search results.

You can enable or disable full-text index processing through the System Settings landing page. See System category — Settings 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 cache, writing out instances of the Log-RuleUsage class and Log-RuleUsage-Details class.

SystemWorkIndexer

The SystemWorkIndexer agent periodically updates Elasticsearch indexes to support text-based searches for work items. Elasticsearch indexes for work items are created only when the Dynamic System Setting PegaRULES:indexwork/enabled is set to true. A check box on the Advanced tab of the Class form controls which work items are indexed.

Application users accessing the Pega Platform from the User composite portal or another composite portal that incorporates the @baseclass.FindWork section can search for work items by using full-text search. You can enable or disable full-text index processing through the System Settings landing page.