Back Forward Working with the PegaRULES database — Views and Indexes

Working with the PegaRULES database

Show all 

Six database views are defined in the database to support searching and reporting.

CautionWhen an existing Process Commander system is upgraded to a new version, SQL scripts may update the standard tables. To avoid possible collisions or other issues with future upgrades, make schema changes (other than simple new columns) only to copies of the standard tables and views. Adjust table rows and Data-Admin-DB-Table mappings to reference your copies. This is especially important for database views, as upgrade processing may drop view definitions and add revised view definitions.

Views for assignments

Two views support reporting on work objects with open assignments. (For reporting directly on assignments, see Tables for assignments.) As a single work object may be part of multiple simultaneous flow executions, it may have more than one assignment outstanding.

NoteIf you extend the initial PegaRULES database scheme to store work object in a new table other than the default pc_work table, also adjust these view definitions to include the new table.

View

Description

pcv4_assignment_summary

Associated with the Data-Assignment-Summary class, this view supports custom worklist display. This join contains a row for each row in the pc_assign_worklist table (assignments sent to operator worklists), but with additional columns supporting reporting and custom worklists.

For example, the standard list view rule Data-Assignment-Summary.Worklist_CustomerRequest produces a custom worklist for PegaSample work objects of type CustomerRequest. See Pega Developer Network article PDNPRKB-16912 How to customize the display of a worklist for more information.

pcv4_assignmentwb_summary

This view is associated with the Data-Assignment-WBSummary class. This join supports custom displays of workbasket contents, through techniques similar to those for custom worklists.

Work History view

The pcv4_work_history table is associated with the Data-Work-History class, and provides a consolidated means to reporting on work object history across all applications and work pools. The sort order of this view is:

This sequence causes all the history instances for a work object to appear in sequence. This view is not used in standard reports. (For reporting directly on work object history, see Tables for History.)

Views for rules

Five views support searching and reporting on rules:

View

Description

pwbv4_circumstance_duplicates Associated with the Data-Circumstance-Duplicates class. It supports the report on Circumstance Property Issues.
pwbv4_rule_locking Associated with the Data-Rule-Locking class. It contains a row for each rule checked out by a developer, and supports reporting on checked-out rules.
pwbv4_rule_overrides Not used in V6.1. Associated with the Data-Rule-Overrides class.
pr4_rule_vw A materialized database view, populated by triggers and associated with the Data-Rule-Summary class. It provides access to the information in all the rule tables, allowing rapid rule searches by visible key (pxInsName column). PRKB-19211 and SR-1373 In this view, the pyClass column  — not the usual pxObjClass column — identifies the Process Commander class of a row. B-20590 See How to report on rules of multiple types.
pwbv4_rule_summary This view supports special rule reporting on personal development systems only. In Version 5.1 and later production systems, the pr4_rule_vw view replaces this view.OLSOK 3/13/06 - PERSONAL EDITION only?

Database Indexes

Database indexes provide fast alternate access to rows of tables.

When initially installed, V5.5 contains just over 100 database indexes. Many indexes that provide fast access to rule information using alternate (secondary) keys; these indexes have low or zero turnover (adds and deletes) in a production system. Other indexes support system operations such as locking and usage tracking, and may have high turnover.

For example, the database index flow_pyClassName associates flow rule names to Work- classes, and changes only when flows are added or deleted.

NoteDon't confuse database indexes with instances of concrete classes derived from the Index- base class. The purpose and function of both mechanisms are similar, but database indexes are supported by database software.

Index- objects, created by Declare Index rules (Rule-Declare-Index rule type), support application-specific access. For information on the tables that support Index- objects, see Working with the PegaRULES database — Index tables. SR-1343 B-16879 V5.1 add indexes on pr_history

Definitions check out, circumstance, referencing rules, view, visible key
Standard rules Atlas — Standard classes derived from the Index- base class

HomeWorking with the PegaRULES database