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

String index out of range: -15 Exception

SA-17485

Summary



When submitting a flow action to complete an assignment, users encounter an error while executing most of the cases, “The Flow Action pre-processing activity pyPopulateCaseContentsWrapper failed: java.lang.StringIndexOutOfBoundsException: String index out of range: -15”.


Error Messages



The Flow Action pre-processing activity pyPopulateCaseContentsWrapper failed: java.lang.StringIndexOutOfBoundsException: String index out of range: -15


java.lang.StringIndexOutOfBoundsException: String index out of range: -15
at java.lang.String.substring(String.java:1937)
at com.pegarules.generated.activity.ra_action_pypopulatecasecontents_e62e838e44e46abf109ba06ea95320db.step4_1_circum0(ra_action_pypopulatecasecontents_e62e838e44e46abf109ba06ea95320db.java:914)
at com.pegarules.generated.activity.ra_action_pypopulatecasecontents_e62e838e44e46abf109ba06ea95320db.step4_0_circum0(ra_action_pypopulatecasecontents_e62e838e44e46abf109ba06ea95320db.java:835)
at com.pegarules.generated.activity.ra_action_pypopulatecasecontents_e62e838e44e46abf109ba06ea95320db.perform(ra_action_pypopulatecasecontents_e62e838e44e46abf109ba06ea95320db.java:132)


Steps to Reproduce



Whenever we try to complete an assignment. 


Root Cause



A defect in Pegasystems’ code or rules. The pyPopulateCaseContents activity uses the pyWorklistAssignmentsDefinition Report Definition (RD) to retrieve non-internal Flow Assignments. However, internal assignments are also returned from the PZINTERNALCASEFLOW flow but these cannot be processed here.

Resolution



Referred  PDN link.
https://pdn.pega.com/support-articles/stringindexoutofboundsexception-when-submitting-flow-action

And performed the following local-change:

The pyWorklistAssignmentsDefinition RD is used to retrieve the assignments list for a given case.

1. Add a Column "pxSystemFlow" in the RD which determines if the flow is internal or not
2. Add filter condition pxSystemFlow set to false which excludes internal flows.

Published January 31, 2016 - 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?

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