You are here: Business Rules > Calculate Rule > CalculateGeneral

Oracle® Insurance Rules Palette Release 9.3.1.0 E21044_01

# CalculateGeneral

## Description

This business rule calculates various segment and policy values. When a segment is added to a policy, the math configured in this business rule takes into account various aspects of the policy and arrives at the values, which may be stored in the database tables. The standard naming convention for the rule is to prefix CalculateGeneral with a common name for the segment to which it is associated, such as CalculateGeneral-BaseCoverage. Calculate business rules are always identified by their <Calculate> parent element.

Note: You can create a plan override of a CalculateGeneral business rule for each segment. In the SegmentScreen business rule, associate the calculate button with a specific CalculateGeneral rule that is tailored to a specific segment.

When the Calculate rule is executed, it first processes the <Input> element section. The <Input> element provides for the inclusion of <MathVariables>. Each <MathVariable> must be included inside this element in order for it to be used in any part of the Calculate rule.

After completing the <Input> section, the <Validation> element section is processed. This section allows for data validation.

The final section processed is the <Output> element section. This section provides a method of moving values to various database tables. The <Mappings> sub-element allows <MathVariables> calculated in the <Input> to be copied. In order for each <MathVariable> to be mapped, it must be included in this section regardless of its inclusion in the <Input> section.

By default, each <MathVariable> that is mapped as a field is stored as a segment field in the AsSegmentField database table. In order to store a <MathVariable> as a segment field it must be included as a field in the specific segment's segment name business rule. If the value should not be displayed for the end user in OIPA, then the Hidden attribute of the <Field> element must be used in the segment business rule to hide the field.

If a <MathVariable> needs to be stored in a table other than Segment, such as a policy field in the AsPolicyField table, then it must be specified. The GROUP attribute of <Mapping> allows for the specification of the table the fields should be stored in. In this secenario, GROUP would be set to Policy.

Specific values from the database can be retrieved without writing SQL statements, by using the available defined prefixes and fields for configuration. Please see the Available Prefixes and Fields for Configuration for a listing.

CalculateGeneral Attribute/Element Table
Element/Tag | Definition | Attribute | Element/Attribute Value and Description
--- | --- | --- | ---
<Calculate> | The opening and closing tag of the Calculate business rule. |  |
<Input> | The opening and closing tag that contains the MathVariables for the rule. |  |
<MathVariables> | Please see Math and MathVariable Elements. |  |
<MathVariable> |  |  |
<MathIF> | Please see Math and MathVariable Elements. |  |
<MathLoop> | Please see Math and MathVariable Elements. |  |
<CopyBook> | Please see CopyBook Rule. |  |
<Validation> | Allows validation of the values contained in MathVariables. |  | Value An expression using MathVariables and operators.
<Expression> |  | TYPE | ErrorOnTrue
MESSAGE | String The error message to be displayed to the user.
<Output> | Identifies the values that were calculated and will be written to the database. |  |
<Mappings> | Starting tag that identifies which MathVariable will be mapped. |  |
<Mapping> | Identifies the MathVariable with the value that will be copied to the database table. The value identifies the Math Variable. | OUTPUTNAME | String Defines the name of the field that will be updated.
TYPE | String Always provide the value of FIELD.
GROUP | String Identifies the table to which the data will be saved. Segment is the default.

## 127BXML Example

    <Calculate>

    <Input>

    <MathVariables>

    <MathVariable VARIABLENAME="Checked" TYPE="VALUE">CHECKED</MathVariable>

    <MathVariable VARIABLENAME="Unchecked" TYPE="VALUE"></MathVariable>

    <MathVariable VARIABLENAME="IssueStateCode"></MathVariable>

    <MathIF IF="UnisexIndicator = 'CHECKED'">

    <MathVariable VARIABLENAME="RateGender" TYPE="VALUE">01</MathVariable>

    </MathIF>

    </MathVariables>

    </Input>

    <Validation>

    <Expression TYPE="ErrorOnTrue" MESSAGE="Benefit should be minimum of $50,000">ADDBenefitAmount &lt; 50000</Expression>

    </Validation>

    <Output>

    <Mappings>

    <Mapping OUTPUTNAME="AnnuitizationDate" TYPE="FIELD" GROUP="Segment">AnnuitizationDate</Mapping>

    <Mapping OUTPUTNAME="MaturityDate" TYPE="FIELD"  GROUP="Segment">MaturityDate</Mapping>

    <Mapping OUTPUTNAME="SWPEndDate" TYPE="FIELD" GROUP="Segment">MaturityDate</Mapping>

    <Mapping OUTPUTNAME="AnnuitizationAge" TYPE="FIELD" GROUP="Segment">AnnuitantAgeAtAnnuitization</Mapping>

    <Mapping OUTPUTNAME="SomeRoleField" TYPE="FIELD" GROUP="Role"&ldots; ROLEGUID="SomeRoleGuid">InitialPremiumCycleDate</Mapping>/Mapping>

    </Mappings>

    </Output>

    </Calculate>

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

Open table of contents