I am trying to associate a casetype (TGB-HRApps-Work-LeaveRequest) to a separate Table, in the pega cloud exercise system. I tried the following.
In the class rule form of the casetype, changed the class group identifier as “is a class group”, specified the classgroup name as the casetype name itself.
In the ‘Keys’ section added ‘.pyID’
Added ‘Work-cover’ as directed parent.
After saving the class rule, I am expecting that a different table ‘pegadata.pc_TGB_HRApps_Work_LeaveRequest’ will be created. Because I am using the SSA@TGB operator ID that has SchemaTableCreation privilege for all environments. But still the TGB-HRApps-Work-LeaveRequestclass is mapped to the ‘pegadata.pc_TGB_HRApps_Work’ table.
@NagaPriyaK I was able to replicate your scenario.
I have found that the “problem” is due to the preSave activity. It is checking that the class is being saved for the first time (I mean, it’s being created not saved), and if it’s true then it sets a Param to create the DB table (see the attached screenshot).
Only for experiment purposes, I have private edit the activity and changed the condition to Always. Then I saved the class again, and it worked, the db table was created.
Be careful, discard the private edit immediately because it will create a db table every time you Save the class.
@Deivit, Thanks a lot. I tried your solution, it Works.
Please verify my understanding.
Pega automatically creates new table for class group either when we create a new application or when we create a new class group using class group rule form.
Since editing OOTB activity is not always advisable, when we convert an existing case type or a class to a new class group it is better to manually create a data base table and map it to the class group using Database Table Class Mapping.
Instead of creating a class group, If we have access to database tools to modify pega database, we can create a separate table and we can directly map a case type to it using Database Table Class Mapping.
Is there any other way to map a casetype to separate table?