You are here: Transaction Rules > Transaction Elements > Math Element > MATHLOOP

Oracle® Insurance XML Configuration Guide Release 9.4.0.0 E18894_01

# MATHLOOP

## Description

The MathLoop math variable provides a method of executing a set of instructions that are to be repeated. Each type of repetition is called iteration. There are four types of Loops currently supported in OIPA: FOR, SEGMENT, OBJECT and VALUATION.

1. Configure a MathLoop that is TYPE="FOR" (allows the system to repeat instructions to loop for a specified number of iterations. The number of iterations can be specified by using a hard-coded integer value or a defined Math variable. If a Math variable is used the Math variable can calculate the amount of needed integers).

2. Configure a MathLoop that is TYPE="SEGMENT" (allows the system to loop through segments listed on/for a specific policy/certificate. By default, the SEGMENTLOOP will loop through all segments, inactive as well as active, unless the Math variable property for Condition is populated/configured. The Condition attribute/property is typically used to instruct the system to only loop through active segments).

3. Configure a MathLoop that is TYPE="OBJECT" (provides a method to loop through any OIPA database table. OBJECT and OBJECTFIELD Math variables are used inside the OBJECTLOOP to set up the table to be looped through, then retrieve the values from the table).

4. Configure a MathLoop that is TYPE="VALUATION" (provides a method to loop through the values of Valuation records held in memory as the activity processes but before it is written to the database tables).

| Important | Valuation Loop is only used with PostAssignmentValidateExpressions Business Rule).

## MATHLOOP Element/Attribute Table

TYPE=MATHLOOP
Element | Attributes | Attribute Value | Element Value | Definition
<MathLoop> | TYPE | OBJECTLOOP | Configuration for statements that are repeatedly executed for each object in the collection. |
OBJECTNAME | Name of the object where the data resides. This coincides with a database table. |  | This is the table that is being used for the loop without the As, for example Client should be used for AsClient.
KEY | Column name that is the key for the database table referenced in OBJECTNAME. |  |
CONDITION | A string value that must be compatible with the SQL predicate used to retrieve the object data. |  |
| TYPE | FOR | Setting up the number of times the system will go through the loop configuration. The value may be a hard-coded literal value, a previously defined Math Variable of the Integer Data Type. |
| ITERATIONS | Integer Value or Math Variable containing the Integer Value. |  | The number of times to go through the loop.
| TYPE | SEGMENT | To loop through segments on a policy or certificate. By default the segment will loop through all segments, inactive as well as active, unless a condition specifically references which Segments are applicable for the loop. |
| CONDITION | Condition to evaluate. | Used to instruct the system which segments to loop through. | See operators for more details. Allows for the filtering of segments as you may only want to loop through active segments for example.
| POLICY: | '[Policy:PolicyGUID'] | Required for every Segment MathLoop. | Always the same value noted.
| TYPE | VALUATION | Provides a method for looping through a dynamic number of valuation records calculated per fund for each transaction. Filtering should be available based on FundGUID so that you are looping through Valuation records for a specific Fund. |

## XML Example

    <MathLoop VARIABLENAME="ClientLoop" TYPE="OBJECTLOOP" OBJECTNAME="Client" CONDITION="TypeCode="02'"
     KEY="ClientGUID">

    </MathLoop>

    <MathLoop VARIABLENAME="SuspenseLoop" TYPE="FOR" ITERATIONS="SuspenseArrayCount">

    </MathLoop>

    <MathLoop VARIABLENAME="Segments" TYPE="SEGMENT" CONDITION="FieldName='SegmentActiveCode' AND TextValue = '01'" POLICY="[Policy:PolicyGUID]">

    </MathLoop>

    <MathLoop VARIABLENAME="ValuationLoop" TYPE="VALUATION">

    </MathLoop>

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

Open table of contents