|
Oracle® Rules Palette Release 9.1.0.0.0 E15811-01 |
Functions are useful when you need a calculation or process repeated that is accessible by multiple transactions or business rules. Functions are also beneficial when you are only concerned with the output and result values and not the intermediate values calculated by the function.
Function Configuration Standards
Functions are made up of four components. They are listed below along with a description.
Function names: Should always begin with Function- then the name of the function. No spaces are allowed in function names. Ex: Function-ModalFactors.
Input parameters: Passed from the transaction or business rule into the function configuration. Should always begin with p. Ex: pEffectiveDate.
Output parameters: Passed from the function to the transaction or business rule that is calling the function. Should always begin with o. Ex: oFreeAmount.
Return variable: The specific value the function is trying to obtain. Should always begin with r. Ex: rModalPremium.
Steps to Create a New Function
Go to Global Rules Explorer tab.
Right-click on the Functions folder.
Select New Global Rule for Category Functions.
Enter a name for your function and select Next. Function names should always begin with Function- then whatever name you want to name the function. No spaces are allowed in the function name and you should use camel case.
Functions are always at a global level, you cannot select an override level.
Select Function from TypeCode and then select Next.
Fill out the template information and select Finish.
Configure the function. Refer
to the steps below for more details on configuring functions.
Steps to Configure a New Function
Double-click the new function's XML file to open it in the Configuration Area.
Click the Parameters tab.

Enter the name of the function.
Enter the return value. Make sure it starts with the letter r.
Select the Data type.
Click the radio button for Yes or No if function is an array.
Click Add and double-click in the blank field to enter the input parameters.
input parameter name must begin with the letter p.
select the data type from the drop down box.
specify whether it is an array.
Click Add and double-click in the blank field to enter the output parameters.
output parameter name must begin with the letter o.
select the data type from the drop down box.
specify whether it is an array.
Click the Math tab and configure the math section. You can use all functionality available in the MathVariables section of Math with the exception of LOG. Assignment tags should not be used in the Math section of a function.
Note: Refer to the Math Pane section for additional information on configuring in the Math Pane.
Check-in the XML file to save your changes to the database.