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

java.lang.StringIndexOutOfBoundsException on CaseContentsPage



The Review harness does not display the list of open assignments (open subcases) for a case. Exception occurs from the Pega out-of-the-box pyLoadMyCasesNested activity in Step 2.

Error Messages

(internal.mgmt.Executable) ERROR - Exception
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(
    at com.pegarules.generated.activity.ra_action_pyloadmycasesnested_c121a984f4b6faa79ef824f68042fba5.step2_circum0(
    at com.pegarules.generated.activity.ra_action_pyloadmycasesnested_c121a984f4b6faa79ef824f68042fba5.perform(
    at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(
    at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(

Steps to Reproduce

Open the case which has open subcases in the Review harness.

Root Cause

This behavior is as per Pega product design.


Here’s the explanation for the reported behavior:

The application code or rules are customized.

The StringOutOfBoundsException occurred due to an empty coveredInsKeys(1) in pyWorkPage. In the Step 2 of the pyLoadMyCasesNested activity (which fetched covered cases of the current case), a step to calculate the coveredInsKey subString was present.

ClipboardProperty coveredInsKeys; 
coveredInsKeys = workPage.getProperty("pxCoveredInsKeys"); 
coveredInsKeys = tempPage.getProperty("pxCoveredInsKeys"); 
if(coveredInsKeys != null){ 
Iterator iter = coveredInsKeys.iterator(); 
while (iter.hasNext()) { 
ClipboardProperty insKeyProp = (ClipboardProperty); 
String insKey = insKeyProp.getStringValue(); 
String classGroup = insKey.substring(0,insKey.indexOf(" "));

In this use case, the coveredInsKey(1) is empty. Hence, error occurs when the substring of this empty insKey string is calculated.

Published April 4, 2019 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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