Function form
|
|
Complete the fields on the Parameters tab to define input parameters to this function. Use the available options on this tab to test your changes before you publish the function and impact other developers.
Because of Java language requirements, a function rule must have a fixed number of parameters. Variable-length argument lists are not permitted.
Plan your parameters carefully. After you save the Function form, you cannot change the name, order, or type of parameters. To work around this scenario, click Save as to create a new function with your changes and delete the original function.
Field |
Description |
Parameter Name |
Enter a variable name that is an input to the function. |
Description |
Optional. Enter a brief text description of this parameter. |
Java Data Type |
Enter a type for this parameter, such as
When the system generates the Java from a function rule, it converts an Note: When you need to use Java.Util.Date, set the Java Data Type field to |
Pega Type |
Optional. If the Java Data Type field is Leave blank for other values of the Java Data Type field. |
Page Class |
This field is for documentation purposes only. If the Java Data 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 pass a parameter page to a function alias.