Show
all
Ten database tables normally contain rules. Rule instances are heavily
indexed to speed the searching operations used in rule resolution.
Introduction
The pzInsKey value for rules is formed by
concatenating the values of several properties:
- pxObjClass — The rule type, for example
RULE-OBJ-PROPERTY or RULE-HTML-SECTION
- The value of each key part, from the properties listed in the
Class rule for the rule type
- pxCreateDateTime — The creation date and
time in internal format, preceded by a # character, for example
#20050830T145617.018 GMT for August 30, 2005 at 14:56:17
Coordinated Universal time.
For example, the pzInsKey value for the standard
property Work-.pyStatusWork is:
RULE-OBJ-PROPERTY WORK- PYSTATUSWORK
#20040927T235233.165 GMT
The RuleSet and version are not part
of this value. Rules of the same name (same visible key parts) in
different RuleSets or versions have a different creation date and
time.
Property
rules
The pr4_rule_property
table contains property rules
(Rule-Obj-Property rule type) and property qualifier
rules (Rule-Obj-Property-Qualifier rule type).
Item
|
Description
|
Database table |
pr4_rule_property
|
pzInsKey elements |
pxObjClass
pyClassName
pyPropertyName
pxCreateDateTime
|
Rows |
About 6,000 standard properties, plus properties in your
application RuleSets.
|
Indexes |
Through multiple indexes, property rules can be selected
by Applies To class
(pyClassName), RuleSet, RuleSet Version, and
visible key (pxInsName).
|
For example, the pzInsKey value for the property
PegaSample.pyDueBy is:
RULE-OBJ-PROPERTY PEGASAMPLE PYDUEBY
#20040927T235125.886 GMT
Flow rules
The pr4_rule_flow
table contains flow rules
(Rule-Obj-Flow rule type).
Item
|
Description
|
Database table |
pr4_rule_flow
|
pzInsKey elements |
pxObjClass
pyClassName
pyFlowName
pxCreateDateTime
|
Rows |
About 150 standard flow rules, plus flow rules in your
application RuleSets.
|
Indexes |
Through multiple indexes, flow rules can be selected by
Applies To class (pyClassName),
RuleSet, RuleSet Version, and visible key
(pxInsName).
|
For example, the pzInsKey value for the property
Work-.StandardBasicWork is:
RULE-OBJ-FLOW WORK- STANDARDBASICWORK
#20050922T182708.044 GMT
For each flow rule, the system saves a JPG
image of the Visio diagram in a binary file rule
(Rule-File-Binary rule type). The pyVisioRFB
property holds the pzInsKey value of that binary file
rule.
Field value
rules
The pr4_fieldvalue
table contains field value rules
(Rule-Obj-FieldValue rule type). NOT
pr4_rule_fieldvalue
Item
|
Description
|
Database table |
pr4_rule_fieldvalue
|
pzInsKey elements |
pxObjClass
pyClassName
pyFlowName
pxCreateDateTime
|
Rows |
About 2,000 standard field value rules, plus field value
rules in your application RuleSets.
|
For example, the field value rule
Work-.pyStatusWork.New defines a value used in the Local
List for the work object status property pyStatusWork.
The pzInsKey is:
RULE-OBJ-FIELDVALUE WORK- PYSTATUSWORK!NEW
#20040928T000337.867 GMT
Rule-File-*
rules
Instances of four rule types are stored as rows of the
pr4_rule_file
table:
- Rule-File-Binary
- Rule-File-Bundle5.4
- Rule-File-Form
- Rule-File-Text
- Rule-File-eForm
Item
|
Description
|
Database table |
pr4_rule_file
|
pzInsKey elements |
pxObjClass
pyClassName
pyFileName
pyFileType
pxCreateDateTime
|
Rows |
About 4,000 rows for standard Rule-File-
rules, plus other rows for rules in your application
RuleSets.
|
For example, the binary file rule named
webwb.image19.gif holds the Compuserve GIF file used on
the standard log-on form. The pzInsKey value for the this
rule is:
RULE-FILE-BINARY WEBWB IMAGE19!GIF
#20040107T153125.857 GMT
For a binary file rule, the system converts
the binary file (such as a JPG image or Windows DLL) to text
characters using Base64 coding and stored within the
pzPVStream column (Storage Stream, or BLOB). Similarly
for an eForm file rule, a PDF file is stored within the
pzPVStream column.
Generated
rules
Instances of the Rule-Generated-Activity and Rule-System-Generated-Access classes contain
system-generated information. These rule instances are stored as rows
in the pr4_rule_sysgen
table. IS THIS
OBSOLETE?
Class
rules
Report shortcuts and report category
rules
Shortcut rules and category rules, which support the the Report Browser, are stored in the
pr4_rule_shortcut
table.
AutoTest
rules
Rules of three rule types supporting the Automated Unit Testing facility (Rule-Autotest-) are stored in the
pr4_rule_autotest
table.
Rules of other
types
By default, rules of types other than those presented above are
stored in the pr4_rule
table.
If you create a custom rule type, also
create a dedicated database table to hold the rules. This eliminates
the risk that future Pegasystems upgrades to the standard database
tables listed above may interfere with the exposed columns and other
details needed by the custom rule type. See Pega Developer Network
article PRKB-17585 Save custom rule types in a dedicated table in
the PegaRULES database.
Reporting on
rules
Rule resolution processing and reporting on rules depends on views
and indexes as well as these tables.
Working with the PegaRULES database