Application Settings feature
Before an application is live, it moves through many environments, such as development, quality assurance (QA), and staging, before production.
When migrating an application from one server or environment to another, references to the external systems connected to the application, such as endpoint URLs and JNDI servers, typically change. You need to modify the information the application requires to connect to these external systems, depending on your environment.
For example, a stock trading company has a Pega Platform™ application, which points to a web service for stock pricing data and an email server for notifying users by email.
In the following image, click the + icons to identify how Application Settings work:
The previous example provides only two sets of settings, but an application can have dozens of connectors and setting information. You do not want to update the environment settings for each application individually or risk missing one and delaying the application going live.
To avoid missing any settings, use the Application Settings feature to reference external systems by environment. You can use Application Settings to define values for settings, which can vary by environment, without updating integration Rules and data instances. Application Settings can have one of the following value types:
- Enumerated list
Application Settings categories
A Pega Platform application can have many Application Settings. Using Categorization, developers can group related Application Settings to simplify finding them and understanding their purpose.
Create categories to make it easier for users to search for Application Settings. For example, if you create a category called Integration, you can apply this category to Application Settings that relate to integrating with customer data. In Dev Studio, select , and provide a short description and name.
In the following image, the example shows the fields required to create a new category.
Categories can also have parent categories to group similar categories by purpose, for example, Security. To group multiple categories, on the Definition tab, in the Parent category ID field, press the Down arrow key to specify a parent category.
Application setting values
You configure separate values for different production levels in Dev Studio. At run time, the system uses the Application Setting value that corresponds to the current production level.
Production level values support the following environments:
1 - Sandbox
2 - Development
3 - Quality assurance
4 - Staging
5 - Production
View, search for, and edit Application Settings from the Application Settings landing page in Dev Studio.
Open the Application Setting Rule that you want to change. In the Production value, ensure that the Application Setting Rule is in the production Ruleset.column, enter the setting value for the specified production level. Before you change an Application Setting value, ensure that the Application Setting is in an unlocked Ruleset. For example, to change the
The following image shows the Application Settings, Settings tab, where you can modify the values for each production level:
Note: The fields in the Value type field. For example, if you choose
String/text, the column displays fields in which you enter a text value. If you choose
Boolean, you will see a checkbox instead.column display differently depending on the value type that you select in the
Out-of-the-box Data Page for Application Settings
Pega Platform provides an out-of-the-box (OOTB) Data Page, D_PxGetApplicationSettingValue that makes it easier to retrieve the values you need. You create Application Settings in which you store the values, and then the Data Page brings the environment property Rules together with the values and writes those property and value pairs to the Clipboard.
In the following example, an OOTB Data Page is used to fetch the Application Setting values:
For example, you can create a new Application Setting that contains the configuration settings for an integration with values that change from one environment to the other. At run time, the system accesses the D_pxGetApplicationSettingValue Data Page to load those settings.
Note: To learn more about settings, see Configuring dynamic references to external systems by using the Global Resource Settings feature.
Check your knowledge with the following interaction: