Back Forward Function form
Completing the Parameters tab

  1. About 
  2. New 
  3. Parameters 
  4. Java 
  5. Alias 
  6. Imports & Exceptions 
  1. History 
  2. More... 

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.

CautionPlan 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.

 

Input Parameters

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 String, Page, or Activity. The types you can enter depend on the packages imported in the Packages tab on the Library form that to which this function belongs.

NoteWhen the system generates the Java from a function rule, it converts an Activity parameter type to a PublicAPI parameter type. This conversion is automatic. Do not manually enter PublicAPI as the type. Similarly, the conversion from Page to ClipboardPage is automatic. The system performs these conversions in a way that allows the function rule to be called in a Java step in an activity whether it uses the 02 or 03-02 version of the PublicAPI.

Note: When you need to use Java.Util.Date, set the Java Data Type field to String.

Pega Type

Optional.

If the Java Data Type field is String, you can choose a PRPC property Type value such as Date, Text, Decimal, or Integer, to validate the type at run time.

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 ClipboardPage, identify the class name of the clipboard page that forms this input parameter.

In/Out

Leave blank. This field is not used.

 

Output

Java Data Type

Enter a Java data type for the return value.

CautionYou can enter void here, but a property cannot obtain a value from a function with a void return. That is, you can't use functions with a void return type to set a property value.

Pega Type

Optional.

If the Return Type is String, or is a primitive type (boolean, char, byte, short, int, long, float, or double), identify the Pega Type of a Single Value property.

Page Class

Optional.

If the Return Type is ClipboardPage, identify the PRPC class (the name of a Rule-Obj-Class rule) of the clipboard page that is to be returned.

 

Classification

Usage Type

Leave blank. This field is not used.

Description

Leave blank. This field is not used.

 

Rule Type Parameters

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:

  1. Create a function named AddPendCode that takes one string parameter named CodeID.
  2. Map CodeID to the name key part of the Rule-PendCode class.
  3. Create a collection named ProcessPendCodes that calls the AddPendCode function and passes 17 as the CodeID value.

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:

  1. Click the add row icon.

  2. Select a fully qualified class name from the Rule Type list.

    Available options are restricted to Rule- classes that have a category defined.

  3. 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.

  4. Enter an input parameter name in the Key Value column next to each key part name.

    Alternatively, enter string values in these fields.

  5. Save the function.

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.