You are on page 1of 46

10/29/2017 How to configure declare index in Pega

Pega Knowledge Sharing


A DROP FROM OCEAN

Home About Contact Privacy Policy

How to con gure Declare index in Pega


step by step tutorial
Posted on June 16, 2017 by Premkumar G
Introduction

In this post, we will learn how to configure declare index in Pega. Its highly recommend to visit my previous post on declare index rule

http://myknowpega.com/2017/06/16/what-is-declare-index-in-pega/

Here let us see the tutorial how to implement the declare Index in Pega.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 1/46
10/29/2017 How to configure declare index in Pega

What are the pre-requisites to configure declare index in Pega?

Imagine the below scenario, address details are captured in a page property Address
we need the expose Street, City & state in separate table for reporting purpose.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 2/46
10/29/2017 How to configure declare index in Pega

You can see the property structure below

1. Create new properties ( 7 properties)

Single value properties Customer name, Phone number and Age created in work class

Page property Address created in work class

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 3/46
10/29/2017 How to configure declare index in Pega

Street, City & State created in Address page definition MyKnowPega-Data-Address.

Here we added the properties under Address page property.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 4/46
10/29/2017 How to configure declare index in Pega

2. Create a simple starter flow

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 5/46
10/29/2017 How to configure declare index in Pega

3. In the flow action create a simple screen to hold the all six values.

Note: For address, Refer the fields as .Address.Street, .Address.City & .Address.State

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 6/46
10/29/2017 How to configure declare index in Pega

Now lets run the flow and enter valid details.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 7/46
10/29/2017 How to configure declare index in Pega

Submit it.

Check the same in database worktable for C-1

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 8/46
10/29/2017 How to configure declare index in Pega

You can see the details get persisted in DB.

Age, Customer Name, Phone Number are populated in exposed columns.

The address details are compressed in BLOB.

Good
Note: I already exposed those 3 columns explicitly in worktable

Requirement

User wants to report on the customer details including the address values.
Since the address values are stored in BLOB, it a ects reporting performance.

So we decided to create Index for address properties and expose it as separate columns in Index table.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 9/46
10/29/2017 How to configure declare index in Pega

How do we start configuring Declare Index?

Step 1: Create an Index table.

Table name Index_Address

Note: I am using Postgres SQL. I got the admin rights to create table. If there is privilege restriction, kindly consult with DBA team
to create a new Index table along with columns.

Dont forget to include the main key columns and pzInskey

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 10/46
10/29/2017 How to configure declare index in Pega

I have successfully created a new table. You can verify it below

New table with 10 columns.

Step 2: create a new index class in Pega

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 11/46
10/29/2017 How to configure declare index in Pega

Provide the required properties as keys. You can visit my previous post to get the complete information about Keys.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 12/46
10/29/2017 How to configure declare index in Pega

Step 3: Create a new datatable instance

Note: Remember you can also use database class mapping wizard for mapping.

For more info, please visit my post on database class mapping wizard.

Here I am going to do manually.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 13/46
10/29/2017 How to configure declare index in Pega

Set the database name as PegaDATA & table name as Index_Address

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 14/46
10/29/2017 How to configure declare index in Pega

Step 4: Create the three properties in Index-address class.

single value properties Street, City, State.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 15/46
10/29/2017 How to configure declare index in Pega

Step 5: create a new declare Index rule

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 16/46
10/29/2017 How to configure declare index in Pega

Set,

Source page context .Address

Source page context MyKnowPega-Data-Address

Index class to write Index-Address

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 17/46
10/29/2017 How to configure declare index in Pega

Properties for Indexing and mapping

Set the source property from address page in le hand side and Index property on right hand side.

How simple is this.We have successfully configured declare index in Pega.

Lets test it.

Step 1:Run the starter flow.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 18/46
10/29/2017 How to configure declare index in Pega

Step 2:Provide some valid values in the customer details screen.

Submit the screen.

Step 3: open the DB and verify the record in work table. ( C-7)

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 19/46
10/29/2017 How to configure declare index in Pega

Customer Name, Age, phone number values are set correctly.

Now lets check out index table.

Step 4: Open the Index-Address table and check the address values.

Guess what !!

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 20/46
10/29/2017 How to configure declare index in Pega

Now let us test it di erently

Step 1: Create test activity.

Step 2: In the first step Open the C-7 work item

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 21/46
10/29/2017 How to configure declare index in Pega

Step 3: In the second step Property-set on address values

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 22/46
10/29/2017 How to configure declare index in Pega

Step 4: In the last step Obj-save with commit.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 23/46
10/29/2017 How to configure declare index in Pega

So what we are doing here? We are manually updating the address values. When we save the work item, Index table should be updated with
new address values right? Lets check it

Step 5:Run the activity from other actions button.

Step 6: Check the record in the index table. Pakka

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 24/46
10/29/2017 How to configure declare index in Pega

Step 7: Lets do one thing,

Update the test activity to delete the workitem, but dont commit now.
Leave immediate unchecked

This is just a one step activity.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 25/46
10/29/2017 How to configure declare index in Pega

If you see both the work table & index table record still persists and not deleted.

The reason is declare index fired only when the DB action is committed in database

Step 8: Check immediate & run the same activity.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 26/46
10/29/2017 How to configure declare index in Pega

Step 9: Check in the Index-Address table

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 27/46
10/29/2017 How to configure declare index in Pega

Its gone disappeared.

what are the things to remember when configuring a new Declare Index in Pega?

1. Create a new Index table.

If you dont have the privilege to create a new table, seek DBA team advice and get it done.

2. Create a new Index class Include 3 key properties

pXInsIndexedInskey, pxIndexcount & pxIndexPurpose are the three key properties

3. Create new properties that we need to expose in Index table

Create those properties under Index class.

4. Create a new database table instance and map the Class with the Index table created in DB.
5. Finally create declare Index rule and configure all the details
http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 28/46
10/29/2017 How to configure declare index in Pega

If you need to know the other declarative rules, check out the below category

http://myknowpega.com/category/declarative-rules

See ya in next post

Posted in Declarative rules, System AdministrationTagged declarative processing, declare index in pega, Index table, property optimization in
Pega

What is Declare index in Pega? How to configure an email account & send outbound email from Pega?

30 thoughts on How to con gure Declare index in Pega step by step


tutorial

Suresh
JUNE 16, 2017 AT 5:11 PM
Xlent bro
Reply

Premkumar G
JUNE 16, 2017 AT 7:47 PM
Thank you so much, Suresh.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 29/46
10/29/2017 How to configure declare index in Pega

Ramanareddy
JUNE 16, 2017 AT 5:30 PM
HI prem,
Good post on declare index.My all quires are cleared..Keep it up
Reply

Premkumar G
JUNE 16, 2017 AT 7:50 PM
Thank you so much for your appreciation, Ramanareddy.

Glad that you find it useful.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 30/46
10/29/2017 How to configure declare index in Pega

Raghav
JUNE 20, 2017 AT 12:20 PM
Excellent post Prem.
Reply

Premkumar G
JUNE 20, 2017 AT 3:06 PM
Thank you so much, Raghav.

Bramha
JUNE 21, 2017 AT 1:30 PM
Good Explanation Bro
Reply

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 31/46
10/29/2017 How to configure declare index in Pega

Premkumar G
JUNE 22, 2017 AT 4:32 PM
Thank you so much, Bramha

Vinod
JUNE 27, 2017 AT 8:59 AM
Awesome Dude..
Reply

Premkumar G
JUNE 29, 2017 AT 1:45 PM
Thank you so much, Vinod.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 32/46
10/29/2017 How to configure declare index in Pega

Sahithi
JULY 6, 2017 AT 6:10 PM
The whole concept of Declare Index is explained very clearly and
easily understandable. Thanks !!
Reply

Premkumar G
JULY 8, 2017 AT 5:13 PM
Thank you so much for your appreciation, Sahithi.
Glad that you like it.

MastanReddy Avula
JULY 20, 2017 AT 9:03 AM
hi praveen
can you explain what is the di b/w stacked and default in dynamic

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 33/46
10/29/2017 How to configure declare index in Pega

layout
Reply

Premkumar G
JULY 20, 2017 AT 10:35 AM
Hi Mastan,
You can find the answer on your own :). Open you
application skin -> Component styles -> Dynamic layouts
-> Formats ( Inherited)
Check both stacked and default. You will see some
di erence in width and height.
Note: Columns per row is 1 in both the formats. Its like
Default behaves like a stacked format.
Hope you are clear now :). By the way, I am Prem,
not Praveen

Eshwar
JULY 29, 2017 AT 2:00 AM
http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 34/46
10/29/2017 How to configure declare index in Pega

Many Thanks for Explanation Prem


Reply

Premkumar G
AUGUST 1, 2017 AT 4:25 PM
You are most welcome, Eshwar.

Rupesh
AUGUST 1, 2017 AT 1:21 AM
Hi Prem,
How did you expose the 3 properties explictly in work table?
Thanks
Rupesh M
Reply

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 35/46
10/29/2017 How to configure declare index in Pega

Premkumar G
AUGUST 21, 2017 AT 4:46 PM
exposing properties You can either get the help from
DBA team to create new columns in DB table ( if you dont
have access) else you can manually create new columns.
You need to save the data table instance once. Now the
mapping is done.
There is another simple option, in the property rule
Other action button -> Optimize. On completing the
wizard, a new column will be created in the
corresponsing DB table.

Manoj
SEPTEMBER 3, 2017 AT 10:28 PM
Good post
Really appreciated
Keep it up bro.
Reply

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 36/46
10/29/2017 How to configure declare index in Pega

Premkumar G
SEPTEMBER 8, 2017 AT 10:20 AM
Thank you so much for your appreciation, Manoj.

swapna
SEPTEMBER 7, 2017 AT 4:28 PM
No posts!!!!!!!!!!!!!! Its a long gap.
Reply

Premkumar G
SEPTEMBER 8, 2017 AT 10:11 AM
Oh, Im so sorry for the delay, Swapna. Ill try to post
something new within this week. Im a little busy, but Ill
definitely post a new post soon. Stay tuned.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 37/46
10/29/2017 How to configure declare index in Pega

Shiv
SEPTEMBER 18, 2017 AT 1:23 PM
Excellent Work. Looking forward to gain more knowledge from your
posts.
Reply

Premkumar G
SEPTEMBER 21, 2017 AT 4:05 PM
Thank you so much, Shiv.
Stay tuned for more posts.

Sidharth
http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 38/46
10/29/2017 How to configure declare index in Pega

SEPTEMBER 20, 2017 AT 11:38 PM


Good presentation and very useful
Reply

Premkumar G
SEPTEMBER 21, 2017 AT 4:01 PM
Thank you so much for your appreciation, Sidharth.

Abdul Qader Mohammed


OCTOBER 2, 2017 AT 3:14 AM
Thank You PREM..!!! Probably this is the best place to learn PEGA.
Reply

Premkumar G
http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 39/46
10/29/2017 How to configure declare index in Pega

OCTOBER 10, 2017 AT 1:59 PM


You are most welcome, Abdul.
Im feeling elated on reading your comment.
Thank you so much for your appreciation.

pratik
OCTOBER 10, 2017 AT 1:09 PM
all think are good .but why you always written one nameAarti<>
Reply

Premkumar G
OCTOBER 15, 2017 AT 10:54 PM
Ha Ha <3

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 40/46
10/29/2017 How to configure declare index in Pega

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Website

POST COMMENT

Currently you have JavaScript disabled. In order to post comments, please make sure JavaScript and Cookies are enabled, and reload
the page. Click here for instructions on how to enable JavaScript in your browser.

Notify me of follow-up comments by email.

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 41/46
10/29/2017 How to configure declare index in Pega

Notify me of new posts by email.

Subscribe to Blog via Email


Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 969 other subscribers.

Email Address

Email Address

SUBSCRIBE

Search

Categories
Application Structure (3)
Enterprise Class Structure in Pega
Framework and Implementation application with example
What is rule availability in Pega?

Authorization (3)
http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 42/46
10/29/2017 How to configure declare index in Pega

Access Deny & Privilege in Pega


Access roles & ARO configuration in Pega
Configure an access group in Pega

Data model (6)


Aggregate properties and use of Indexes inside aggregate properties in Pega
Data Pages in Pega
Data type and Cascading control example in Pega
Database class mapping wizard in Pega
Dynamic referencing and dynamic class referencing (DCR) in Pega
How to use data transform in Pega?

Declarative rules (4)


Declare Trigger & Declare On Change in Pega
How to configure declare expression in Pega
How to configure Declare index in Pega - step by step tutorial
What is Declare index in Pega?

Integration (10)
Configure Service SOAP in pega
Connect SOAP in Pega
How do you configure Connect-File in Pega
How to configure an email account & send outbound email from Pega?
How to configure Connect-REST in Pega?
How to configure Service Package in Pega
How to configure Service-REST in Pega?
WSDL Structure & its relationship with Pega rules
XML Mapping rules - XML stream
XML Mapping rules extended - Parse XML

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 43/46
10/29/2017 How to configure declare index in Pega

Organizational rules (1)


Configure an Operator ID in Pega

Process (5)
How to configure flows in Pega?
How to configure Service Level Agreement(SLA) in Pega?
How to configure Split Join, Split for Each & Spin O in flow rule?
Split Join, Split for Each & SpinO tutorial in Pega
What is workparty in Pega?

System Administration (5)


Agent and Agent Schedule in Pega
Expose a property in Pega
How to configure Declare index in Pega - step by step tutorial
What are the requestor types in Pega?
What is Declare index in Pega?

Technical (5)
Activity methods on clipboard pages
Activity methods on clipboard properties
Obj and RDB methods in Pega
Obj and RDB methods in Pega - Extended
What is circumstance in Pega?

User Interface (5)


How to configure dynamic layout Pega UI?
how to use formats & mixins in skin rule
Server side and Client side validation in Pega
What are the validation rules in Pega?
http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 44/46
10/29/2017 How to configure declare index in Pega

What is float concept in Pega UI?

Recent Posts
Dynamic referencing and dynamic class referencing (DCR) in Pega October 15, 2017
Expose a property in Pega September 17, 2017
Connect SOAP in Pega August 21, 2017
Obj and RDB methods in Pega Extended August 9, 2017
Obj and RDB methods in Pega August 9, 2017
Configure Service SOAP in pega August 2, 2017
Activity methods on clipboard properties July 29, 2017
Aggregate properties and use of Indexes inside aggregate properties in Pega July 24, 2017
XML Mapping rules XML stream July 18, 2017
XML Mapping rules extended Parse XML July 18, 2017
Activity methods on clipboard pages July 10, 2017
WSDL Structure & its relationship with Pega rules July 4, 2017
How to use data transform in Pega? July 1, 2017
What is rule availability in Pega? June 26, 2017
What is circumstance in Pega? June 25, 2017

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 45/46
10/29/2017 How to configure declare index in Pega

// Proudly powered by WordPress | Theme: blogsixteen

http://myknowpega.com/2017/06/16/configure-declare-index-pega-step-step-tutorial/ 46/46

You might also like