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

Table - Error when clicking “Add Item” with Modal Dialog

SA-99350

Summary



In a table, error occurs on clicking the 'Add Item' button with modal dialog.


Error Messages



Section 'pzGridModalHTML' execution error on page 'pyWorkPage' of class 'FEP-CLM-POC-DX-Work-Claim'.  com.pega.pegarules.pub.generator.RuleNotFoundException: Failed to find a 'RULE-OBJ-ACTIVITY' with the name 'NEWCLAIMLINE' that applies to 'FEP-Data-ClaimLine'. There were 1 rules with this name in the rulebase, but none matched this request. The 1 rules named 'NEWCLAIMLINE' defined in the rulebase are:  1 unrelated to applies-to class 'FEP-Data-ClaimLine', for example: 'FEP-Data-Claim'.


Steps to Reproduce

  1. Click the + Claim Line Item (Add Item) in the table (CL: FEP-Data-ClaimLine) in the section (CL: FEP-Data-Claim). The 'NewClaimLine' (CL: FEP-Data-Claim) activity is configured to run on row Add. 
  2. Invoke the NewClaimLine activity from the FEP-Data-Claim class for the first time while adding a row. The error occurs in the Tracer for the second Add item. For the second add item, the activity searches for the FEP-Data-ClaimLine class which does not exist. This works when every time row editing is set to inline.
  3. Set row editing to Master details. Error occurs.


Root Cause



A defect in Pegasystems’ code or rules. 
The Exception occurred due to the below lines of code in pzGridModalHTML,
/*Incase of append last, execute the activity on step page. Else, execute on PL page.
 */
        if(!navigation.equals("APPENDLAST")){
            tools.doAction(rlKeys, tools.findPage(strPageListProperty),null);
        }else{
            /*Consider base ref while computing step page for append last scenario*/
            if(bCustomeAct && !"".equals(tools.getParamValue("BaseReference"))) {
                tools.doAction(rlKeys, tools.findPage(tools.getParamValue("BaseReference")),null);
            }else {
                tools.doAction(rlKeys,tools.getStepPage(),null);
            }
        }


For the addition of the first row, the Navigation value is APPENDLAST. Hence, the activity is run in one context. For the next row onwards, the Navigation value is INSERTAFTER. As a result, the activity is run in a different context where the activity is not found.


Resolution



Perform the following local-change:

Define the activity in both the Grid class and the Section class.

Published April 8, 2020 - Updated December 2, 2021

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