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

Tools.findpage method is not working for embedded Pages



The scenario involves usage of Tools.findpage() method in a Java step to get the property value of a embedded page. This is working fine in PRPC 6.2 SP2 but after upgrading to PEGA 7.1.7 this method is unable to find the embedded page and it throws a null pointer exception. Because of this issue the property value cannot be fetched from the page.

Error Messages

The method findpage() throws a Null pointer exception. 

Steps to Reproduce

1. Create two work classes, KYCType and Document and one data class Item. 
2. Create two properties, ID and Name in class Item. 
3. Create a property Age in Document class. Also, create a property of type single-page, Item1 which gets the properties from data class Item. 
4. Create an activity, ReturnToKYCTypeWorkObject. 
    a. Specify the following in pages & classes tab of the activity : 
        i. KYCTypeWO (step page) ----> refers to class KYCType 
        ii. pyWorkPage (step page) ----> refers to class Document 
        iii. DataItemIDPage (step page) ----> refers to class Item 
    b. Create a local variable of type string, ItemName. 
    c. Below are the steps of the activty : 
        i. Create a new page of pyWorkPage. 
        ii. Set the property value for Age. 
        iii. Write a java definition as follows: 
            ClipboardPage cpPage = tools.findPage("pyWorkPage"); 
        iv. Create a new page of KYCTypeWO. 
        v. Set the following properties: 
            KYCTypeWO.Item1.Name as ABC and local variable ItemName DataItemIDPage.Name 
        vi. Rename the page KYCTypeWO to pyWorkPage. 
        vii. Write a java definition as follows: 
            ClipboardPage cpPage1 = tools.findPage("pyWorkPage."+ItemName); 
5. Finally, execute the activity.

Root Cause

While evaluating property references the top level page passed in the reference is not being honoured, instead the step page is being used as top level page. The embedded references are being evaluated in the context of this step page.


Apply HFix-24949 to resolve the issue.

Published January 31, 2016 - 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