Support Article
InvalidValueException while evaluating a When rule
SA-82555
Summary
InvalidValueException occurs while evaluating a When rule. As a result, the case does not proceed forward.
Error Messages
ERROR - Exception caught while evaluating when
com.pega.pegarules.pub.clipboard.InvalidValueException: PropertyValueInvalid null .pegaToInteger() Invalid number format (was 7X) at com.pega.pegarules.pub.clipboard.PRStringFormat.pegaToInteger(PRStringFormat.java:823)
at com.pega.pegarules.pub.clipboard.PRStringFormat.pegaToAny(PRStringFormat.java:830)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageBase.getValue(ClipboardPageBase.java:1895)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageBase.getInteger(ClipboardPageBase.java:1917)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.getInteger(ClipboardPageImpl.java:484)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageBase.getInteger(ClipboardPageBase.java:1977)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.getInteger(ClipboardPageImpl.java:484)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageBase.getInteger(ClipboardPageBase.java:1966)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.getInteger(ClipboardPageImpl.java:484)
at com.pegarules.generated.when.ra_when_isrejcode05_71edb57d3a6024a76869cac962013696.evaluate(ra_when_isrejcode05_71edb57d3a6024a76869cac962013696.java:50)
at com.pega.pegarules.session.internal.mgmt.Executable.evaluateWhen(Executable.java:4224)
at com.pega.pegarules.session.internal.mgmt.Executable.evaluateWhen(Executable.java:4128)
at com.pegarules.generated.flow.ra_action_validaterejectclaim_f3edfdf87d12dda649131dd60748ccb1.EvaluateConnector(ra_action_validaterejectclaim_f3edfdf87d12dda649131dd60748ccb1.java:4974)
Steps to Reproduce
- Execute the process to invoke the When rule.
- Set the property that will be evaluated to 7X.
Root Cause
An issue in the custom application code or rules.
The When rule is configured with the '[first value][relation][second value]' condition. A logic is present in the compareTwoValues code to rewrite the expression under the condition when both sides are numeric and with the same Java type. That is, the Runtime Assembler context considers the RejCode property to be an Integer.
Resolution
Perform the following local-change:
Change the When condition to '[first string] equals [second string]' to ensure the property is treated as a String value.
Published October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.