When you or Pega Cloud deploys a new Pega application, users working in the system may initially experience poor application performance. When the application starts, the core Pega Platform application orchestrates rules and the application code to retrieve and cache rules. This action is known as rule assembly, a system process for generating and compiling the Java code that corresponds to the application rules. Pega Platform performs rule assembly when the system starts new computing resources, deploys new code, or runs updated rules for the first time in the application. Pega refers to this action as First Use Assembly (FUA). By running the vast majority of rules using FUA, you optimize system performance because the process moves the code into a cache, which allows the system to process a rule in your application much faster.
A rule cache is an in-memory collection of recently used rules. Pega Platform maintains rule caches to improve application performance by avoiding unnecessary rule resolution and database interactions. When an application requests a rule, Pega Platform runs the rule if it is in the cache. If the rule is not in the cache, Pega Platform processes the rule and then adds the rule to the cache.
Pega recommends that application administrators run the static assembler after you import an application that contains a large number of new rules, after a software update, or after any significant change occurs during the application development cycle. Re-assembly of rules is optional.
The static assembler supports assembling the following rule types:
Rule types included in the static assembler process
|Access When||Declare Trigger||Map Value|
|Case Match||Edit Validate||Paragraph|
|Case Type||Flow||Report Definition|
|Decision Table||HTML||Summary View (deprecated)|
|Decision Tree||HTML fragment||Validate|
|Declare OnChange||List View (deprecated)||XML Stream|
The history display presents a summary of past usage:
Types of details included in a history of assembled rules
|Assembled at Time||Date and time the assembly started.|
|Rules Assembled||Count of rules successfully assembled.|
|Rules Skipped||Count of rules not eligible or not requiring rules assembly.|
|Total Rules||Count of rules in the application.|
|Download Logs||Click to download a ZIP file containing more detail.|
Diagnosing rule assembly issues
Alerts are generated for rule assembly issues if rule assembly is not performant. A review of the alert log may assist in identifying assembly issues, including:
- PEGA0032 Alert: Rule change invalidated the specified threshold of entries in the rules assembly cache
- PEGA0037 alert: Rule assembly time exceeded threshold
- PEGA0038 alert: The wait time for rule
cache access exceeds a threshold
If you want to diagnose rule assembly and caching issues, review the rule assembly statistics for your application by running the Performance Analyzer (PAL) tool in Dev Studio by navigating to Configure > System > Performance > PAL. You can also use the My Performance Details tool in Dev Studio, by navigating to Configure > System > Performance > My Performance Details. The statistics presented by the My Performance Details and PAL tools are the same, but with the My Performance Details tool you can look at statistics for individual users.
Pega Platform supports two ways to run the static assembler, depending on your deployment type.
- Running the static assembler from Dev Studio
Run the static assembler from Dev Studio to preassemble and cache rules in your Pega application. First use assembly (FUA) of rules is a one-time process that can add strain to your computing resources, but it is a best practice for all Pega clients to complete this process to ensure that your application rules run most efficiently.
- On-premises only: Running the static assembler from the command line
Run the static assembler utility from a command line to optimize your application performance from hardware resources outside of your system cluster. As an alternative to running the static assembler utility from Dev Studio, if you are an on-premises client you can run the utility outside of your system cluster and avoid putting any additional strains on your Pega application computing resources.