Closed
Can we set Dynamic Setting Values Programatically?
Have a requirement to set DSS values programmatically as part of a process. Is there any function to do it?
This content is closed to future replies and is no longer being maintained or updated.
Links may no longer function. If you have a similar request, please write a new post.
Have a requirement to set DSS values programmatically as part of a process. Is there any function to do it?
Here's code used by one of our tools. You will need to modify this code. The main things it does are:
1) Uses setDynamic to set the new value.
2) Throw away Declare_CachedDataSystemSettings page so new value is picked up right away instead of later.
/Eric
String owningRuleSet = "Pega-ProCom";
PublicAPI tools=ThreadContainer.get().getPublicAPI();
if (tools == null) throw new PRAppRuntimeException("Pega-RULES", 0,
"Unable to get tools");
boolean retValue = ((PegaAPI)tools).getSystemSettings().setDynamic(owningRuleSet,
trackSavesName, "false");
// clear cache so our new value is seen immediately
ClipboardPage cachedSettings = tools.findPage("Declare_CachedDataSystemSettings");
if (null != cachedSettings) cachedSettings.removeFromClipboard ();
Please check if the OOTB activity @baseclass.pxSetDynamicSystemSetting is of any help to you. Maybe you can copy the java code used in step 1 of this activity into a function.
String owningRuleSet = tools.getParamValue("owningRuleSet");
String setting = tools.getParamValue("setting");
String value = tools.getParamValue("value");
result = tools.getSystemSettings().setDynamic(owningRuleSet, setting, value);
Question Solved
Question
Question
Question Solved
Question Solved
Question
Question Solved
Question
Question Solved
Question Solved
Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.