Featured post

GetNextWork functionality in pega

What is GetNextWork in pega? Pega provided a functionality to get the most urgent assignment(task) for user to work on. This is configured o...

Global resource setting (GRS) in Pega

Global Resource Setting in Pega (GRS) allows to reference external system values, port numbers, addresses and URLs.We can avoid using fixed text values in rule forms.Application moves to different environments before it goes live like Dev,QA,Staging and Pre-prod.When we migrate application from one environment to other environment, external system references such as End Point URLs, JNDI names typically changes depending on the environment. We cannot log into each environment and update the rules with correct values or settings by unlocking rule sets, especially in Production. Global Resource Settings allows us to set values for settings that can vary depending on the environment without requiring the update of data instances and integration rules.

Let's take an example for Connector where we need an EndPoind URL to connect external system.

what is global resource settings in pega

If we do not configure GRS whatever URLs we have in pre-prod or lower environments will be moving to Production environment where we have real EndPoint URLs, then we need to unlock the rulesets and update EndPoints with correct values. Sometimes we may miss to update the endpoints resulting delay in go live or issues in production.
To avoid this delay and risk we need to have GRS to hold all the values and settings so that we can easily migrate our code and make go live success.


We are creating GRS for SOAP Connector for Currency Conversion which is already generated by Wizard.

Configure GRS in Pega

Syntax for global Resource Settings is 
=DataPageName.IntegrationPropName.FieldPropName

PageName           Name of the data page
FieldPropName -  One of the properties
Important steps to configure GRS
1. Create a class and dedicate this to GRS configuration.
2. Create an environment page property.
3. Create a Data transform to set values to environment page properties.
4. Create a Data page which binds everything together.

1. Create a class and dedicate this to GRS configuration.
    Purpose of a dedicated class is to hold all environment properties which represent external system reference. As a best practice create this class in base class of integration like "Env".
what is global resource settings in pega

2. Create an environment page property.
Create a page for each environment reference. We have number of environment references in pega like below:
Embed-Env-Connect-EJB
Embed-Env-Connect-HTTP
Embed-Env-Connect-JMS
Embed-Env-Connect-MQ
Embed-Env-Connect-SOAP
Embed-Env-Connect-JNDI
You can find all eligible environment classes supports GRS syntax here : Classes supports GRS
For SOAP Connector we will use "Embed-Env-Connect-SOAP" in page property.
page property in pega

3. Create a Data transform to set values to environment page properties.
This will be the source for Data page and by using this Data Transform we will set values to those properties.Pega OOTB functions can be used to set values to the page properties from DSS (Dynamis System Settings).
If we hardcode the URL's in Data Transform, we need to unlock the rulesets and update the corresponding URL's in respective higher environments(eg: QA, pre prod, Prod etc), this will lead to manual errors and is not suggestable. To avid this we Pega provides us DSS feature. DSS have no ruleset version we can simply open the DSS in prod and update our endpoint or whatever the value here.

Dynamic system settings in pega

dss in pega

@getDataSystemSetting("MyToInt","GRS/RateConv/CurrCheck")

4. Create a Data page which binds everything together.
    Create a data page to bind all the values together. As a best practice use integration to avoid confusion.

Data page screen shot

data page in pega
Finally how to reference in Connect SOAP:
We can refer service endpoint URL in service tab of Connect SOAP rule.
grs and datapage
Execution steps in runtime:
1. Connect SOAP is invoked.
2. Service endpoint URl is value referenced in data page.
3. Data transform executes for the data page, if the page is not there in the clipboard
4. Data transform runs the function to get the value of dynamic system setting.
5. Value in pyEndPointURL from CurrencyCheck page will be used by SOAP connector to invoke the service.


2 comments:

  1. i am very thankful for this post

    ReplyDelete
  2. Thank you. Please read other posts and give your commets/questions.

    ReplyDelete