Question
Ordina
NL
Last activity: 12 Mar 2020 7:43 EDT
manually set field which has declare expression?
Hi,
we have a field which is normally set through the use of a declare expression. However due to some unforseen events we need to fix a few cases in production where we need some way to set the values of this field 'manually'. We tried all sorts of solutions, withdrawing the declare expression etc etc but cannot find a way to set this field and save the workpage through for instance an activity... The field stays read-only because of the declare expression...
Any ideas hints or tips greatly appreciated.
regards
Leo
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Ordina
NL
Hi Bhavya,
Well here is what worked for me. It was definitely the placement of the withdrawn version of the rule. When the withdrawn version was in a different ruleset then the original declare expression it would not let me save anything touching the property the declare expression had as its target.
Once I saved the withdrawn declare expression in a higher version of the ruleset where the original declare expression was in, all started working and the property could succesfully be updated! Thank you very much again for thinking along with and helping my though proces on this issue.
Regards and greetings, Leo
Pegasystems Inc.
FR
Hello,
Could you try the following: https://collaborate.pega.com/question/how-disable-declartive-network-resave-activity
Ordina
NL
hi
thank you for your reply, however there is the problem that the property-set in the activity does not save as the the property is a target for declarative processing so even the activity to set the property and save the case wont save...
Leo
Coforge DPA
GB
Hi
Ideal way is to withdraw the declare expression first and update the property, but as you mentioned that also doesnt work. Can you explain what is the error you are getting in this?
If the property is exposed, may be you can run the query directly in the DB to update the value
Regards
Bhavya
Ordina
NL
Hi Bhavya,
First thank you for your reply. Well the error I get on for instance a property set in the activity is that the property set is not allowed, up on saving the activity, because the property is allready a target in a declare expression. So the activity will not save and hence the data update is not possible.
I have withdrawn both the property and the declare expression and even recreated the property higher upon the class structure in a higher ruleset version to no avail...
Then i wandered into the depths of pega an even tried to manipulate the saving of the activity with the property set to skip the validation up on saving also to no avail..
So basically a catch twenty two and no ideas today on how to solve this issue on my end.
regards, Leo
Coforge DPA
GB
Hi Leo
I tried this scenario in my local and it works after withdrawing the Declare expresion rule. Screenshots below:
Can you check if there is anything missing in your configuration. May be try clearing the cache or something.
Regards
Bhavya
Updated: 12 Mar 2020 4:06 EDT
Ordina
NL
Hi,
Weird i still get the errors below even after clearing the declarative cache through the REST API... The only obvious difference that i can see is that i have to modify the property on an existing workpage in the system. But then again that should not keep the activity from saving with the property set in it... Also a difference is that i have withdrawn the declare expression in a different ruleset then where the original version lives.
Coforge DPA
GB
Hi
Can you see which DE it is firing, based on the pzInskey you are getting in the error message. This will just confirm if you are looking at right version.
Regards
Bhavya
Accepted Solution
Ordina
NL
Hi Bhavya,
Well here is what worked for me. It was definitely the placement of the withdrawn version of the rule. When the withdrawn version was in a different ruleset then the original declare expression it would not let me save anything touching the property the declare expression had as its target.
Once I saved the withdrawn declare expression in a higher version of the ruleset where the original declare expression was in, all started working and the property could succesfully be updated! Thank you very much again for thinking along with and helping my though proces on this issue.
Regards and greetings, Leo
-
Bhavya Tyagi