Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Utility functions for the Global Resource Settings feature

Updated on April 6, 2022

Standard utility functions gather environment property values and encode passwords. You can call these functions in your data transforms.

To use these functions to retrieve environment property values or encode passwords, enter a call to the appropriate function in the data transform. The syntax of the call is as follows:

Lib(LibraryName).FunctionName()

where LibraryName is the name of the function library, and FunctionName is the name of the function you are calling.

For more information, see Data transforms.

The following table lists utility functions for use with the Global Resource Settings feature. For an overview of the Global Resource Settings feature and how to implement it, see Configuring dynamic references to external systems by using the Global Resource Settings feature.

Note: As a best practice, create application settings and reference the settings in your fields. Application settings provide a simple model for storing and organizing the environment-specific settings in your application. Use Global Resource Settings only for fields that do not support application settings. For more information, see Creating an application setting and Categorizing application settings.

Pega-RULES.Utilities Library

NameDescriptionParameters
getDataSystemSettingReads the specified Data-Admin-System-Setting from the database and returns it as a string.

owningRuleSet (Required) - The RuleSet that the system setting is associated with.

setting (Required) - The setting to retrieve from the database.

getRuleSystemSettingReads the specified Rule-Admin-System-Setting from the database and returns it as a string.

owningRuleSet (Required) - The RuleSet that the system setting is associated with.

setting (Required) - The setting to retrieve from the database.

getJavaSystemPropertyReturns the specified Java system property as a String.key (Required) - The system property to retrieve.
getJavaPropertyFromFileLoads the specified Java properties file and returns the value of the property specified in the function's Key parameter as a String. If the property cannot be found, the function returns an empty string.

fileName (Required) - The name of the file containing the Java property.

key (Required) - The property to retrieve.

getJNDIEntryDoes a lookup for the specified JNDI entry and returns it as a string. If the lookup cannot be performed, the function returns an empty string and writes an error to the log.name (Required) - The name of the JNDI entry.

Pega-RULES.Default Library

NameDescriptionParameters
Encode

Implements a simple encoding and decoding algorithm that incorporates base64 encoding.

Use this function to encode password values for use with the Global Resource Settings feature.

inputStr (Required) - The string to encode.
  • Previous topic Embedded classes and default environment properties
  • Next topic Fields that support the Global Resource Settings syntax

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us