Support Article
DisplayHarnessWithClass - substring function error
SA-5614
Summary
You notice in your logs instances of an error indicating an issue in the substring function coupled to the Java step 2 of '@baseclass • DisplayHarnessWithClass'.
Error Messages
2015-01-19 09:10:57,088 [ WebContainer : 7] [TABTHREAD1] [ ] [ ] (essWithClass._baseclass.Action) ERROR Exception occurred at Line : 1150, in Function : substring, which is of Class : java.lang.String , in Java File : String.java.
2015-01-19 09:10:57,088 [ WebContainer : 7] [TABTHREAD1] [ ] [ ] (essWithClass._baseclass.Action) ERROR Exception occured either while updating preActivity Param or executing preActivity in DisplayHarnessWithClass
Steps to Reproduce
- Logon to view your dashboard
- Review Log File
Root Cause
The root cause of this problem is a defect in Pegasystems’ code/rules.
The problem portion of the rule is as follows of the java step within DisplayHarnessWithClass :
int delimIndex = activityParam.indexOf(":");
if(delimIndex < activityParam.length()-1){
String key = activityParam.substring(0, delimIndex);
In the case where .indexOf(":") fails to find a colon in the string, it will return -1. The step immediately after will then always trigger, since -1 will be less, and the substring action will pull from 0 to -1 resulting in an exception in the logs.
Resolution
This issue is resolved in Maintenance Level (ML) release PRPC 7.1 ML7
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.