Application settings – Usage & Configurations in Pega

In this blog article, we will see how we can use the application settings rule in pega.

Application settings rule was introduced in Pega 8.3 version. In the previous releases, application settings were called the rule system settings.

Please visit my previous blog article, to understand more about the system settings.

What is an Application settings rule?

– Application settings rule is of SysAdmin category.

– Application settings are rule instances – means the rule cannot be updated without an unlocked version unlike data instance like DSS.

– The configuration of application settings is exactly similar to older system settings rule with values that differ per production level.

Use case of application settings

We know that for an application to go live in production, it passes through different environments like development, test, staging and production. Pega uses the production level as an identifier for the environment.

  1. Sandbox/research
  2. Development
  3. Testing
  4. Staging
  5. Production

Applications normally use different configurations per environment. For example – external URLs.  

We never use the production service URLs in lower environments. Similarly, there can be many other configurations like Keys, timeout seconds, etc that can differ per environment.

Application settings rule can hold these configurations per environment within the pega rulebase. As a best practice, these URLs ( or other configurable items) should not be kept hardcoded inside the integration rules like connectors or the calling activities. Instead, it should be stored in the settings rule so that it can be maintained easily.

Scenario – let’s say pega customer service application uses the customer details from an external Siebel system. Application needs to make an external REST service call to get the customer details. For dev and test, we need to connect to wiremock stub to get the test data and for staging and production, we need to connect to different URLs.

Dev and test – https://wiremock-crm/siebel/customerdata

Staging – https://siebel-crm/uat/customerdata

Production – https://siebel-crm/customerdata

How to create a new application settings rule?

Step 1: Create new instance

Records -> SysAdmin -> Application settings -> Create new

Step 2: Define category for the application settings rule.

Though it is not mandatory, it is best practice to define category for the application settings rule.

Let’s create a new category instance.

Tip: Think in a broader scope and create categories so that you can reuse or categorize the application settings in an organized way.

You can create multiple-level categories and specify the parent-child relationship (tree structure)

I am going to create the category structure as – Integration – URL

Records -> SysAdmin -> Category -> Create new

Create two categories and specify Integration as parent to URL.

You can also create and specify categories as Integration.Siebel.URL. Consider your own meaningful category structure.

Now Specify the Integration.URL category in the application settings instance.

Step 3: Specify the value type.

You have different options to define the application settings value.

Mostly we will use the default String/text option. I am also going to use string/text data type.

Step 4: Specify the value per environment.

You also see a note that Global resource syntax is supported for value. It means you can dynamically refer (=PageName.PropertyName) to load the values.

Save the rule.

Now you have successfully configured the environment-specific URLs in the application settings rule instance.

How do you refer the application settings values?

1. For URLs – Directly in connector rules

In the URL configuration, you can use the application setting.

Note: Remember to use the entire structure as category.setting

Based on your production level, application settings value will be substituted.

2. In calling activities or data transforms
Using datapage reference

You can use the data page with the right parameters to load the application settings value.

Data page name – D_pxGetApplicationSettingValue with owning ruleset and purpose as the parameters.

Execute the data page with the right parameters. You will find the application setting value for the development environment (production level – 2)

Using function

We can still use the same function – GetRuleSystemSetting that is used till 8.2 and previous releases that retrieve the system settings value. It can be used for application settings value as well.

Now a final question.

What happens to the older rule system settings? Will it get deleted, how do we smoothly migrate from rule system settings to application settings?

A simple answer. Both the rule instances are of class Rule-Admin-System-Settings J. Nothing gets deleted or disappears from the system. Pega just modified little configurations and changed the naming. Do not worry about it. Start using meaningful category names in the application settings.

 As a summary,

– Application settings rule is introduced in 8.3 version and set to replace the rule system settings.

– Use category instance to meaningfully group the application settings rule instance based on its usage.

– Refer the application settings directly in the connector rules for URL and from an OOTB data page reference.

Ending this short blog article.

A technical team dedicated to empowering the Pega ecosystem with in-depth knowledge, guided by Premkumar Ganesan's vision.