Returning a Decision Report

Return a Decision Report from the Determinations Server

The Oracle Determinations Server can return a decision report for a Known or an Unknown attribute value. The style of the decision report to be returned is specified by the decision-report-style attribute and each outcome attribute can specify a different decision report style.

A decision report is a complex XML type with the following structure:

 

Decision Report styles 

There are two report styles: the decision-report style which is the equivalent of the previously titled 8.5 Rule Server Detailed Report and the base-attributes style which is the equivalent of the previously titled 8.5 Rule Server Base Report.

 

 

Example:

If we have a rulebase which contains the following rule:

 

And an input data set of:

    1    <assess-request>
    2      <session-data>
    3        <list-entity entity="global">
    4          <entity label="global">
    5        <attribute-outcome id="a" outcome-style="value-only"/>
    6        <attribute id="e">
    7          <boolean-val>false</boolean-val>
    8        </attribute>
    9        <attribute id="g">
    10         <boolean-val>false</boolean-val>
    11       </attribute>
    12       <attribute id="i">
    13         <boolean-val>false</boolean-val>
    14       </attribute>
    15         </entity>
    16       </list-entity>
    17     </session-data>
    18   </assess-request>

 

Note: We are asking for the value of "a" in the global entity as a outcome. We are setting the value of the attributes "e", "g" and "i" (also in the global entity) to false. In the example we are asking for "a" to be displayed with the outcome style "value" only. Below there are examples of the three report styles "value-only" "decision-report" and "base-attributes".

For the outcome attribute "a", we get the following Decision Reports:

 

value-only

A value-only outcome is the simplest, it merely returns the value of the attribute, if it is known. If it is unknown, no value is displayed, but the attribute has a state of "unknown".

    1    <attribute id="a" inferencing-type="goal" state="known">
    2      <boolean-val>false</boolean-val>
    3    </attribute>

For the attribute outcome report-style "value-only" no decision report is returned. The information in the response is the value of the attribute "a" (known and false).

 

decision-report

    1    <attribute id="a" inferencing-type="goal" state="known">
    2      <boolean-val>false</boolean-val>
    3      <decision-report report-style="decision-report">
    4        <attribute-decision-node attribute-id="b" entity-instance-id="global"
    5          entity-name="global" id="dn:1" state="known"
    6          text="b is not true.">
    7          <boolean-val>false</boolean-val>
    8          <attribute-decision-node attribute-id="e"
    9            entity-instance-id="global" entity-name="global" id="dn:2"
    10           state="known" text="e is not true.">
    11           <boolean-val>false</boolean-val>
    12         </attribute-decision-node>
    13         <attribute-decision-node attribute-id="f"
    14           entity-instance-id="global" entity-name="global" id="dn:3"
    15           state="unknown" text="is f true?" type="boolean-val"/>
    16       </attribute-decision-node>
    17       <attribute-decision-node attribute-id="c" entity-instance-id="global"
    18         entity-name="global" id="dn:4" state="known"
    19         text="c is not true.">
    20         <boolean-val>false</boolean-val>
    21         <attribute-decision-node attribute-id="e"
    22           entity-instance-id="global" entity-name="global" id="dn:2"
    23           state="known" text="e is not true.">
    24           <boolean-val>false</boolean-val>
    25           <already-proven>See above: dn:2</already-proven>
    26         </attribute-decision-node>
    27         <attribute-decision-node attribute-id="g"
    28           entity-instance-id="global" entity-name="global" id="dn:5"
    29           state="known" text="g is not true.">
    30           <boolean-val>false</boolean-val>
    31         </attribute-decision-node>
    32       </attribute-decision-node>
    33       <attribute-decision-node attribute-id="d" entity-instance-id="global"
    34         entity-name="global" id="dn:6" state="known"
    35         text="d is not true.">
    36         <boolean-val>false</boolean-val>
    37           <attribute-decision-node attribute-id="f"
    38             entity-instance-id="global" entity-name="global" id="dn:3"
    39             state="unknown" text="is f true?" type="boolean-val">
    40             <already-proven>See above: dn:3</already-proven>
    41           </attribute-decision-node>
    42           <attribute-decision-node attribute-id="h"
    43             entity-instance-id="global" entity-name="global" id="dn:7"
    44             state="unknown" text="is h true?" type="boolean-val"/>
    45           <attribute-decision-node attribute-id="i"
    46             entity-instance-id="global" entity-name="global"
    47             id="dn:8" state="known" text="i is not true.">
    48             <boolean-val>false</boolean-val>
    49           </attribute-decision-node>
    50         </attribute-decision-node>
    51       </decision-report>
    52   </attribute>

 

For the report-style "decision-report", the Determinations Server response reports that the attribute "a" is known and is false. Also, the response has a Decision Report containing decision nodes that describe how the value of "a" was determined.

The first node in the decision report is for the attribute id "b". It tells us that b is known and is false. Sub-nodes of this node explain that the values for "e" (false) and "f" (unknown).

Next there is a node explaining the value of "c" (known and false). Sub-nodes of this node explain the values for "e" and "g". Because the value for "e" has already been explain earlier, an already-proven element appears.

The third top level node explains the value of "d" (known and false). The three sub-nodes of this node explain the values of "f", "h" and "I". because "f" has already been proven for the node for "b" an already-proven element appears.

 

base-attributes

For the same data, a base-attributes decision report looks like:

    1    <attribute id="a" inferencing-type="goal" state="known">
    2      <boolean-val>false</boolean-val>
    3      <decision-report report-style="base-attributes">
    4        <attribute-decision-node attribute-id="e"
    5          entity-instance-id="global" entity-name="global"
    6          id="dn:2" state="known" text="e is not true.">
    7          <boolean-val>false</boolean-val>
    8        </attribute-decision-node>
    9        <attribute-decision-node attribute-id="f"
    10         entity-instance-id="global" entity-name="global"
    11         id="dn:3" state="unknown" text="is f true?" type="boolean-val"/>
    12       <attribute-decision-node attribute-id="g"
    13         entity-instance-id="global" entity-name="global"
    14         id="dn:5" state="known" text="g is not true.">
    15         <boolean-val>false</boolean-val>
    16       </attribute-decision-node>
    17       <attribute-decision-node attribute-id="h"
    18         entity-instance-id="global" entity-name="global"
    19         id="dn:7" state="unknown" text="is h true?" type="boolean-val"/>
    20       <attribute-decision-node attribute-id="i"
    21         entity-instance-id="global" entity-name="global"
    22         id="dn:8" state="known" text="i is not true.">
    23         <boolean-val>false</boolean-val>
    24       </attribute-decision-node>
    25     </decision-report>
    26   </attribute>

 

This Decision Report lists only base level attributes so inferred attributes "b", "c" and "d" do not appear. only the base level attributes "e", "f", "g", "h", "i" appear.