1.

What is the Declare Index in Pega? How can you set up a declare index?

Answer»

In Pega, Declare Index is a rule TYPE that exposes aggregate properties like Page/ List/ Group for reporting purposes.They are rule instances of the Rule-Declare-Index.  When an Insert/ Update/ Delete operation on the work object is followed by a commit, it helps to populate the corresponding index table. They can be found under the SysAdmin Category in Records explorer.

There are two ways to set up a declare index in Pega. They are as follows :

Using the Declarative Wizard Approach : 

  1. Prepare ahead of time to identify the RuleSet and Version that will contain the wizard's rules.
  2. Check existing Declare Index rules to SEE if the property has already been indexed. (Do not try to index a property that has previously been indexed with this wizard.)
  3. In the Application Explorer, look for the embedded property. A Page, Page List, or Page Group property can contain the property.
  4. To get to the Application Explorer context menu, right-click. From the menu, choose Index Property.
  5. Select a RuleSet and Version in the FIRST pop-up window to store the rules generated by this wizard. Submit the form.
  6. The class, property, and Declare Index rule produced are identified on a confirmation form. The indexing process has begun. To review the regulations, click the pencil symbol.

Using the Manual Approach :

  • Determine which property(ies) on the source object will be used to create the index instance.
  • Create a concrete class that extends the Index base class and holds the new index objects. The key for concrete classes generated from the Index base class is made up of three attributes in that order: pxInsIndexedKey, pxIndexCount, and pxIndexPurpose.
  • Determine which database table the new indexes will be stored in. If NECESSARY, create a database table and associate it with the class using a Database Table instance. The table's three important characteristics must be visible columns.
  • In the new index class, define Single Value attributes to RETAIN the values of the source instance properties. Confirm that all of these characteristics are exposed columns in the database with your database administrator, or change the database schema as needed.
  • Choose a name for the Declare Index rule.
  • Create a Declare Index rule, noting the source of each property value and the index property name it corresponds to.


Discussion

No Comment Found