AsFile Overview

The AsFile database table stores a user-configurable portion of the FileReceived Web Service. This table contains a separate record for each type of file OIPA has been configured to receive. It has following columns:

  • FileGUID – unique identifier for each entry in this table.
  • CompanyGUID – unique identifier for a company.
  • FileNameFormat – stores a descriptive name of the file format type.
  • FileID – stores a unique three-character ID used to describe file format. An inbound SOAP message will include a <FileID> element specifying the format of the file to be used for processing.
  • XMLData – specifies details about request type, math, assign attributes, pre-insert and post-insert.
  • XSLT – XSLT for transforming inbound XML into AsXml.

XMLData

AsFile entry allows values to be assigned to various attributes before inbound XML undergoes the transformation process into AsXml. This is configured by using the <Attribute> element inside the <AssignAttributes> element. By assigning values at this stage of the process, pre-existing data from OIPA can be used to populate the AsXml.

Any data that is needed prior to the XSLT transformation process can be processed in the XMLData section of the File business rule. This example shows the use of XPATH, which allows for data from the incoming request to be manipulated. Also illustrated in this example is the GUID Attribute type, which automatically sets the Attribute value to a newly generated GUID.

<File>
    <AssignAttributes>
        <Attribute NAME="PlanGUID" TYPE="XPATH">/TXLife/TXLifeRequest/OLifE/Holding/Policy/ProductCode</Attribute>
        <Attribute NAME="PolicyGUID" TYPE="GUID"/>
        <Attribute NAME="CompanyGUID" TYPE="VALUE">8B611A8-4429-4C67-94E6-3F4A882C9A8D</Attribute>
    </AssignAttributes>
    <PostInsert>
        <Object class="com.adminserver.utl.AsFilePostInsertActivityProcessorUtl"/>
    </PostInsert>
</File>

<RequestType>

This optional section specifies the type of operation like Insert, Illustration or Quote. If this tag is missing, then the default request type is assumed to be of type Insert.

  • Insert – This is used to insert data into the system.
  • Quote – This is used for quoting. Entity creation and activity processing is done in memory. The type of request does not leave its footprint in the database. Since the entity creation is in memory, it is not possible to access the entities using SQL in the AsFile configuration. Furthermore, the Quote can only be executed on a pre-existing policy.
  • Illustration – This is used for running illustrations. The entities are created in the database but deleted prior to the completion of the request. As such, the type of request does not leave its footprint in the database. The illustration activity is processed in memory like a Quote activity.

<Math>

This is an optional section that can run math on the values of the incoming XML. This section behaves the same as the Math section of a normal business rule. Math variables in this section will have a prefix specified by the ID attribute of the Math tag. These variables can then be used in the AssignAttributes section.

Example

<File>
    <Math ID="Math">
        <MathVariables>
            <MathVariable VARIABLENAME="Number" TYPE="VALUE" DATATYPE="TEXT">31ALIC010801</MathVariable>
            <MathVariable VARIABLENAME="Prefix" TYPE="VALUE" DATATYPE="TEXT">AVA</MathVariable>
            <MathVariable VARIABLENAME="PolicyNumber" TYPE="EXPRESSION" DATATYPE="TEXT">Prefix+Number</MathVariable>
            <MathVariable VARIABLENAME="State" TYPE="VALUE" DATATYPE="TEXT">/NewPolicy/PolicyIssueState</MathVariable>
        </MathVariables>
    </Math>
    <AssignAttributes>
        <Attribute NAME="TestValue" TYPE="VALUE">Math:PolicyNumber</Attribute>
        <Attribute NAME="PolicyState" TYPE="XPATH">Math:State</Attribute>
    </AssignAttributes>
</File>

<AssignAttributes>

This is the parent element for one or more <Attribute> elements.

<Attribute>

Any data processing that needs to take place prior to the transformation process is done using the <Attribute> element. This element has two attributes: NAME and TYPE. NAME specifies the name of the attribute, while TYPE defines how the specified expression will be evaluated. Attributes are evaluated from the top down, allowing attributes listed first to be used in expressions below them.

Following is a list of available attribute TYPES:

TYPE Description
GUID Sets the attribute to a newly generated GUID.
VALUE Sets the attribute to the specified value.
SYSTEMDATE Sets the attribute to the current system date.
SEQUENCE Sets the attribute by calling asc_NextSequenceInteger and passing the value of the NAME attribute as a parameter.
XPATH Sets the attribute to the result of the specified XPATH expression.
XPATHSTRINGLIST Sets the attribute to a comma delimited list containing the resulting values of the XPATH.
XPATHNUMBERLIST Sets the attribute to a comma delimited list containing the resulting values of the XPATH.
SQL Sets the attribute to the result of the specified SQL statement.
SQLMAP Sets the attribute to a 'key-value-pair' type collection of the resulting values of the SQL Statement.

Examples

GUID:

<Attribute NAME="PolicyGUID" TYPE="GUID"></Attribute>

XPATH:

<Attribute NAME="Field" TYPE="XPATH">/Request/PolicyName</Attribute>

 

<PreInsert> and <PostInsert>

<PreInsert> and <Post Insert> are optional elements that allow other system functionally to be called before or after the data is inserted into the database. This is done by calling specific types of Java classes that are used for these operations. The architecture of the Pre- and Post-Insert functionality allows these classes to be dynamically instantiated at runtime.

Pre- and Post-Insert operations are specified in the XMLData portion of a file's configuration, after the closing of the AssignAttributes element. The CLASS attribute of both elements allows for setting the name of the Java class to be called.

The following example will invoke the AsFile Post-Insert Activity Processor after the records are inserted into the database:

<PostInsert>
    <Object class="com.adminserver.pas.webservice.bll.AsFilePostInsertIndividualActivityProcessorBll">
    </Object>
</PostInsert>

The following is a list of available Pre and Post Insert Processors:

Name Parameters
AsFilePreInsertPercentInAllocationProcessorBll N/A
AsFilePreInsertUvNavCalculationProcessorBll N/A
AsFilePostInsertExposedComputationProcessorBll ComputationID
AsFilePostInsertIndividualActivityProcessorBll ActivityClientNumber
AsFilePostInsertProcessPolicy PolicyNumber

<Output>

This is an optional element that allows the outbound AsXml to be manipulated by XSLT. It should have an attribute TYPE="TRANSFORM". The text of this element references an attribute from the Attributes section of the XMLData. The attribute should be the name of a record in the AsFileOutput table of the database.

AsXml

AsXml is the XML formatting used by OIPA to store data destined for the database. This format is very simple, using a parent element for each database table, and a child element for each column of the table. The root element, <AsXml>, must be used to identify the formatting.

Each element must exactly match the name of the table or column in the database for mapping purposes. Each column of the table needs to be populated with data unless the column is set to allow NULL.

Schema

<AsXml>
    <TableName>
        <ColumnName>Value</ColumnName>
    </TableName> 
</AsXml>

 

Examples

An example of a record from AsPolicy in AsXml format:

<AsXml>
    <AsPolicy>
        <PolicyGuid>6CCA0B15-EFAC-471F-A698-27949AB9B9C4</PolicyGuid>
        <PlanGuid>3904A440-E035-40A1-9905-D544F7A6C093</PlanGuid>
        <CompanyGuid>A9211F9D-2C3B-4523-8151-768684696488</CompanyGuid>
        <PolicyNumber>GLPT31012265</PolicyNumber>
        <PolicyName>Term Policy</PolicyName>
        <IssueStateCode>38</IssueStateCode>
        <PlanDate>1/29/2031 12:00:00 AM</PlanDate>
        <UpdatedGmt>9/10/2009 6:43:01 PM</UpdatedGmt>
        <StatusCode>09</StatusCode>
        <CreationDate>1/29/2031 12:00:00 AM</CreationDate>
        <XmlData/>
    </AsPolicy>
</AsXml> 

An example of a record from AsRate in AsXml format:

<AsXml>
    <AsRate>
        <RateGuid>CA132F95-E768-45AE-ABBE-00000980034B</RateGuid>
        <RateGroupGuid> C6496E59-7EF7-4719-959B2C0065CA4EF9</RateGroupGuid>
        <RateDescription>Term_20_Premium<RateDescription>
        <Criteria1>03</Criteria1>
        <Criteria2>02</Criteria2>
        <IntegerCriteria>12</IntegerCriteria>
        <Rate>11.35</Rate>
    </AsRate>
</AsXml>