Support Article
Validate rules fail to invoke a Sub Validate
SA-89756
Summary
On invoking an embedded Validate rule from a top Validate rule, error occurs and the Sub Validate does not execute.
Error Messages
[PegaRULES-Batch-5] [STANDARD] [ ] [your_name:01.01.01] (ernal.async.BatchRequestorTask) ERROR - Batch activity "YourClass.TestAct" threw: com.pega.pegarules.pub.PRRuntimeException: unable to execute agent: your_name #0: YourClass.TestActJava Exception: java.lang.NullPointerException at com.pega.pegarules.session.internal.async.agent.QueueProcessor.execute(QueueProcessor.java:712) ~[prprivate.jar:?] at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:1155) ~[prprivate.jar:?] at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1371) ~[prprivate.jar:?] at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1114) ~[prprivate.jar:?] at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:995) ~[prprivate.jar:?] at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:816) ~[prprivate.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
Steps to Reproduce
- Create an Advanced agent.
- Configure the agent such that it invokes an activity.
- Create the activity and configure it to invoke a Validate rule.
- Create the Validate rule and invoke another Validate rule on the Page Context through the Workpage page type property.
- Create a Validate rule in the Call the Page Property context.
Root Cause
In Advanced agents, a defined primary page context does not exist; hence, it is set as null. The Agent activity is responsible for creating the Context page and working on that page. Since the Obj-Validate considers the page mentioned in the step as a stepPage, the Primary page remains null (which is set by the agents).
Resolution
Perform the following local-change:
Switch to the Job Scheduler as the Agents are deprecated.
Published March 25, 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.