LinkedIn
Copied!

Table of Contents

Utility functions for the Global Resource Settings feature

Version:

Only available versions of this content are shown in the dropdown

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.

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

Name Description Parameters
getDataSystemSetting Reads 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.

getRuleSystemSetting Reads 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.

getJavaSystemProperty Returns the specified Java system property as a String. key (Required) - The system property to retrieve.
getJavaPropertyFromFile Loads 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.

getJNDIEntry Does 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

Name Description Parameters
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.
Did you find this content helpful?

Have a question? Get answers now.

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