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

Oracle® Insurance XML Configuration Guide Release 9.4.0.0 E18894_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 AsActivityMath. When using logging, remember that the system performs all logging at the end of transaction processing. Therefore, only the ending value of a MathVariable is logged. Although the configuration allows the LOG attribute on any use of a variable in the configuration, the intermediate values are not logged, even if LOG="Yes" occurs multiple times for the same variable. In such a case, to avoid confusion it is best to specify the LOG attribute only for the last use of the variable. Another method is to create a "Log Section" at the bottom of the configuration that specifies all math variables to be logged.

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

- ACTIVITY

- 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