Oracle® Rules Palette Release 9.1.0.0.0 E15811-01

# Create a New Function

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

1. Go to Global Rules Explorer tab.

2. Right-click on the Functions folder.

3. Select New Global Rule for Category Functions.

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

5. Functions are always at a global level, you cannot select an override level.

6. Select Function from TypeCode and then select Next.

7. Fill out the template information and select Finish.

8. Configure the function. Refer to the steps below for more details on configuring functions.

Steps to Configure a New Function

1. Double-click the new function's XML file to open it in the Configuration Area.

2. Click the Parameters tab.

3. Enter the name of the function.

4. Enter the return value. Make sure it starts with the letter r.

5. Select the Data type.

6. Click the radio button for Yes or No if function is an array.

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

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

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

10. Check-in the XML file to save your changes to the database.