Enter the Java code for the edit input rule in this tab. Write the body of a Java class that has two inputs:
Java.lang.String
variable named theValue
itsType
.The value of itsType
corresponds to the Type of the property. It matches one of nine predefined Java constants:
TYPE_TEXT
, TYPE_IDENTIFIER
, TYPE_PASSWORD
, TYPE_DATETIME
, TYPE_DATE
, TYPE_TIMEOFDAY
, TYPE_TRUEFALSE
, TYPE_NUMBER
or TYPE_DECIMAL
.
In the Java code, convert the initial value to a desired resulting format. If the input value of theValue
is already in the correct format, your Java code can return it unchanged.
After you save the Edit Input form, the system appends the statement:
return theValue;
to your source code, and also adds the appropriate class wrapper declarations.
See More about Edit Input rules for additional guidance on Java code that you can use here.
Field |
Description |
Java Source |
Enter Java source that converts the value of the string Your Java source extends the Java class Type your Java directly into the Java Source text box. Use the You can use the normal Pega Platform syntax to call a function rule: ruleset_library.FunctionName(arg1, arg2, arg3) where the ruleset and library name are in lowercase but the function name is in exact case. For example: double d_result = pegarules_math.Sqrt("4") In releases before Version 4.2SP6, a different fully qualified syntax was employed to call function rules; it still executes correctly but is deprecated. |