Sunday, January 1, 2017

Caching

Rule cache

The rule cache, also referred to as the database cache or system cache, contains recently found and non-found rules that are used to improve the performance of the engine, especially during rule resolution searches. The system adds to the cache any rule that is read three or more times, however, for some rule types, a higher limit applies.
Note: Instances of most concrete classes other than those derived from the Rule- base class are not cached in the rule cache.
In a clustered system, a rule recently updated by a user on one node can also be present (and stale) in the rule cache of another node. During system pulse processing, the Pega-RULES agent on each node clears such stale rules from the rule cache.


Assessing rule cache performance
For a statistical overview of rule cache performance on the node since startup:
1.  Start the System Management Application.
2.  Select Advanced > Rule Cache Management.

Determining the rule cache rule count and size
Use the System Management Application (SMA) to view the current rule count and size in bytes of the rule cache.
1.  From Designer Studio, start the System Management Application by clicking Designer Studio> System > Operations > System Management. You might be prompted for a username and password.
2.  Select a node.
3.  Click Memory Management.
4.  In the Caches group, locate the row corresponding to your application's caching type.

Disabling the rule cache

As a diagnostic aid to be used in specific situations, you can use the System Management Application (SMA) to temporarily disable the rule cache.
This event is recorded in the Alert log as the PEGA0022 alert. The corresponding alert when you re-enable the rule cache is the PEGA0023 alert.
For more information, see PDN articles Understanding the PEGA0022 alert and Understanding the PEGA0023 alert.
Caution: Use the System Management Application only when necessary and for short intervals because system performance is impaired when the rule cache is disabled.

Static content cache
The Pega 7 Platform stores static content for these rule types:
  • Binary file rules (Rule-File-Binary rule type, for images such as JPG files)
  • Text file rules (Rule-File-Text rule type, for JavaScript and Cascading Style Sheet files)
  • Form file rules, for rule forms (Rule-File-Form rule type)
  • eForm file rules (Rule-File-eForm rule type, for PDF forms)
The location of the StaticContent directory is determined by a temporary files path setting in the prconfig.xml file. Each directory below the StaticContent directory contains extracted static content. Additionally, the directory name encodes the exact ruleset list that the content belongs to. To minimize storage, the Pega 7 Platform creates directory names with a hash code derived from an entire ruleset list.
For example, the file system can contain many different files named CompanyLogo.jpg. The CompanyLogo.jpg file that is displayed in a browser session depends on that user's ruleset list.
Note: Use the System Management application to delete all the static content extracted on the current node.


Class hierarchy and inheritance


The Pega 7 Platform class hierarchy is a hierarchy for storing rules and data, not for Java variables or Java methods. Each class, whether abstract or concrete, can contain properties, activities, data transforms, and many other rules. Only objects in concrete classes can be saved as persistent or enduring instances in the PegaRULES database.
At the top of the hierarchy is the ultimate base class, identified by the keyword @baseclass. Its immediate child classes are known as the base classes. Concrete classes under two of these base classes, Rule- and Data-, hold rules and data instances that application developers create and update to build their application.
Instances of concrete classes derived from the Assign- base class and the Work- base class (and perhaps a few others) hold the dynamic transaction data and status details as your Pega 7 Platformapplication operates.
When any object is held in memory, it has an XML (eXtensible Markup Language) format visible on your clipboard as pages and property name-value pairs. When stored into the PegaRULES database, the persistent object instance becomes a row in a SQL-based relational database table. Three data classes, accessed through the Database, Database Table, and Class Group forms, together determine how Pega 7 Platform saves and retrieves the XML data as relational database rows.
You application may need custom classes derived from these base classes:
  • Work- base class (common)
  • Assign- base class (rare)
  • Data- base class (common)
  • Embed- base class (occasional)
  • Index- base class (occasional)
  • History- base class (created automatically)
Careful planning and analysis are important before creating the new classes, to understand their interrelationships and plan their positions in the standard class hierarchy. Maximizing reuse of standard classes, standard properties, and other standard rules is a proven tactic for fast development at minimum effort.
A database administrator can help design and plan Database Tables and class groups, as these decisions can influence database performance and backup needs.
Many rules apply to a specific class, and potentially to subclasses of that class. Rule resolution is the Pega 7 Platform search and lookup algorithm that uses inheritance to search through parent classes in a defined sequence for a rule. For example, if a property named CreditLimit is needed at runtime in the context of a class named Delta- CustomerCard, the system may search for a property with this name in several classes:
  • Delta-CustomerCard
  • Delta-
  • Work-Cover-
  • Work-
  • @baseclass (the topmost class)
The search ends when a rule is found. Settings in the class rule (Rule-Obj-Class rule type) define whether and how two mechanisms — directed inheritance and pattern inheritance — are employed during this search.


Class Structure


How to replicate (clone) a class group and class structure
At times, when following installation or migration of a RuleSet or product ZIP file, it may be desirable to mirror or "clone" a class structure.
For example, two similar but separate companies Delta and Omega can use one application in the MORTGAGE RuleSet. The MORTGAGE application includes several work types, each a class belonging to a single class group (say Mortgage).
Both Delta and Omega will use the same rules, but will apply the rules to distinct work types belonging to two distinct class groups (work pools). Users at each company can create work items identified as W-1234, and reports for each company will include only work items, assignments, and other data for that company.
The classes needed are similar to these:
  • Delta-Div-Work-Mortgage-WorkType1
  • Delta-Div-Work-Mortgage-WorkType2
  • Omega-Div-Work-Mortgage-WorkType1
  • Omega-Div-Work-Mortgage-WorkType2
and so on.
To support such situations, the Direct Inheritance wizard creates a new set of classes (one of which corresponds to a class group) that match the classes below a specified class. Through directed inheritance, the new classes inherit rules from those in the MORTGAGE RuleSet.
Procedure
Select Designer Studio> Data Model >Classes and Properties > Clone Class Group to start the Direct Inheritance wizard.
1. Complete the first form with the following information:
  • The RuleSet that contains the classes to be replicated
  • The class group (work pool) to be replicated
  • A new name for the class group to be created
  • Choose any value for the strategic process; this field is not used
2. Click Next. Complete the second form:
  • The RuleSet to contain the new classes
  • Checks for each class to be replicated
3. Click Next to start replication. The final form identifies the classes, Database Table, and class group that were created.


Standard classes derived from the Data- base class

About thirty standard concrete classes derived from the Data- base class record information that is entered by developers or other staff. For more information, see Data- classes by class name.
Your system also includes several concrete Data- classes that it uses internally while it operates. The installation process creates instances of many of these classes. Later, as the system operates, it creates instances of others indirectly. In most cases, no form is defined, so you cannot directly review the instances of these classes.
To access reports on Data- classes, click Designer Studio > Application > Inventory > Inventory Reports. In the Category menu, select Data.
For a list of those concrete Data- classes that developers can maintain using forms, see Data classes by name.
A dot (persistent) marks those classes for which instances are persistent (saved to the PegaRULES database).

Data-A

Class

Description

Data-Address-Email dot
Stores email addresses used in correspondence. Can be referenced in Correspondence Type rules.
Data-Address-Fax dot
Stores fax number addresses used in correspondence. Can be referenced in Correspondence Type rules.
Data-Address-PhoneText dot
Stores phone text messages used in correspondence. Can be referenced in Correspondence Type rules.
Data-Address-Postal dot
Stores street addresses used in correspondence. Can be referenced in Correspondence Type rules.
Data-Admin-ArchiveSettings dot
Supports the Purge/Archive wizard.
Data-Admin-IS-ClientSimulation
Supports unit testing of service rules with the Run toolbar button.
Data-Admin-Product
Stores information used by Product rule processing during upload.
Data-Admin-Products-Restore-
Supports hotfix installation and backout.
Data-Admin-Security
Supports the Access Role Editor.
Data-Admin-Skill
Associates skill ratings with operators. Skill names are rules, not data objects.
Data-Admin-StartingFlows
Maintains the starting flows for a given access group and workpool, to support IWM and other facilities.
Data-Admin-SysMaint
Supports reporting features of the portal.
Data-Admin-System-AuthPolicies
Hold security policies entered though the Security Policy gadget. See Systems category — Settings page.
Data-Admin-Tenant
Stores tenant information in a multitenant system.
Data-Admin-UnavailablePeriod
Supports recording of periods when a user is unavailable, corresponding to dates entered in the Scheduled Absences array on the Availability tab of the Operator ID form.
Data-Agent dot
Saves the last time the agent was awakened.
Data-ApplicationDependency
Supports application import and export.
Data-Assignment-Summary dot
Supports reporting on assignments, through a database table pcv4_assignment_summary. If you create a custom table to hold work items (to supplement the standard table pc_work), you must adjust the database view definition. See Database views and PDN article How to customize the display of a worklist.
Data-Assignment-WBSummary
Supports reporting on assignments, through a database table pcv4_assignmentwb_summary. If you create a custom table to hold work items (to supplement the standard table pc_work), you must adjust the database view definition. See Database views.
Data-Assistant
Not used.
Data-AutoTest-AutoGen
Supports testing of decision tables; part of Automated Unit Testing. See About Automated Unit Testing.
Data-AutoTest-Result-Case
Holds results of tests; part of Automated Unit Testing. See About Automated Unit Testing.
Data-AutoTest-Result-Suite
Holds results of tests; part of Automated Unit Testing. See About Automated Unit Testing.

Data-C

Class

Description

Data-Circumstance-Duplicates dot
Supports problem reporting with rules that contain circumstanceproperties. Linked to a view in the PegaRULES database. See Database views.
Data-ConnectHTTPStatus
Supports runtime operations of Connect HTTP rules. About Connect HTTP rules.
Data-Corr-Email dot
Holds outgoing email correspondence. Can be referenced in Correspondence Type rules.
Data-Corr-Fax dot
Holds outgoing fax correspondence. Can be referenced in Correspondence Type rules.
Data-Corr-Letter dot
Holds the body of letter or fax correspondence. Can be referenced in Correspondence Type rules.
Data-Corr-PhoneText dot
Holds the body of phone text correspondence. Can be referenced in Correspondence Type rules.
Data-Cover-Associations
Not used.
Data-Customer
Deprecated. Use Data-Party-Person or Data-Party-Org.

Data-D to Data-O

Data-DBSummary-RDBList
Referenced in the RDB-List method for reports.
Data-DBSummary-Union
Not used.
Data-DecisionLogicSupport
Supports decision rule form processing.
Data-DecisionRulePath
Supports decision rule form processing.
Data-DisplayProperties
Abstract. Supports harness operations.
Data-EmailAttachments
Supports creation of outgoing email attachments (as part of correspondence) from work item attachments.
Data-Email-Receive
Not used.
Data-Event-Pattern
Supports scheduled processing of Agent Schedule instances (Data-Agent-Queue).
Data-Find
Supports full-text search.
Data-Find-Results
Supports full-text search.
Data-Gadget
The Applies To class of activities that define the gadgets in the tabs of the portal. Referenced in portal rules. No instances.
Data-Inventory
Supports the Import wizard.
Data-IS-ClientSimulation
Supports interactive testing of service rules with the Run toolbar button.
Data-Management-Target
Supports the Product Migration wizard.
Data-MO
Reserved. Supports models for flows based on flow rule category.
Data-MO-Activity
Reserved. Supports models for flows based on flow rule category.
Data-MO-Connector
Reserved. Supports models for flows based on flow rule category.
Data-MO-Event
Reserved. Supports models for flows based on flow rule category.
Data-MO-Freeform
Reserved. Supports models for flows based on flow rule category.
Data-MO-Gateway
Reserved. Supports models for flows based on flow rule category.
Data-MOD
Reserved. Supports models for flows based on flow rule category.
Data-MQMessage dot
Contains WebSphere MQ messages created through operation of the Service MQ or Connect MQ interfaces.
Data-Optimization-Info
Supports the Process Optimizer.

Data-P to Data-R

Data-Parse-State
Supports Rule-Parse-Structured processing. See About Parse Structured rules.
Data-Party-Com dot
Used in work party configuration, generally for businesses that have a domain ending in ".com." Can be referenced in Work Parties rule instances. Contains the PartyDisplay HTML rule that can appear on the work item entry form. When users complete the party fields on a work item entry form that uses a Rule-Obj-WorkParties rule referencing this class, they create instances of this class.
Data-Party-Gov dot
Used in work party configuration. Can be referenced in Work Parties rule instances. Contains the PartyDisplay HTML rule that can appear on the work item entry form. When users complete the party fields on a work item entry form that uses a Rule-Obj-WorkParties rule referencing this class, they create instances of this class.
Data-Party-Operator dot
Used in party configuration. Can be referenced in Work Parties rule instances. Contains the PartyDisplay HTML rule that can appear on the work item entry form. When users complete the party fields on a work item entry form that uses a Rule-Obj-WorkParties rule referencing this class, they create instances of this class.
Data-Party-Org dot
Used in party configuration for nonprofit organizations. Can be referenced in Work Parties rule instances. Contains the PartyDisplay HTML rule that can appear on the work item entry form. When users complete the party fields on a work item entry form that uses a Rule-Obj-WorkParties rule referencing this class, they create instances of this class.
Data-Party-Persondot
Used in party configuration. Can be referenced in Work Parties rule instances. Contains the PartyDisplay HTML rule that can appear on the work item entry form. When users complete the party fields on a work item entry form that uses a Rule-Obj-WorkParties rule referencing this class, they create instances of this class.
Data-PerfTest
Used by the Performance Test utility to support performance benchmarking.
Data-Portal
Contains facts about your portal appearance and gadgets appearing on your portal.
Data-Project-Task
A data table that supports the project worklist. See About the Project Management communication link.
Data-Report-Agingdot
Contains data supporting aging reports.
Data-Report-Categorydot
Supports the Report Browser display and interactions.
Data-Rule-ClassAncestordot
Internal. Facilitates high-performance rule resolution.
Data-Report-Shortcutdot
Supports the Report Browser display and interactions.
Data-Rule-Lockingdot
Supports reporting on checked-out rules, through the pcbv4_rule_lockingdatabase view.
Data-Rule-Overrides dot
Supports reporting through the prbv4_rule_overrides database view.
Data-Rule-Summary dot
Supports searching and reporting on rules through the pr4_rule_vw database view.  See Reporting on rules.
Data-RuleSearch
Supports the full-text search facilities. In a multinode system, uses Connect SOAP and Service SOAP rules. See Full text search.

Data-S to Data-W

Data-Saved-Context dot
Contains saved requestor contexts.
Data-Scan-Configuration
Retains scanner configuration details.
Data-SecurityVAUtility
Supports the Rule Security Analyzer.
Data-ServiceMessage
Used only passing service parameter data at run time, and by Service Email rules for attachments.
Data-ServiceSimulation
Supports testing of service rules with the Run button.
Data-Spellchecker
Supports spell-checking processing.
Data-SystemStart dot
Not used.
Data-TRACERSettings
Holds a user's settings for the Tracer tool.
Data-UI-Component-*
Internal classes supporting presentation of user forms derived from harnesses, sections, and flow actions.
Data-UniqueID dot
Stores the next available unique work object or other ID number.
Data-Upgrade
Reserved. Used internally only.
Data-VERB-Registry
Not used.
Data-VERB-Repository
Not used.
Data-Work-History dot
Supports reporting through the pcv4_work_history database view.
Data-Work-Summary
Supports advanced reporting about work items using full-text search indexes or other custom searches. See Full text search.
Data-WorkAttach-ECM
Class of work item file attachments that are saved in an external CMIS system, rather than in the PegaRULES database.
Data-WorkAttach-File
Contains files attached to work objects, unless such attachments are stored in an external CMIS system.
Data-WorkAttach-Note
Contains text notes attached to work objects.
Data-WorkAttach-ScanDocument
Contains scanned documents (TIFF images) attached to a work item. See About Pega Document Scanning.
Data-WorkAttach-ScreenShot
Contains Screen Shot image attachments to a work item.
Data-WorkAttach-URL
Contains URL attachments to a work object.

class name prefix

A class name prefix is used during pattern inheritance when the Pega 7 Platform searches the classstructure to find a rule using a sequence of prefixes of the class name. The hyphen delimits segments of the name.


Class layers

Classes define the applicability, or scope, of a rule instance. Knowledge of the different layers of classes and their inheritance relationships is important as you develop applications.

Framework classes

Framework classes define a common work-processing foundation that you extend and modify as implementation applications for an organization, division, or organization unit. Framework classes belong to the framework layer.
For example, the MyCo enterprise makes auto loans and has an auto loan framework application that contains all of the assets needed for the basic auto loan process. Then, the MyCo enterprise develops two implementations built on the auto loan framework to meet the specific requirements of its two divisions: a commercial business line and a personal line.
Using the New Application wizard, you can build a new implementation application and its implementation classes on a framework application. You can reuse some or all of the work and data class structure of the framework. From the new implementation application, you can use the Designer Studio landing pages, explorers, rule forms, and reports to reuse many of the rules and data objects inherited from the built-on framework layer. For example, while developing a process, you can select specifications or processes in a framework ruleset for reuse or customization in the current application.
When you build an implementation application, you can also create a reusable framework application built on the same framework. You can extend the framework so that it is used by other implementations that you might create later. As a best practice, reuse framework rules and create only specialized rules in your implementation application. For example, use report definitions in the framework classes that run with the corresponding implementation classes.
Note: Framework classes are different from Strategic Applications, which are starter applications for specific industries or lines of business.

Implementation classes

Implementation classes define the extension, reuse, and specialization of assets in a framework layer to meet the business requirements of an organization, division, or organization unit. For example, you can build two division-level implementations—business auto loan and personal auto loan—on an organization's auto loan framework layer.
Implementation classes belong to the implementation layer. Typically, cases that are related to application processes are instances of case type classes that belong only to the implementation layer.

Organization classes

Organization classes contain enterprise-wide data assets and assets that must be reused for business logic. Data assets include classes and rules for data stored in the system, and classes and rules for access to data in external systems by using connectors. Business logic assets include standard properties, decision tables, and service-level agreements.
For example, the MyCo enterprise might want to reuse, on an enterprise-wide basis, the property for employee serial number. By reusing this property, the various applications across the enterprise that an employee uses can consistently rely on the same serial number property for the same employee.
Organization classes belong to the organizational layer. In most configurations, your implementation and framework layers inherit (by pattern inheritance) from organization classes.
Tip: To identify the inheritance relationships among these classes, you can right-click the class name in the Application Explorer and select the Inheritance option.