Records can be created in various ways. You can add a new record to your application or copy an existing one.
Based on your use case, the Create or Save As form is used to create the record. The number of fields and available options vary by record type. Start by familiarizing yourself with the generic layout of these forms and their common fields:
This help topic then identifies the key parts and options that are applicable to the record type that you are creating.
Create a Function rule in Designer Studio by clicking: +Create > Technical > Function.
A Function rule has two key parts:
Field |
Description |
Library Name |
Select the name of an existing library rule in the ruleset that is also to contain this function. Note: Create a library rule before creating any functions for the library. |
Identifier |
Enter a name for a function. Begin the name with a letter and use only letters and digits. The name must be a valid Java identifier; see How to enter a Java identifier. Overloading functionsYou can choose a function name that already exists in that library (or other libraries of that name), if the type, order, and number of the new function's parameters are not the same as the type, order, and number of the existing function's parameters. The function name and parameter types together are known as the signature. To overload a function, open the original function and use the Save As toolbar button. If one function has multiple signatures, the system generates a hash function of the parameter types to distinguish them internally. When calling a function, the appropriate instance is matched based on signature. |
The Name and Java Type input parameters are defined on the Create and Save As forms.
There must always be at least one parameter present, although the field can be left blank if the Rule-Utility-Function rule has no parameters. Clicking delete on the first row when it is the only one parameter present deletes the contents of the field, but not the row.
Note: Once a function is created, the total number of, order, and type of parameters cannot be changed.
For reference purposes, a hashed version of the input parameters is contained within the rule signature.
Field |
Description |
Name |
Enter a variable name that is an input to the function. After creation or initial save of this form, this field can be updated on the Parameters tab. |
Java type |
Enter a type for this parameter, such as Note: After creation or initial save of this form, this field cannot be updated. When the system generates the Java from a function rule, it converts an Similarly, the conversion from Note: When you need to use Java.Util.Date, set the Java type field to |
When initially creating or saving input parameters, Pega Platform performs a validation check for duplicate functions, such as those that have the same signature in the same ruleset version.
At this time, the system also validates the following conditions for parameters: