Question
Eviden
NL
Last activity: 30 Oct 2019 3:28 EDT
Class key property returning issue
Issue:
- Using the “create datatype” functionality, I have created the class: “Data-XXX”.
- Data-XXX contains properties .X, .Y and .Z.
- Where .Y was set as key.
- The requirements changed and .Y could have the same value twice.
- Thus, on the “Data-XXX”-rule settings I selected the automatic generation of the key, using .pyGUID.
However, PEGA 8.1.5 still requires .Y to be unique.
- So, I have deleted all datapages, report def, properties and the class-rule of Data-XXX.
- Now, I have created the datatype again, with the same name “Data-XXX” and properties.
- The issue returns, .Y is required and has to be unique.
After checking the DB schema, using the “modify schema” functionality, it appears .Y column could be the issue.
Which tools are best to be used in adjusting the column properties in the DB schema?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
BPM Company
NL
You can change keys on your Data-XXX class record:
But it's only possible if the class does not have any instances. So you need firstly remove all instances of the class (check in corresponded data table).
If you need these records for the future, copy them to temp data table.
Then - change the key in the class rule record and resave corresponding data table record (in Pega).
Now you will be able to save instances using different key.
If you'll need more clarification, ask me.
Eviden
NL
Changing the key is part of the issue.
I have removed the datatype including instances/class/properties/report/datapages.
Data-XXX class is also deleted from History- class.
After logout -> login, I have created a data type with the same name (Data-XXX).
The very first, oldest and wrong key, is the first field that is displayed and the trashcan icon is greyed out.
BPM Company
NL
try these steps then:
1. Verify that all of the instances are removed: in Data types Overview --> your Data type --> On the tab "Records", there're should be no instances
2. Go to the class rule. Is the trashcan stil disabled? (send a screenshot please)
Eviden
NL
1. verified, otherwise it's not possible to delete the class rule.
2. trashcan is disabled.
BPM Company
NL
2. Weird. Could you attach a screenshot? and what version of Pega do you use?
Eviden
NL
Currently, I have no screenshot available. Already moved on passed this issue.
However, if you have a solution.. I am very interested.
Pega 8.1.5.
Current solution
Create a data type based on a different class, for example "Data-XXX2".
BPM Company
NL
Maybe 8.1.5's way of handling the keys is different from the one I testet on (7.3.1).
Could you try to follow the same simple steps I provided below (in tha attached doc file)? I'm jsut curious if it will work for 8.1.5
Eviden
NL
Changing the key is the same in both versions. Thanks!
BPM Company
NL
So, did it work after all?
BPM Company
NL
Please review the steps how can you change the key:
Barclays
GB
Hi Bob, I don't think it's a version specific issue and as per your current workaround "Create a data type based off different class" doesn't seem good practice as it is going to leave old class unattended over period. Since you have already removed all the related rules referencing to old class, why don't you follow System->Refactor->Classes and delete the class having issue and create the same class again with the new keys you want to introduce.
Eviden
NL
Thanks for the reply, however even after deleting the class using the refactor method. The old class-key is the first field that pops up when creating a new class with the old class name "Data-XXX".
Bits in Glass
IN
Whenever you needed to make changes in the keys of a class follow below approach which is very easy.
1. Delete DBTable instance for this class. (Do not close this tab)
2. Now go to Class and make your changes. Save the class changes
3. Now go to DBTable instance and click save as (from step 1).
-
Abhinay Uge