Discussion
BlueRose Technologies
AU
Last activity: 14 Nov 2016 19:54 EST
How to store instance of a Class in a specific Database Table
Question: How to store instances of a Class in a new Database Table?
Answer: Some say that we have to create a Data-Admin-DB-Table instance and map that to the class so that the work objects created going forward will now be stored in the new DB Table. But, how can we map the new DB Table to the class? Thanks in advance.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
GB
Hello,
You can map a work class to the new table in the Rulebase as follows...
1. Define the new table for case (work) instances. This will be based on the structure of pc_work.
2. Define a new table for history instances. This will be based on pc_history_work.
3. From Records explorer select SysAdmin and close the work class to be changed.
4. Change the Table Name setting to the new table and save the changes.
5. Test the mapping by clicking the Test Connectivity button.
6. Repeat steps 3-5 for the history class.
Now any new instances will be written to the new tables.
Regards,
Andrew Fontenelle
PDN and Pega Academy Support Team
BlueRose Technologies
AU
@Andrew.F
Thanks a lot for your reply Andrew.F But, I am having trouble understanding the step 4. Can you elaborate on step 4 as to how to achieve that because I don't know where we have the provision to change the Table name for a given class? Thanks a lot in advance.
Updated: 28 Jun 2016 21:11 EDT
Telstra
AU
Hi Giridhar,
By Default, your work objects will be saved to the table mapped to your class group even if you create DB table mapping for your work object class. For classes that don't belong to any class group, records will go to corresponding table.
A-B-C-Work is Class group mapped to table ABC
A-B-C-Work-Object is case type mapped to table DEF, but still records will go into ABC table because class group of this class is A-B-C-Work.
Hawaii Medical Service Association
US
Hi Abhijit,
was looking for answer to similar question :
'A-B-C-Work-Object is case type mapped to table DEF, but still records will go into ABC table because class group of this class is A-B-C-Work'
then is there way to be able to store the case specific records in a separate table?
Pegasystems
IN
was looking for answer to similar question :
'A-B-C-Work-Object is case type mapped to table DEF, but still records will go into ABC table because class group of this class is A-B-C-Work'
then is there way to be able to store the case specific records in a separate table?
This is currently not feasible. Work around is to make "A-B-C-Work-Object" also a class group but that is an application design decision to you need to make.
Hawaii Medical Service Association
US
Thanks nistr for the clarification.
Tech Mahindra
US
Hi Giridhar,
If you want to map a new DB Table to a class, Goto Designer Studio -> Records -> SysAdmin -> Database Table and find your class in the instances and change the DB Table and Save the instance.
Thanks.