InvalidReferenceException after upgrade

After upgrade to pega 8.4.1, it throws exceptions

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)

thanks.

@chaop406

Hi,

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.

@chaop406

Hi,

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

@PrakashDeep thanks. Do you think what caused this exception? is it Pega system’s bug?

@chaop406

No, it is not a Pega’s bug.

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.