Support Article
Connect-REST JSON response mapping error due to @baseclass.name
SA-24775
Summary
User is on Pega 7.1.7, a property "Name" in @baseclass that was created with Customer Process Manager (CPM) 7.12 installation.
User has a Connect-REST rule which complains about JSON response mapping failure due to conflicting @baseclass.Name property. User is getting the below error message in logs:
The property ConnectorPage.response_PUT.data(1).Response(1).ClientCostingTypeList(1).ClientCostingType(3).MedicareDStages(1).Name was of mode String while com.pega.pegarules.data.internal.clipboard.ClipboardPropertyImpl.getPageValue(int) was expecting Page List mode.
Error Messages
The property ConnectorPage.response_PUT.data(1).Response(1).ClientCostingTypeList(1).ClientCostingType(3).MedicareDStages(1).Name was of mode String while com.pega.pegarules.data.internal.clipboard.ClipboardPropertyImpl.getPageValue(int) was expecting Page List mode.
Steps to Reproduce
- Use Connect-REST Integration wizard in base Pega 7.1.7 to consume JSON response having "Name" element.
- Create a "Name" property in @baseclass.
- Call the Connect-REST rule from a data page or an activity. The JSON response mapping fails with error.
Root Cause
A defect in Pegasystems’ code or rules is identified as root cause of this issue. CPM 7.12 framework has a "name" property in @baseclass which conflicts with a property having same name when present within response data model generated by the Connect-REST Integration wizard.
Resolution
Follow the below steps:
- Create a property "Name1" within the same class where "Name" property is present within the Connect-REST response data model.
- Go to Advanced tab of "Name1" property and set pzExternalName property qualifier as "Name".
- Delete the "Name" property which is present within the Connect-REST response data model and it was causing conflict with the "Name" property present in @baseclass.
Published June 27, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.