Question
IN
Posted: Apr 11, 2016
Last activity: Mar 23, 2017
Last activity: 23 Mar 2017 13:31 EDT
Closed
Solved
If we reset the exposed property length in pega 7.1.8 version, it is always considering the old max length not new one. Any suggestions to resolve this issue.
If we reset the exposed property length in pega 7.1.8 version, it is always considering the old max length not new one. Any suggestions to resolve this issue.
Message was edited by: Lochan to add Category
So, one thing you want to verify is that after you changed the property length, does the assembled java of your activity reflect the new length ? Probably not ! If you bring up your activity ruleform and click "save", then it will.
I did the following experiment on 7.1.6 to verify this:
I just created a text property and I gave it a max length of 100, preferred length of 80, and I specified a validate-rule.
Then I made an activity called MyTest in which I put a property-set of this property, and I peeked at the java for the property-set, and I see this:
// LHS: .Myprop
// RHS: "let's see what happens !"
pega.setViaPropRef(".Myprop", pRef_1, myStepPage,
"let's see what happens !", "sTN100", false, true);
Notice the "sTN100". That is related to the fact that I set the max length of the property to 100.
I then made an activity called "Outer" that calls MyTest and used "actions - > trace" and "actions - > run" to experiment with this activity, and noticed the following, which includes the trick of clicking on the "begin activity" line in the tracer to copy the exact activity class name in order to feed it to the pyExtractCode activity (which I also run with actions - > run) :
So, one thing you want to verify is that after you changed the property length, does the assembled java of your activity reflect the new length ? Probably not ! If you bring up your activity ruleform and click "save", then it will.
I did the following experiment on 7.1.6 to verify this:
I just created a text property and I gave it a max length of 100, preferred length of 80, and I specified a validate-rule.
Then I made an activity called MyTest in which I put a property-set of this property, and I peeked at the java for the property-set, and I see this:
// LHS: .Myprop
// RHS: "let's see what happens !"
pega.setViaPropRef(".Myprop", pRef_1, myStepPage,
"let's see what happens !", "sTN100", false, true);
Notice the "sTN100". That is related to the fact that I set the max length of the property to 100.
I then made an activity called "Outer" that calls MyTest and used "actions - > trace" and "actions - > run" to experiment with this activity, and noticed the following, which includes the trick of clicking on the "begin activity" line in the tracer to copy the exact activity class name in order to feed it to the pyExtractCode activity (which I also run with actions - > run) :
1) I run "Outer" and use pyExtractCode to extract the java code using the exact class name for MyTest shown in the tracer activity-begin stack trace ( which for me was com.pegarules.generated.activity.ra_action_mytest_bfa021d2ae6b59e9d4f72dda93da92d3 ) and I see the "sTN100" in it.
2) I CHANGED the property max len to 111, expecting to see "sTN111" when I re-do step one, and I don't !
3) I re-save MyTest and do step 1 one more time and this time I see the expected "sTN111".
The summary: Re-save your activity after you change your property maxlen !
/Eric