The fields on the Parameters tab display input parameters for the function. Input parameters are initially defined on the Create or Save As form.
Note: Plan your parameters carefully. After you save the Create or Save As form, you cannot change the order or type of parameters on the Rule-Utility-Function ruleform. To address this situation, see Utility function instance management.
For reference purposes, a hashed version of the input parameters is contained within the rule signature.
A function rule must have a fixed number of parameters. Pega 7 does not support variable-length argument lists.
Additionally, 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.
Field |
Description |
Name |
This field is initially set on the Create or Save As form. Enter a variable name that is an input to the function. |
Description |
Optional. Enter a brief text description of this parameter. |
Java type |
This field is set on the Create or Save As form. |
Pega type |
Optional. If the Java type field is For other values of the Java type field, leave this field blank. |
Page class |
This field is for documentation purposes only. If the Java type is |
In/out |
Leave blank. This field is not used. |
Java Data Type |
Enter a Java data type for the return value.
You can enter |
Pega Type |
Optional. If the return type is |
Page Class |
Optional. If the return type is |
Usage Type |
Leave blank. This field is not used. |
Description |
Leave blank. This field is not used. |
You can map one or more of your input parameters to key parts of a specific rule type. Defining these associations supports traceability by updating the referencing rules for each collection that calls your function.
For example:
When you save your changes, a rule reference is created between the ProcessPendCodes collection and the instance of Rule-PendCode named 17.
To map an input parameter to a rule type:
Click the add row icon.
Select a fully qualified class name from the Rule type list.
Available options are restricted to Rule- classes that have a category defined.
Review the list of key parts for your selected rule type.
Each item in the Key name column represents a key part on the General tab of the class.
Enter an input parameter name in the Key value column next to each key part name.
Alternatively, enter string values in these fields.
At run time, the system uses the step page of the calling rule to determine the applies to key part for each rule type. You do not need to explicitly map an input parameter to this key part.
To pass parameters to a mapped rule type, see How to use parameter pages with a function alias.