Back Forward Function form
Completing the Parameters tab

About Function rules

Complete the Parameters tab to declare input parameters for the function, and to test it before you affect other developers by publishing the function.

Because of Java language requirements, a function rule must have a fixed number of parameters. Variable-length argument lists are not permitted.

CautionPlan parameters carefully. After you save a Function form, you cannot change the name, order, or type of parameters. (Use Save As instead of Save in this situation, then delete the unneeded function rule.)

Input Parameters

Field

Description

Input Parameters  
Parameter Name

zzzEnter a variable name that is an input to the function.

Java Type

Enter a Java data type for this parameter, such as String, Page, or Activity (PublicAPI types). The types you can enter depend on the packages imported in the Packages tab in the Library form that this function belongs to.

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: don't enter PublicAPI here 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.

Type

Optional. If the Java Type field is String, you can choose a Process Commander property Type value such as Date, Text, Decimal, or Integer, to validate the type at runtime.

Leave blank for other values of the Java Type field, leave blank.

Page Class

Optional. Not used. If the Java Data Type is ClipboardPage, identify the Process Commander class (the name of a Rule-Obj-Class rule) of the clipboard page that forms this input parameter.

This field is for documentation purposes only.

In/Out

Leave blank. This field is not used.

Description

Optional. Enter a brief text description of this parameter.

Output and Classification

Output  
Return 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 Process Commander Type of a Single Value property.

Page Class

Optional. If the Return Type is ClipboardPage, identify the Process Commander 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.

Compilation Status

Field

Description

Compilation Status  
Function ready to be Compiled?

Leave this check box cleared until you finish coding the function.

At any time when this check box is cleared, another application developer can create another function with the same name. If you select this check box but your function does not work correctly, you might unintentionally prevent other developers from completing work that they could otherwise complete.

After you've tested the function and confirmed that it is ready for use, select this box and save the rule instance.

Ordinarily, select this check box before you check in the updated function rule; a warning appears if you check in a function that is not marked as ready.

 Test Library Generation  

After you've saved the instance, but before you click the  Generate Library   button, click to find any language errors.

 Generate Library  

Click to update the library on the Process Commander system (on the current node only).

CautionDo not click this button until you have clicked  Test Library Generation  and performed other testing to confirm that your function works as intended. If you generate a library that includes compilation errors, but has the same RuleSet and version as a previously generated library that compiled, the older, working CLASS files are overwritten. This can affect processing of other users of the library

zzz About Function rules