Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

DisplayHarnessWithClass - substring function error



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 :
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

  1. Logon to view your dashboard
  2. 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.


This issue is resolved in Maintenance Level (ML) release PRPC 7.1 ML7
Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us