Save failed when trying to enter duplicate data records
User could not install CSSample.jar into Industry insurance framework (IIF) installed system.
Save Failed : Batch entry 0 INSERT INTO pegadata.pa_address_type
Steps to Reproduce
The order of installation is as follows:
Observe that there is an error while installing CS Sample jar and the import failed.
There are two classes in the system 'PEGACA-INTERFACE-ADDRESSTYPE' and 'PEGAAPP-INTERFACE-ADDRESSTYPE'.
Both of them has same six records to be inserted to database. The table is pa_address_type which has these columns ADDRESSTYPE, ADDRESSTYPEDESCRIPTION , CATEGORY where ADDRESSTYPE is primary (No class information present over there).
When importing IIF jar, 'PEGAAPP-INTERFACE-ADDRESSTYPE' class, 'PEGAAPP-INTERFACE-ADDRESSTYPE' D-A-D-T and six addresstype records got created in the db. While importing customerservice jar only 'PEGACA-INTERFACE-ADDRESSTYPE' class got imported without D-A-D-T. So, it got mapped to pr_other.
The second one, while importing CSSample.jar the system synchronized on six records 'PEGACA-INTERFACE-ADDRESSTYPE' instances and found that no records are present in pr_other, so marked them as insert. But in the same package DADT for 'PEGACA-INTERFACE-ADDRESSTYPE' was included, it got imported before instances which changed the mapping and insert started firing to pa_address_type.
Thus the error is coming as the record that was already there in the pa_address_type table (which came from IIF installation). To rectify the above error, one can divide the CSSample.jar into two. Pega is already providing the splitted jars to multi tenant applications in the media.
Import the 'CASample_DDL' and 'CASample_DML' jars seperately, instead of importing CSSample.jar, to resolve the issue.
0% found this useful