You are here: Business Rules > Function Rule > Function Element

Oracle® Insurance Rules Palette Release 9.3.1.0 E21044_01

# Function Element

## Description

A user-defined function contains common calculations or functionality broken into distinct and logical pieces. A function can be used repeatedly as needed. Functions may define input values that are required for correct execution. Functions may also define multiple output values.

A function is a type of business rule that is created at the global level with a Function rule type. Functions consist of four components:

1. Input parameters
2. Output parameters
3. Return value
4. Math section

## 6Function Element/Attribute Table

Element/Tag | Definition | Attribute | Element/Attribute Value and Description
--- | --- | --- | ---
<Function> | This is the start and end tag for the business rule. | NAME | Name of the Function. Standard naming convention is to prefix a descriptive name with "Function-".
RETURN | Identifies the math variable with the value that will automatically be returned by the function. Standard naming convention is to prefix the variable’s name with "r". This attribute is required.
DATATYPE | Required; Date:date Decimal:decimal value Boolean:true or false
<Parameters> | Opening and closing tags for a list of parameters. |  |
<Parameter> | Parameters are optional elements; however, once defined, either the caller or the function itself must create the variable referenced in the parameter list. | TYPE | INPUT or OUTPUT. The value of the TYPE attribute indicates whether the parameter is treated as input or output. For an input parameter, the value of the element becomes a variable that can be referenced in the Math. Standard naming convention is to prefix the name with "p".An input parameter must be created by the caller of the function. For an output parameter, the value of the element is a math variable established in the function’s Math section. Standard naming convention is to prefix the name with "r". An output parameter, once defined in the parameter list, must always be created in the function.
|  | DATATYPE | Identifies the type of data that must be passed in or out of the function. All existing math variable data types are available.
<Math> | See Math section. |  |

## XML Example

    <Function NAME="Function-XXXXX" RETURN=”r;rYYYYYY" DATATYPE="TEXT">

    <Parameters>

    <Parameter TYPE="INPUT">pMMMMM</Parameter>

    <Parameter TYPE="OUTPUT">oFFFFF</Parameter>

    </Parameters>

    <Math>

    <MathVariables>

    <MathVariable VARIABLENAME="oFFFFF"></MathVariable>

    <MathVariable VARIABLENAME="rYYYYYY"></MathVariable>

    </MathVariables>

    </Math>

    </Function>

Note: Attending the Oracle Insurance Policy Administration Configuration IV class offered by Oracle University is highly recommended. This class overviews advanced Math configuration fundamentals, which are required to configure correctly.

Copyright © 2009, 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices

Open table of contents