Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Page-Merge-Into does not set pxObjClass in embedded pagelist

SA-46960

Summary



In the service activity of a REST service the pxConvertStringToPage out of the box function is called using a json passed as parameter from outside.

This JSON is actually a page structure without "pxObjClass". Thus the target page in the above Rule-Utility-Function(RUF) does not contain the pxObjClass property when it used to form the clipboard page.

As a result the embedded pages within (page or pagelist) are also becoming classless.

But if this Rule-Utility-Function (RUF) is called from a standalone activity and the same classless JSON is passed the Top level page does not get the pxObjClass but the embedded pages get.

The subsequent step is a Page-Merge-Into where the JSON created page is merged with an existing page and in the resulting merged page the PageList property is missing the pxObjClass property.

However the Top level and the embedded single Page properties are having appropriate pxObjClass set but not the embedded PageLists.


Error Messages


Typically a RuleNotFound exception occurs when any rule, example: an Activity, is called using the PageList as the step page.

An error message like below appears on the screen or PegaRULES log file depending on from where the rule is invoked:

com.pega.pegarules.pub.generator.RuleNotFoundException:
Failed to find a 'RULE-OBJ-ACTIVITY' with the name 'TESTACTIVITY' that applies to 'ABC-FW-APPFW-Data-Contract'. There were 2 rules with this name in the rulebase, but none matched this request. The 2 rules named 'TESTACTIVITY' defined in the rulebase are: 2 unrelated to applies-to class 'ABC-FW-APPFW-Data-Contract', for example: 'ABC-FW-APPFW-Data-PageListClass'.



Steps to Reproduce



1. Configure a service REST with a request parameter that takes a JSON argument
Note that the JSON should contain a Top Level , Single Page, PageList structure, like the one below:


{
"FirstName": "John",
"Gender": "Male",
"LastName": "Doe",
"Contract": {
"ConId": "Con001",
"ContractLength": "1",
"ContractType": "Floating"
},
"ProductHolding": [
{
"ProductID": "P001",
"ProductName": "Some Product"
}
]
}


2. In the service activity use the pxConvertStringToPage RUF to create a Page by passing the JSON passed from outside through the REST call.
3. In the next step use the Page-Merge-Into method to merge the above created page with an existing page with similar structure. Use Keep = 2 ( Overwrite).
4. Check the resulting page structure after the merge.


Root Cause



A defect in Pegasystems’ code where using the Keep =2 option Page-Merge-Into method does not take care of the pxObjClass property in an embedded PageList.

Resolution



This method has been enhanced in Pega version 7.3.1 where a new Keep = 3 option has been added.
This works same as Keep =2 in earlier version but also it creates the PageList and sets the pxObjClass correctly.

For Pega versions up to Pega 7.3 use any of the workarounds below:

1. Setting the pxObjClass on the Top Level Page:

After creating the Clipboard Page from JSON using the pxConvertStringToPage function perform a Property-Set on the resulting page to set the pxObjClass appropriately.
This sets the pxObjClass accordingly to all the embedded Single Page or Page List properties.

2. Performing double Page-Merge-Into:

Adopt the following approach of double Page-Merge with two different Keep parameters:

In the above activity the temporary “TestPage” must be deleted after the second merge.

Published March 26, 2018 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us