Question
Ernst & Young, LLP
US
Last activity: 3 Aug 2016 2:19 EDT
Increase max length of a property
Hi, I have a Property rule whose max length has been defined as 12 in "Advanced" tab. Is there a way to extend the length to 13? I have read in PDN that the length cannot be increased once defined, but is there a way we can do this as it is important for an enhancement in my application?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
My understanding was that you could increase it, but not decrease it.
This Use case is enhanced in Pega 7, see my screen shot...
This should still be the case for Pega 7. If not, then our product documentation needs to be updated.
https://community.pega.com/sites/default/files/help_v718/procomhelpmain.htm
Pegasystems Inc.
US
Sreedhar,
Is the column exposed? If so, you'll need to make the column width wider in the database. Otherwise, I believe you should be able to get away with changing the value on the advanced tab. You many need to resave rules that compiled the existing limit into their generated java if you start getting width errors in unexpected places. To the best of my knowledge, that should be the extent of things.
Ernst & Young, LLP
US
Pegasystems
US
If you change the max limit for a property, re-save your activities that do property-set’s on that property so that the inline generated java for the activity knows about the updated property max limit. /Eric
BNY Mellon
US
Does the generated Java for activities check the property's max size?
Isn't that handle by validation?
Ernst & Young, LLP
US
Hi Eric, Firstly, PEGA is not allowing me to change the length. We are using 6.3 SP1.
Pegasystems
US
Hello Jon and Sreedhar,
Sreedhar, I'm sorry you're not able to change the length. Make sure your db version of the property allows as many characters are you are trying to set the max limit to.
Jon, yes, there is reference to a key for the property in which the length is encoded, in the generated java of the activity. Here is a copy of SA-11403 that refers to that key. [note: I was told that support articles are searchable on google or pdn so if I had found this on either of those I would have posted a link instead of copying the SA contents inline like this. Any of you know why this SA isn't searchable ? ] /Eric
SUMMARY
At runtime, you observe that data is restricted for the country property's max length of 20 characters even though you have an overridden version of the property with no max length defined.
ERROR MESSAGES
"STRING LONGER THAN TWENTY CHARACTERS" is too long, maximum length allowed is 20
STEPS TO REPRODUCE
Override the "country" property with a new max length after an activity referencing it is saved.
ROOT CAUSE
Hello Jon and Sreedhar,
Sreedhar, I'm sorry you're not able to change the length. Make sure your db version of the property allows as many characters are you are trying to set the max limit to.
Jon, yes, there is reference to a key for the property in which the length is encoded, in the generated java of the activity. Here is a copy of SA-11403 that refers to that key. [note: I was told that support articles are searchable on google or pdn so if I had found this on either of those I would have posted a link instead of copying the SA contents inline like this. Any of you know why this SA isn't searchable ? ] /Eric
SUMMARY
At runtime, you observe that data is restricted for the country property's max length of 20 characters even though you have an overridden version of the property with no max length defined.
ERROR MESSAGES
"STRING LONGER THAN TWENTY CHARACTERS" is too long, maximum length allowed is 20
STEPS TO REPRODUCE
Override the "country" property with a new max length after an activity referencing it is saved.
ROOT CAUSE
The generated java for activity rules includes a ClipBoardProperty.setEntryCode call whose parameter refers to the max length of the property, for example pz_5.setEntryCode("sTN255") was generated when the max length is 255 characters. When the property max length is changed, the system does not regenerate the java for the activity.
RESOLUTION
Copy the activity after removing the property's max length to resolve the issue.
BNY Mellon
US
Ah, I see. There's actual several SA's on this, and they're not consistent, so they should be aligned
e.g., SA-7312 says "The referencing rule ( Activity in this case), doesn't always call the highest versioned reference rule( property in the highest version of ruleset)."
Well, no, it should explain the problem above. And yet the resolution is more precise: "Doing a RevalidateAndSave of all the referecing or dependent rules solves the issue."
- Jon
-
Cedric Muganda
Morgan Stanley
CA
I had faced this issue too, except that I needed to remove the max length constraint altogether.( The original property was Pega Framework property).
Save as did not create a problem , but the restriction still remained on the property. There is another support article :
Also , a support article about clearing the conclusion cache , but these did not work!
Have to try the activity copy fix and will report my findings!