Valuation Loop
The new PostAssignmentValidateExpressions introduces a new loop type called Valuation. This new type allows math to loop through the values of the Valuation records held in memory as the activity processes but before it is written to the database tables (AsValuation and AsUnitLinkedCalcValue). The loop is able to reference all valuation records related to the activity; records both in memory and those already commited to the database during prior processing.
The looping method operates much like the Segment loop in that it only loops through a predefined object (in this case, valuation records in memory). The loop may be filtered at a high level based on FundGUID so that the loop only contains records for a specific fund or it can include the entire valuation dataset. The data available to the loop includes all the columns defined in AsValuation as well as AsUnitLinkedCalcValue and AsFund as a seemless data source.
It is not required to specify an activity or policy for the loop as it will only access the records in memory for the current activity.
Common applications of the loop are:
- Check to see if the activity results in a fund being over allocated (insufficient funds for the transaction).
- Check to see if the total amount of the transaction is within the business defined tolerances.
- Calculate accurate allocation values for spawned activities based on the total transaction amount.
Configuration Requirements
The Withdrawal transaction in the Unit Linked Template uses the valuation loop to check the total removal amount of a fund specified in the activity entry fields. Navigate to Global Explorer | Transactions | Withdrawal | Withdrawal (Unit Linked Template).
- create the transaction that will process assignment values.
- configure the PostAssignmentValidateExpressions business rule that includes a valuation type math loop.
The AggregateFunction (Method=Count) syntax is supported to provide a count of valuation records in memory as defined by the loop math variable (either all records or those containing a specified Fund GUID).
The LoopIndex math variable allows specific calculations on an individual record. The Exit-Loop math variable type is also supported so that a loop may terminate once a predefined condition is met.
To access specific values of a given valuation record, a math variable type of ValuationField is used. The value of this math variable would be a column name from the fund or valuation tables and would use the source array equal to the current loop and an appropriate data type for the column.
Note: This new looping method will only be available to the PostAssignmentValidateExpressions rule and as it only applies to unit linked funds. Point in Time valuation will not be supported.