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

WrongModeException while setting StringList to a String

SA-48668

Summary



On configuring an activity to load data in a portal, the activity generates a WrongModeException when it is checked-in. However, it works in the Private Edit version.
Additionally, the same configuration fails when a Save As of the activity is performed in a new branch ruleset.



Error Messages



com.pega.pegarules.pub.clipboard.WrongModeException: The property pyDisplayHarness.FWList was of mode String List while com.pega.pegarules.data.internal.clipboard.ClipboardPropertyImpl.getStringValue() was expecting String mode. Details: (none)
at com.pega.pegarules.data.internal.clipboard.ClipboardPropertyImpl.getStringValue(ClipboardPropertyImpl.java:3544)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.getString(ClipboardPageImpl.java:1489)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.getString(ClipboardPageImpl.java:1445)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.getString(ClipboardPageImpl.java:1441)
at com.pegarules.generated.activity.ra_action_testact_d0f31361ff0a447a7c290081cbb6180e.step33_circum0(ra_action_loadworkorders_d0f31361ff0a447a7c290081cbb6180e.java:3620)
at com.pegarules.generated.activity.ra_action_testact_d0f31361ff0a447a7c290081cbb6180e.perform(ra_action_loadworkorders_d0f31361ff0a447a7c290081cbb6180e.java:580)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3527)
at com.pega.pegarules.exec.internal.declare.infengine.pages.DeclarativePageDirectoryImpl.runRule(DeclarativePageDirectoryImpl.java:1010)
at com.pega.pegarules.exec.internal.declare.infengine.pages.DeclarativePageDirectoryImpl.runLoadActivity(DeclarativePageDirectoryImpl.java:437)


Steps to Reproduce

  1. Launch the portal that loads data using an activity.
  2. Configure the activity to perform Obj-Browse with the left operand as a String and the right operand as StringList in one branch.
  3. The property (String) used in the activity is created in an another branch and the right operand is created in the base layer.


Root Cause



Discrepancy in the application-based validation (ABV) list and the runtime list. During design time, the ABV occurs across rulesets or branches. During runtime (using VTable), additional filtering is performed on branches. Hence, the exception occurs at runtime when the rule is checked-in (that is, in the branch).


Resolution



Perform the following local-change:

Perform a Save As of the property rules, used in the activity, to the same branch ruleset in which the activity is created. This ensures that branch filtering, at runtime, is bypassed and execution of the activity occurs without an error or exception. Validation applied during runtime for branch to branch visibility is currently not supported and is scheduled to be supported in a future Pega release.


Published April 5, 2018 - 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