ListGoals Service

Assess Service - ListGoals Operation 

Description

The ListGoals service returns a list of goal attributes for a rulebase. The request and response for ListGoals is the same for the Specific and Generic service.

For an attribute to be identified as a goal attribute in a rulebase, it must:

 

A goal attribute can then be used in the outcome set of an Assess operation.

The input for the ListGoals operation is a string containing the name of the rulebase whose goals are to be listed .

Request

The Call is a simple SOAP Request with no parameters:

<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:list-goals-request/>
   </soapenv:Body>
</soapenv:Envelope>

Response

The response is a complex XML type structured as:

"list-goals-response"
The response element containing all the goals

"entity” (optional, recurring element)
The entity that has at least one top level attribute. It has the following attributes:

"entity-id” - the name of the entity.

“attribute” (mandatory, recurring element)
at least one per entity, one for each goal attribute available.  It has the following attributes:

"text” - specifies the question form of the text of the goal attribute.

"id” - specifies the rulebase attribute ID used to uniquely identify the goal attribute.

"type” - the type of value of the attribute. Can be "text-val", "number-val", "currency-val", "date-val", "datetime-val", "time-val"or "boolean-val".

 

Example Response:

In this example, there are two Global goals. One is, eligible_teenage_allowance, which is a boolean value (true or false). The other is low_income_allowance_payment, which is a currency (money) value. Note that this example uses the SimpleBenefits rulebase which can be found at examples\rulebases\compiled\SimpleBenefits.zip in the Oracle Policy Automation Runtime package.

<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:list-goals-response>
         <typ:entity entity-id="global">
            <typ:attribute id="eligible_teenage_allowance" text="Is the claimant eligible for the teenage child allowance?" type="boolean"/>
            <typ:attribute id="low_income_allowance_payment" text="What is the claimant's low income allowance payment (per month)?" type="currency"/>
         </typ:entity>
      </typ:list-goals-response>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>