Saturday, April 28, 2018

How to fetch DSS from javascript in Pega

Context :

Let's assume we need to set timeout to some value, which should be driven by DSS of Pega.
And this timeout value is to be conditionalized in JavaScript to push some event to some external data storage (like Cassandra).

DSS : Dynamic System Setting : where we can set the value globally which can be used across the application. And the change in DSS doesn't need any restart of server.

Step by Step:

1. Create Dynamic System Setting (DSS)
    OwningRulesetName : Your desired name (ex: OwningRuleset)
    DSSName : Your desired DSS name (ex: DSSName)
2. Create HTML Fragment rule : non-autogenerated rule. 
3. Write input tag of type hidden with your desired "id". In this example id is given as "timeout".
    And access the value with Rule Utility Function getDataSystemSetting. 
4. Place the script to fetch the element value
5. Include this HTML fragment wherever you need to access this value as per requirement.



Note: Step by Step illustration : Work in Progress

1 comment:


HowToPega : All rights reserved and the contents are copyrighted to Pavan Kumar Naidu