com.pega.pegarules.pub.PRRuntimeException: LegacyModelAspectInvokableRuleContainer.invoke-Exception com.pega.pegarules.pub.clipboard.InvalidReferenceException: The reference .DispatchEvents(-1) is not valid. Reason: unexpected character ‘-’ at position 16, expected subscript
at com.pega.platform.executionengine.vtable.containers.internal.LegacyModelAspectInvokableRuleContainer.invoke(LegacyModelAspectInvokableRuleContainer.java:7)
As you can see in the error message, the “DispatchEvents” embedded page has “-1” as index page which is not possible. Please check the source for this embedded page and there lies your issue.
@PrakashDeep thanks. But the error occurred and how can I go back to check the embedded page?. For it is in the prod environment and I cannot run the dispatch in it.
Surely, the same code must be in the lower environment. You can check the code there. Add a exception handling step for the step where you are using the page index or you can put a check for the embedded page result count before doing any processing on the embedded page
The issue happens when the embedded page references an invalid index. As mentioned before, you can add a exceptional handling logic in that step to mitigate the risk of such error in Pega.
If possible, if you can share the step where you reference the mentioned embedded page, i can let you know the next logic.