Computation Rule
The Computation rule is a system rule that must be overridden at the transaction level to be associated with a ScheduledValuation rule. The Computation rule is called by the ScheduledValuation rule when scheduled computation needs to be run. It defines all of the calculations that should be run against the policies returned in the query of the ScheduledValuation rule that calls it.
The Computation rule is separated into two sections: Input and Output. The Input section contains math logic that provides users with the same capabilities that all existing math sections allow. Following the Input section is the Output section, which maps configured data to the AsScheduledComputationField table.
Element/Tag | Attribute | Definition | Element/Attribute Value and Description |
---|---|---|---|
<Computation> |
|
Required: Opening and closing tag for the computation rule. |
|
NAME |
Optional: User defined name of the rule, which distinguishes it from other Computation rules. |
||
<Input> |
|
Required: Opening and closing tag of Input section. |
|
<MathVariables> |
|
Opening element containing the math variables for the computation rule. |
|
<MathVariable> |
|
Standard math variable syntax excluding MathStatement activity function elements. |
|
<Output> |
|
Required: Opening and closing tag of Output section. |
|
<Mappings> |
|
Opening element containing the definition of the computation fields and math variables used to populate them. |
|
<Mapping>
|
|
Specific math variable to field mapping. |
|
OUTPUTNAME |
Required: Names the computation output field to create. |
|
|
DATATYPE |
Required: Specifies the data type of the output field. |
XML Example
<Computation NAME="PolicyComputation">
<Input>
<MathVariables>
<MathVariable VARIABLENAME="False" TYPE="VALUE" DATATYPE="Text">False</MathVariable>
<MathVariable VARIABLENAME="True" TYPE="VALUE" DATATYPE="Text">True</MathVariable>
<MathVariable VARIABLENAME="EffectiveDateMV" TYPE="FIELD" DATATYPE="DATE">Policy:EffectiveDate</MathVariable>
<MathVariable VARIABLENAME="NextEffectiveDateMV" TYPE="FUNCTION" DATATYPE="DATE">DaysAdd(EffectiveDateMV,1)</MathVariable>
<MathVariable VARIABLENAME="MaximumIntegerMV" TYPE="PLANFIELD" DATATYPE="INTEGER">PlanOrderOrdinal</MathVariable>
<MathVariable VARIABLENAME="PlanDateMV" TYPE="FIELD" DATATYPE="DATE">Policy:EffectiveDate</MathVariable>
</MathVariables>
</Input>
<Output>
<Mappings>
<Mapping OUTPUTNAME="TrueValue" DATATYPE="Text">True</Mapping>
<Mapping OUTPUTNAME="EffectiveDate" DATATYPE="DATE">EffectiveDateMV</Mapping>
<Mapping OUTPUTNAME="NextEffectiveDate" DATATYPE="DATE">NextEffectiveDateMV</Mapping>
<Mapping OUTPUTNAME="IntegerValue" DATATYPE="INTEGER">MaximumIntegerMV</Mapping>
<Mapping OUTPUTNAME="PolicyPlanDate" DATATYPE="DATE">PlanDateMV</Mapping>
</Mappings>
</Output>
<Computation>
XML Schema
<Computation NAME="[literal]">
<Input>
<MathVariables>
<MathVariable VARIABLENAME="[literal]" TYPE="[VALUE|SEGMENTFIELD|FUNCTION|POLICYFIELD]" DATATYPE="[BOOLEAN|INTEGER|DATE|CURRENCY]">{value}</MathVariable>
</MathVariables>
</Input>
<Output>
<Mappings>
<Mapping OUTPUTNAME="[literal]" DATATYPE="[DECIMAL|DATE|INTEGER|CURRENCY|TEXT]">{value}</Mapping>
</Mappings>
</Output>
</Computation>