You are here: Transaction Rules > Transaction Elements > Math Elements > Math and MathVariable Element Overview

Oracle® Insurance Rules Palette Release 9.3.1.0 E21044_01

# Math Element and MathVariable Element

Within the <Math> element, calculations can be evaluated using MathVariables. MathVariables are variables that are used in the Math section of transaction configuration and use the <MathVariable> tag. A MathVariable name is assigned as the value of the attribute VARIABLENAME. After you name the MathVariable, you will identify what type of MathVariable you want to create. There are various types of MathVariables available to configure processing. MathVariables can be used to pull a field value, create arrays, structure if-then structures, perform calculations with operators or call functions. Each of the math types has its own set of attributes, sub-elements and possible values, which are listed below. All MathVariables must have a data type declared using the DATATYPE attribute.

The <MathVariable> tag can use a LOG="Yes" attribute, which will log results to AsMathActivity.

There are also <MathLoop> and <MathIF> elements, which are available to perform loops and if conditions, respectively. Both must have a data type declared as well.

Available DATATYPE options

- BOOLEAN

- CURRENCY

- DATE

- DECIMAL

- INTEGER

- TEXT

- MAP

- OBJECT

Note: DATATYPE of either decimal or integer may not be blank and a DEFAULT attribute must be defined.

Additionally, the <Math> element may optionally contain the elements <Disbursement> and <Assignment>. The business event of creating disbursements or assigning money types logically and chronologically applies after math calculations so these tags should be after the appropriate MathVariable calculation has processed. MathVariables may be used to pass values into spawn configuration. Math processes from top down in the configuration, as does the ability to use MathVariables in configuration.

## Math Element Example

<Math>

<MathVariables>

<MathVariable VARIABLENAME="MyVariable" TYPE="VALUE" DATATYPE="INTEGER">0</MathVariable>

</MathVariables>

<Assignment TYPE="GrossFullWithdrawalWithAllocations">

<MoneyType NAME="DisbursementAmountRemoved">32</MoneyType>

</Assignment>

<Disbursement DisbursementType="DisbursementMethod" APPROVAL="Yes">

<DisbursementRole TYPE="GUID" DISBURSEMENTAMOUNT="Activity:DisbursementAmount">Activity:RoleGUID</DisbursementRole>

</Disbursement>

</Math>

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

Open table of contents