Supply attribute data that varies over time
Obtain and process a time-varying answer
Note that the rulebase used in the examples that follow can be located at:
examples\rulebases\compiled\SimpleBenefits.zip in the Oracle Policy Automation Runtime package.
You can use the Determinations Server to get answers on data that may vary over time. The value of an attribute may vary over time, and any determinations that are inferred based on that attribute may also vary over time.
The Determinations Server allows you to provide the values of an attribute for a period of time. You can use the change-point XML element to do this in an Determinations Server Assess request operation that uses session data, such as an Assess operation.
In the example below we are trying to determine if a claimant is eligible for the low income allowance, and the amount of that allowance. The claimants income has varied over time. Initially, their declared annual income was $13,000, but on 3 June 2009 due to a change in circumstances, it changed to $18,000. It changed again on 15 September 2009 to $35,000.
To provide all of the above information in a single request to the Determinations Server, we need to set change points in the attribute, and provide the new value that applies on and after the date specified in the change point.
So, the initial value of the attribute claimant_income is 13000.00, but after the change-point dated 2009-06-03 it becomes 18000.00 and again after 2009-09-15 it becomes 35000.00
<attribute id="claimant_income">
<number-val>13000.00</number-val>
<change-point date="2009-06-03">
<number-val>18000.00</number-val>
</change-point>
<change-point date="2009-09-15">
<number-val>35000.00</number-val>
</change-point>
</attribute>
<claimant_income>
<number-val>13000.00</number-val>
<change-point date="2009-06-03">
<number-val>18000.00</number-val>
</change-point>
<change-point date="2009-09-15">
<number-val>35000.00</number-val>
</change-point>
</ claimant_income>
Just as you can set data that changes over time, you can also received answers (based on that data, that changes over time. Just as data going into the Determinations Server might vary over time, so can attribute outcomes returned in the response.
In the section above on Supply attribute data that varies over time we saw an example of setting attribute data in a request that changed over time. Now we can see how the returning result containing this sort of data might look.
In the example below we are trying to determine two things: if the claimant is eligible for low income allowance, and what the value of that allowance might be. We can formulate our request with the claimants income which has changed over time:
Initially: 13000, after 2009-06-04: 18000, after 2009-09-15: 35000.
We specify two outcomes: eligible_low_income_allowance and low_income_allowance_payment.
If you look at the response, you can see the outcomes varying over time.
eligible_low_income_allowance.
Initially true, but after 2009-09-15: false- this is because a claimant must have an income less than 25000 to be eligible for low income allowance.
low_income_allowance_payment.
Initially 70.00, but after 2009-06-03: 20.00, and then after 2009-09-15: 0.00 - this is because the payment amount is calculated off the claimants income (which changed on 2009-06-03 and 2009-09-15. After 2009-09-15 the claimant no longer qualifies, so the amount changes to 0.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://oracle.com/determinations/server/10.4/rulebase/assess/types">
<soapenv:Header/>
<soapenv:Body>
<typ:assess-request>
<typ:global-instance>
<typ:attribute id="eligible_low_income_allowance" outcome-style="value-only"/>
<typ:attribute id="low_income_allowance_payment" outcome-style="value-only"/>
<typ:attribute id="claimant_income">
<typ:number-val>13000.00</typ:number-val>
<typ:change-point date="2009-06-03">
<typ:number-val>18000.00</typ:number-val>
</typ:change-point>
<typ:change-point date="2009-09-15">
<typ:number-val>35000.00</typ:number-val>
</typ:change-point>
</typ:attribute>
<typ:attribute id="claimant_public_housing_client">
<typ:boolean-val>true</typ:boolean-val>
</typ:attribute>
<typ:attribute id="claimant_date_of_birth">
<typ:date-val>1981-03-22</typ:date-val>
</typ:attribute>
</typ:global-instance>
</typ:assess-request>
</soapenv:Body>
</soapenv:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:i18n="http://www.w3.org/2005/09/ws-i18n" xmlns:typ="http://oracle.com/determinations/server/10.4/rulebase/assess/types">
<SOAP-ENV:Header>
<i18n:international>
<i18n:locale>en_US</i18n:locale>
<i18n:tz>GMT+0800</i18n:tz>
</i18n:international>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<typ:assess-response>
<typ:global-instance>
<typ:attribute id="eligible_low_income_allowance" type="boolean" inferred="true">
<typ:boolean-val>true</typ:boolean-val>
<typ:change-point date="2009-09-15">
<typ:boolean-val>false</typ:boolean-val>
</typ:change-point>
</typ:attribute>
<typ:attribute id="low_income_allowance_payment" type="currency" inferred="true">
<typ:number-val>70.0</typ:number-val>
<typ:change-point date="2009-06-03">
<typ:number-val>20.0</typ:number-val>
</typ:change-point>
<typ:change-point date="2009-09-15">
<typ:number-val>0.0</typ:number-val>
</typ:change-point>
</typ:attribute>
<typ:attribute id="claimant_income" type="currency">
<typ:number-val>13000.0</typ:number-val>
<typ:change-point date="2009-06-03">
<typ:number-val>18000.0</typ:number-val>
</typ:change-point>
<typ:change-point date="2009-09-15">
<typ:number-val>35000.0</typ:number-val>
</typ:change-point>
</typ:attribute>
<typ:attribute id="claimant_date_of_birth" type="date">
<typ:date-val>1981-03-22</typ:date-val>
</typ:attribute>
<typ:attribute id="claimant_public_housing_client" type="boolean">
<typ:boolean-val>true</typ:boolean-val>
</typ:attribute>
</typ:global-instance>
</typ:assess-response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>