Your browser does not support JavaScript!
You are here: Transaction Rules > Transaction Elements > Math Elements > MathLoop Element

MathLoop Element

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 OICE: 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 OICE 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).

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.  

<MathVariable>

 

 

 

See MathVariable Element.

<MathIF>

 

 

 

See MathIF Element.

<MathLoop>

 

 

Note: This element is used only in ScreenMath.

See MathLoop Element.

XML Example

<MathLoop VARIABLENAME="Segments" TYPE="SEGMENT" STATUS="01" POLICY="[Policy:PolicyGUID]">
<MathVariable VARIABLENAME="CurrentIndex" TYPE="LOOPINDEX" SOURCEARRAY="Segments" DATATYPE="INTEGER"></MathVariable>
<MathVariable VARIABLENAME="SegmentGUID" TYPE="SEGMENTFIELD" SOURCEARRAY="Segments" DATATYPE="TEXT">SegmentGUID</MathVariable>
<MathIF IF="CurrentIndex=0">
<MathVariable VARIABLENAME="SegmentPremPayEndDate" TYPE="COLLECTION" OPERATION="CREATE" DATATYPE="MAP"></MathVariable>
<MathVariable VARIABLENAME="SegmentPremPayStartDate" TYPE="COLLECTION" OPERATION="CREATE" DATATYPE="MAP"></MathVariable>
<MathVariable VARIABLENAME="SegmentWaiverStatus" TYPE="COLLECTION" OPERATION="CREATE" DATATYPE="MAP"></MathVariable>
</MathIF>
<MathVariable VARIABLENAME="TypeCode" TYPE="SEGMENTFIELD" SOURCEARRAY="Segments" DATATYPE="TEXT">TypeCode</MathVariable>
<MathIF IF="TypeCode='35'">
<MathVariable VARIABLENAME="SegmentPremPayEndDate" TYPE="COLLECTION" OPERATION="SETVALUE" KEY="SegmentGUID" DATATYPE="DATE">Activity:EffectiveDate</MathVariable>
<MathVariable VARIABLENAME="SegmentPremPayStartDate" TYPE="COLLECTION" OPERATION="SETVALUE" KEY="SegmentGUID" DATATYPE="DATE">DisabilityStartDateMV</MathVariable>
<MathVariable VARIABLENAME="SegmentWaiverStatus" TYPE="COLLECTION" OPERATION="SETVALUE" KEY="SegmentGUID" DATATYPE="TEXT">WaivingPremiums</MathVariable>
</MathIF>
</MathLoop>

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