WrongModeException while setting StringList to a String
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.
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)
Steps to Reproduce
- Launch the portal that loads data using an activity.
- Configure the activity to perform Obj-Browse with the left operand as a String and the right operand as StringList in one branch.
- The property (String) used in the activity is created in an another branch and the right operand is created in the base layer.
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).
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.