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
- 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.
- 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.
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.