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

StringIndexOutOfBoundsException processing when rule



When a work object is resumed (via a ResumeFlow) and a subsequent WHEN rule evaluated, an error is thrown related to the evaluation of a property on the 'Top' keyword page.

Error Messages

2017-01-19 11:08:19,380 [ MQ-Thread-136] [ STANDARD] [ STAT:01.04.01] (When) ERROR Listener|ServicePackage - Exception caught while evaluating when
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.charAt(
at com.pegarules.generated.when.ra_when_whenrulename_59b7d20442f8d7307495cce9c6dd07cc.evaluate(
at com.pega.pegarules.session.internal.mgmt.Executable.evaluateWhen(

Steps to Reproduce

  1. Create a case and a Flow.
  2. Create an assignment to input some data and based on a when (checks the value of some property) condition redirect the case to some other workbasket.
  3. Create an activity to call ResumeFlow OOTB activity to resume the flow.
  4. The when rule must use the 'Top' keyword in order to use the top level page.
  5. Trigger the elements created in steps 1-4, resume a work object (via a ResumeFlow) and a subsequent WHEN rule is evaluated.
  6. Observe the error in the Pega Platform logs.

Root Cause

A defect in Pegasystems’ code or rules.


Apply HFix-24801
Suggest Edit

Published March 26, 2017 - 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