Repeat layout context issues with Refresh this section action
A repeating layout contains an OnClick event to refresh a section and run a data transform functionality defined on it. The section is embedded in the repeating layout which is a part of another class (referencing a data page or referencing a sub page, etc). When the user clicks the location in the section where the embedded section is, during the run time, the data transform runs in the context of the embedded section but not in the context of the repeating layout item. This causes a rule not found exception and blows up the thread.
Caused by: com.pega.pegarules.pub.generator.RuleNotFoundException: Failed to find a 'RULE-OBJ-MODEL' with the name '<name of the data transform>' that applies to '<class name>'. There were 27 rules with this name in the rulebase, but none matched this request. The 27 rules named '<name of the data transform>' defined in the rulebase are: 27 unrelated to applies-to class '<class name>'
Steps to Reproduce
- Drag a repeating layout on to a section and embed a section in the repeat layout
- Embed another section within the above embedded section defined by a data page or the Clipboard page
- Add an OnClick event to the repeat layout section to refresh the section and include a data transform within it
- Click the section defined in step 2 during the runt time. The system invokes the data transform from the section context defined in step 2. The system must invoke the data transform from the section context defined in step 1
This behavior is as per the Pega product design. Refresh this section always runs in the context of the section from where the event fires.
Perform either of the following local-changes:
- Use Refresh other section and specify the class from where the data transform must be invoked
- Use the Run data transform action separately outside the Refresh section action