Question
JP Morgan Chase
US
Last activity: 7 Jun 2016 1:15 EDT
External Class
My application uses two databases possibly on same database server . One for PegaRULES Database (RULES and DATA Schemas) and other for Case and transactional or Data tables ( which is considered as an external database right ?)
Say, if i have a Data class that points to a table in external database with no pzInsKey or pxObjClass defined in the table (it is considered as a external class ??).
Pega Help says,
No inheritance or rule resolution applies to external classes, even if the class name contains a dash character. Each external class has an associated database table instance (Data-Admin-DB-Table class) and so cannot be part of a class group.
Does that mean if i have a class XYZ-FW-Data-Employee which points to a table in external database( which do not contain pzInsKey & pxObjclass) It cannot inherit properties from the class XYZ-FW-Data ?
In the same example if the table has pzInsKey and pxObjClass properties, Can it inherit from the parent class ??
In either of two scenario's above, if the application is deployed as an enterprise application (i.e. on a web sphere and Oracle DB ) should it use XA JDBC drivers to commit in multiple tables in two databases as a transaction ?
Please clarify..
Thanks
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
Hi Pavan,
I have tested this scenario using Database class mappings it works fine as per your expectation. Please find below the steps :
1) I have created an external table under a separate schema with the four columns :
create table Externalschema.externaltable (firstname varchar2(200),lastname varchar2(200), DOB Date,Department varchar2(200));
2) Then i have created the external Data base class mappings:
I have created a new Database with the name External schema and i have mapped the above created schema and table here. I have also mapped Ravi-Testsect-Data-ExternalTable class to this table.
Hi Pavan,
I have tested this scenario using Database class mappings it works fine as per your expectation. Please find below the steps :
1) I have created an external table under a separate schema with the four columns :
create table Externalschema.externaltable (firstname varchar2(200),lastname varchar2(200), DOB Date,Department varchar2(200));
2) Then i have created the external Data base class mappings:
I have created a new Database with the name External schema and i have mapped the above created schema and table here. I have also mapped Ravi-Testsect-Data-ExternalTable class to this table.
To test the inheritance i have created a property called Test under Ravi-TestSect-Data class then i have navigated to the Property tree tab selected Applies to class as Ravi-TestSect-Data-Externaltable , selected include inherited properties checkbox and ran it . I was able to see the Test property as well. From this we can conclude that by using Database table class mapping we can achieve inheritance for the classes mapped to external table.
Please mark this if you feel this as a correct response for your query.
Regards,
Ravi
Pegasystems Inc.
IN
Hi Pavan,
As per my understanding, An external class is a concrete class (instance of the Rule-Obj-Class rule type) that corresponds to a table in an external relational database, rather than to a table or view in the PegaRULES database.
1) Does that mean if i have a class XYZ-FW-Data-Employee which points to a table in external database( which do not contain pzInsKey & pxObjclass) It cannot inherit properties from the class XYZ-FW-Data ?
= Yes , You cannot inherit a property from Employee class which is pointing to external DB from Data class. Please go through below link :
https://community.pega.com/sites/default/files/help_v72/procomhelpmain.htm
Basically inheritance concept won't be applicable for external classes.
2) In either of two scenario's above, if the application is deployed as an enterprise application (i.e. on a web sphere and Oracle DB ) should it use XA JDBC drivers to commit in multiple tables in two databases as a transaction ?
= I believe , you need to use XA JDBC drivers to commit in multiple tables in 2 DB as a transactions.
Hi Pavan,
As per my understanding, An external class is a concrete class (instance of the Rule-Obj-Class rule type) that corresponds to a table in an external relational database, rather than to a table or view in the PegaRULES database.
1) Does that mean if i have a class XYZ-FW-Data-Employee which points to a table in external database( which do not contain pzInsKey & pxObjclass) It cannot inherit properties from the class XYZ-FW-Data ?
= Yes , You cannot inherit a property from Employee class which is pointing to external DB from Data class. Please go through below link :
https://community.pega.com/sites/default/files/help_v72/procomhelpmain.htm
Basically inheritance concept won't be applicable for external classes.
2) In either of two scenario's above, if the application is deployed as an enterprise application (i.e. on a web sphere and Oracle DB ) should it use XA JDBC drivers to commit in multiple tables in two databases as a transaction ?
= I believe , you need to use XA JDBC drivers to commit in multiple tables in 2 DB as a transactions.
Please let me know if it helps you.
Regards,
Ravi
JP Morgan Chase
US
Thanks Chandra.
1) Does that mean if i have a class XYZ-FW-Data-Employee which points to a table in external database( which do not contain pzInsKey & pxObjclass) It cannot inherit properties from the class XYZ-FW-Data ?
= Yes , You cannot inherit a property from Employee class which is pointing to external DB from Data class. Please go through below link :
But XYZ-FW-Data-Employee can inherit from XYZ-FW-Data class right?
2) Yes, as the case related data is in external database and work object table is in DATA Schema, there will be scenarios where i have to commit to tables in different DB's at a time.
Pegasystems Inc.
IN
Hi Pavan,
As you told that XYZ-FW-Data-Employee is an external class which is pointing to the external data base table rather than to a table or view in the Pega rules database. The PegaRULES database is a relational database that holds the rules, data instances, work items, history, and other concrete objects from the internal classes of the Pega 7 Platform system. External classes are not part of the PegaRULES database.
Since the above class is not stored in our Pega rules/ Pega Data database the inheritance concept won't work here.
Note : You can use New External Database Table Class Mapping button or the edit button (for externally mapped classes only) to create a new database table instance or edit an existing database table instance and properties that associate a class (and its derived classes) with an existing relational database table or view in the Pega 7 database or an external database.
https://community.pega.com/sites/default/files/help_v72/procomhelpmain.htm
Please let me know if this answered your queries.
Regards,
Ravi
Accepted Solution
Pegasystems Inc.
IN
Hi Pavan,
I have tested this scenario using Database class mappings it works fine as per your expectation. Please find below the steps :
1) I have created an external table under a separate schema with the four columns :
create table Externalschema.externaltable (firstname varchar2(200),lastname varchar2(200), DOB Date,Department varchar2(200));
2) Then i have created the external Data base class mappings:
I have created a new Database with the name External schema and i have mapped the above created schema and table here. I have also mapped Ravi-Testsect-Data-ExternalTable class to this table.
Hi Pavan,
I have tested this scenario using Database class mappings it works fine as per your expectation. Please find below the steps :
1) I have created an external table under a separate schema with the four columns :
create table Externalschema.externaltable (firstname varchar2(200),lastname varchar2(200), DOB Date,Department varchar2(200));
2) Then i have created the external Data base class mappings:
I have created a new Database with the name External schema and i have mapped the above created schema and table here. I have also mapped Ravi-Testsect-Data-ExternalTable class to this table.
To test the inheritance i have created a property called Test under Ravi-TestSect-Data class then i have navigated to the Property tree tab selected Applies to class as Ravi-TestSect-Data-Externaltable , selected include inherited properties checkbox and ran it . I was able to see the Test property as well. From this we can conclude that by using Database table class mapping we can achieve inheritance for the classes mapped to external table.
Please mark this if you feel this as a correct response for your query.
Regards,
Ravi
JP Morgan Chase
US
HI Ravi,
I agree. Thanks for testing this. But i am still not clear why does the help says inheritance & rule resolution is not possible. Even with out mapping the external columns to the properties the inheritance just works fine.resolution does not work
Pegasystems Inc.
IN
Hi Pavan,
Inheritance and Rule resolution will not work directly for the external class. However, Database class mapping is provided to make use of the functionality for the external classes as well.
Regards,
Ravi