Question
JPMC
IN
Last activity: 16 Oct 2018 12:03 EDT
optimizing a embedded property within a page
Hi All,
We have few properties embedded within a single page, which we want to optimize. But we do not want to use the optimize tool (i.e. right click property and click on optimize for reporting) since we do not want this to be done by all developers also want to have a track of changes done, which will help in koving stuff to next env.
Thus we want to optimize these properties by running the SQL script by DBA. what are the steps if we want to do this manually and how do we get the sql.
I know for pagelist properties, its by creating index rules and index classes and exposing properties in that index table, but want to know what is the process for single page level properties?
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Hi Ashish,
As you don't have any issues optimizing a single value property within work class from the backend. You can use the same approach to optimize single value properties with in a page with one extra step.
Now suppose we have two single page called "Customer" and "product" and each having embedded property called Name.
Now when we optimize these Name property within the single page it will be creating columns like Name_1 and Name_2, if we just add columns in DB without using the wizard, how will PRPC know which embedded property is related to Name_1 and which is is for Name_2. What is that extra mapping that we can do manually for PRPC to know that.
Open the work class definition and use external mapping tab. There you can mention the added column names from work table to the corresponding page property.
Hi Ashish,
As you don't have any issues optimizing a single value property within work class from the backend. You can use the same approach to optimize single value properties with in a page with one extra step.
Now suppose we have two single page called "Customer" and "product" and each having embedded property called Name.
Now when we optimize these Name property within the single page it will be creating columns like Name_1 and Name_2, if we just add columns in DB without using the wizard, how will PRPC know which embedded property is related to Name_1 and which is is for Name_2. What is that extra mapping that we can do manually for PRPC to know that.
Open the work class definition and use external mapping tab. There you can mention the added column names from work table to the corresponding page property.
Here I have two page properties Customer & Product defined in my work class SSA-Sandbox-Work-ServiceRequest. Both the pages contain a single value property Name.
Name_1 is the column added in work table by DBA for customer name and Name_2 is the product name. Define a relation using external mapping as shown above and Pega will know which Name property is related to what page.
In general, the external mappings for page level properties will be automatically added to class definition even with usage of Property optimization wizard.
Hope this helps you. Let me know if you still have any follow-up queries so that others can also pitch in.
Pegasystems Inc.
US
Hi Ashish,
Doing a column creation from backend DB is not a good idea as there would be issues with the class map, updates, column population issues etc.
It is strongly recommended to use Property optimization wizard tool which does the following.
1. Get all the inherited classes(can select in which class context property needs to be optimized)
2. Add's a new column in the corresponding table.
3. Perform automatic column population job in the background.
4. Logs two records in pr_changelog table for tracking purpose on who has initiated the optimization.
If you don't want all developers to do the property optimization, you can remove the privilege SchemaPropertyOptimization on access roles and have it only for particular sr. system architect's access roles.
Hope this helps!
JPMC
IN
Hi Harish,
As you may be aware that in real time project, many a times due to organization policies the DB tasks are only done by DBA and no one from dev team can do DBA tasks, and thus property optimization is usually disabled for all the developers.
For Pagelist properties as Pega has a predefined list of tasks (related to index) to be done manually, i believe there would be something for Single Page properties as well... I am looking for that list.
Pegasystems Inc.
US
Hi Ashish,
Got your point.
Just to add the mechanism will not vary during property optimization for a single value property or a single value property in a page.
If you optimize a single level property inside a page - propertyName_1 will be created as a column.
How are you guys handling the property optimization for a single level property in your organization? Used modify the schema wizard? which can get the SQL for add column.
JPMC
IN
For Single value property within the work class, its straight forward that you alter the Table and expose the column , even without using any wizard.
However the Single value property within a page, is not staright forward and not similar to work class properties.
For example, the work class has a property called "Name" and in DB it will be simply exposed by a column called Name.
Now suppose we have two single page called "Customer" and "product" and each having embedded property called Name.
Now when we optimize these Name property within the single page it will be creating columns like Name_1 and Name_2, if we just add columns in DB without using the wizard, how will PRPC know which embedded property is related to Name_1 and which is is for Name_2. What is that extra mapping that we can do manually for PRPC to know that.
JPMC
IN
Request to all to provide a technical answer to my question please.
Accepted Solution
Pegasystems Inc.
US
Hi Ashish,
As you don't have any issues optimizing a single value property within work class from the backend. You can use the same approach to optimize single value properties with in a page with one extra step.
Now suppose we have two single page called "Customer" and "product" and each having embedded property called Name.
Now when we optimize these Name property within the single page it will be creating columns like Name_1 and Name_2, if we just add columns in DB without using the wizard, how will PRPC know which embedded property is related to Name_1 and which is is for Name_2. What is that extra mapping that we can do manually for PRPC to know that.
Open the work class definition and use external mapping tab. There you can mention the added column names from work table to the corresponding page property.
Hi Ashish,
As you don't have any issues optimizing a single value property within work class from the backend. You can use the same approach to optimize single value properties with in a page with one extra step.
Now suppose we have two single page called "Customer" and "product" and each having embedded property called Name.
Now when we optimize these Name property within the single page it will be creating columns like Name_1 and Name_2, if we just add columns in DB without using the wizard, how will PRPC know which embedded property is related to Name_1 and which is is for Name_2. What is that extra mapping that we can do manually for PRPC to know that.
Open the work class definition and use external mapping tab. There you can mention the added column names from work table to the corresponding page property.
Here I have two page properties Customer & Product defined in my work class SSA-Sandbox-Work-ServiceRequest. Both the pages contain a single value property Name.
Name_1 is the column added in work table by DBA for customer name and Name_2 is the product name. Define a relation using external mapping as shown above and Pega will know which Name property is related to what page.
In general, the external mappings for page level properties will be automatically added to class definition even with usage of Property optimization wizard.
Hope this helps you. Let me know if you still have any follow-up queries so that others can also pitch in.
Eviden
NL
This seems to be a very Nice Approach. I did try this just now in 7.2.2 but it did not work. Followed the below Steps
1. Made an Alter Statement in Database
2. Re saved the DB Admin Table rule
3. Altered the Class Definition external mapping
Please let me know if I am missing something !