Scenario
Incorrect validation errors occur if the Max Length of a property is changed or removed.
Steps to reproduce the issue:
-
Create a property and define a Max length for it.
-
Create an activity that sets the value of that property to the value of an input parameter.
-
Execute the activity and pass a parameter value longer than the Max length. An error will be displayed (see below).
-
Update the property to remove the Max length.
-
Run the activity again and pass a parameter value longer than the previously configured Max length. The error will still be displayed even though the Max length is removed.
Error
The following error displays on the screen:
<property value longer than previous max length> is too long, maximum length allowed is <previous max length>
Explanation
This is an expected behavior.
The related Pega Documentation instructs users of the following limitation:
The Max Length of a property can be compiled into certain types of rules that reference that property. This means that if the Max Length of a property is changed or removed, those referencing rules need to be recompiled for the change to take effect.
Environments
This behavior occurs in all versions of the Pega Platform.
Best Practice
Plan Max Length definitions of properties to avoid the need to remove them. In scenarios where they need to be removed, a of the rules which reference the property will trigger recompilation.
Related content
Property form - Completing the Advanced tab
About the bulk Revalidate and Save tool