Back ForwardHow to set up a declarative index

Use a declarative index — the rows of database tables that are maintained by Declare Index rules — to speed access to instances that have specific property values, especially embedded properties that can't be exposed.

NoteAfter you implement a declarative index, reports can use the indexed property value as a selection criteria. For example, if an array of embedded Universal Product Code (UPC) codes in a work object are indexed, you can report on all work objects containing a specific UPC code. Reference the index class on the Contents and Join tabs of the List View form or Summary View form.

Declarative Wizard approach

To create indexes for an embedded property in a Page List, Page Group, or Page property, you can use the Declarative Index wizard. For an example, see Pega Developer Network article PDNPRKB-25278 How to create Declarative indexes for embedded properties.

The wizard requires special database privileges. See About the Declarative Index wizard.

Manual approach

Advanced featureIn some organizations, policies or practices may prevent use of the Declarative Index wizard, which requires a database account with special schema privileges.

Working together, Process Commander developers and a database administrator (DBA) can define an Index- class and a Declare Index rule to improve access to data not in an exposed column of a database table.

  1. Identify the property or properties on the source object that are to make up the index instance.
  2. Create a concrete class derived from the Index- base class that will contain the new index instances. For concrete classes derived from the Index- base class, the key consists of three properties pxInsIndexedKey, pxIndexCount, and pxIndexPurpose, in that order.
  3. Determine which database table will hold the new indexes. Create the database table if necessary and associate the table with the class through a Database Table instance. The three key properties must be exposed columns in the table. MAYED 11/1/07
  4. Define Single Value properties in the new index class to hold the values of the source instance properties. Confirm with your database administrator that all these properties are exposed columns in the database, or modify the database schema as necessary.
  5. Choose a purpose name for the Declare Index rule.
  6. Create a Declare Index rule, recording the source of each property value and its corresponding index property name.

Index processing starts as soon as you save the Declare Index rule.

Notes

TipAs a best practice, do not create declarative indexes for top-level Single Value properties.

Definitions declaration, Index base class
Related topics About Declare Index rules
About the Declarative Index wizard
How to detect when the number of declarative indexes exceed a specified threshold
Standard rules Standard classes derived from the Index- base class

UpSysAdmin category