Send the Requested Data to Intelligent Advisor In the Required Format

In the Load response, it is the responsibility of a web service connector to:

  • return values for each of the requested tables and fields
  • ensure that values for fields are of the same type as those which the metadata described
  • ensure that data honors relevant localization parameters
  • return details of the user that started the interview (if provided).

A Load response has:

  • A load-response element that must use the namespace "http://xmlns.oracle.com/policyautomation/hub/12.2.13/metadata/types" for a successful Load response. This element may have the following optional attributes (if using web service connector version 12.2.18):
    • A user-id attribute that shows the unique identifier for the user that initiated the interview. If a value is provided for user-id, a value must also be provided for user-role.
    • A user-role attribute that shows the role of the user that initiated the interview. For more information, see UserRoleType.
  • A tables element containing the list of tables retrieved by the request. Note that:
    • For web service connector version 12.2.18, if there is no input mapping, the Load response will not contain a tables element.
    • For web service connector version 12.2.13 and earlier, there will always be a tables element included in the response.
  • A table element that is also the root table as identified in the Load request. If this table is not included in the response, then no other tables can be included, because they all must be linked to some degree by this table.
  • A single row element of the root table. For other tables there may be multiple rows but the Global entity is singular so an error will occur if more than one row is included in the response.
  • Each row in a child table referred to in the link element of the parent table, within the id attribute of a ref element.
  • A name attribute for each field selected to be input-mapped to one or more Policy Modeling attributes.
  • The returned values for the fields. Table 1 shows the value types.
Table 1. The elements that carry the values for the corresponding field data types
Element Field data type Example
text-val STRING <text-val>Red</text-val>
boolean-val BOOLEAN <boolean-val>true</boolean-val>
number-val DECIMAL <number-val>1.5</number-val> (decimal value)
<number-val>1</number-val> (integer value)
date-val DATE <date-val>2014-07-25</date-val>
time-val TIMEOFDAY <time-val>21:45:30</time-val>
datetime-val DATETIME <datetime-val>2014-07-25T21:45:30+00:00</datetime-val>
unknown-val any <unknown-val></unknown-val>
uncertain-val any <uncertain-val></uncertain-val>

Note that if the number is an integer then decimal places do not need to be included. A whole number restriction on a Policy Modeling attribute will not accept numbers with decimal values anyway.

The following is an example of a Load response:

<load-response xmlns="http://xmlns.oracle.com/policyautomation/hub/12.2.18/metadata/types"
user-id="a1234"
user-role="Contact">
    <tables>
        <table name="Vehicles">
            <row id="Vehicles">
                <link name="Cars" target="Car">
                    <ref id="AllTerrainX"/>
                    <ref id="Zippy-9"/>
                </link>
            </row>
        </table>
        <table name="Car">
            <row id="AllTerrainX">
                <field name="Model">
                    <text-val>AllTerrainX</text-val>
                </field>
                <field name="Price">
                    <number-val>20000.00</number-val>
                </field>
                <field name="Color">
                    <text-val>Green</text-val>
                </field>
            </row>
            <row id="Zippy-9">
                <field name="Model">
                    <text-val>Zippy-9</text-val>
                </field>
                <field name="Price">
                    <number-val>15000.00</number-val>
                </field>
                <field name="Color">
                    <text-val>Red</text-val>
                </field>
            </row>
        </table>
    </tables>
</load-response>

In this example:

  • The user-id for the user that initiated the interview is 'a1234' and the user-role for that user is 'Contact'.
  • There is a parent table element 'Vehicles' with a link element 'Cars' to a child table 'Car'. This link instructs the connector to populate data for a table named 'Car' for each row related to 'Vehicles' via the link 'Cars'.
  • The link element has ref elements that refer to the rows ('AllTerrainX' and 'Zippy9') of the 'Car' table.
  • The 'Car' table was not identified as the 'root' table in the request, and so may be populated with multiple child 'row' elements. Each row, however, must be referred to by a 'ref' of a 'link'. In this example, each of these rows is referred to by a ref within the link ‘Cars’ of the row ‘Vehicles’ of the table ‘Vehicles’.
  • The returned values for the fields are of type text (<text-val>) and type number (<number-val>). For instance, the text-val element contains the value which the ‘Model’ field represents in the underlying application. The metadata described this field as a STRING data type, so the value is within a text-val element.