Setting Session Data - Generic Data

Set Session Data - Generic Data

The data to be used to assess the goal is specified in the data parameter of the assess method.  The data model reflects entities and attributes that have been instantiated in the rulebases.

The data object is a complex XML type structured as:

"session-data” (required, single occurring element)

Document element that specifies all the data to be used in the current assess call.

"list-entity" (optional, recurring element)

This sub-element of session data lists all the entity instances of a particular type. So, for example, all "person" entities would be under the element <list-entity entity="person"> and all the "pet" entities would be under the element <list-entity entity="pet">

The list entity element has the following attribute:

"entity" (required attribute, xsd:string) – the name of the entity (as defined in the rulebase)

"entity" (required, recurring element)

This element is sub-element of the list-entity is an instance of the entity named in the list-entity element. Within each list-entity element there must be at least one entity instance (otherwise, there is no need to put the list-entity element in the first place.

The entity element has the following attribute:

"label" (required attribute, XSD:ID) – every attribute must have a unique (within the session) identifier. This makes it possible to refer to the entity instance in relationships and match the entity instance between the Request and Response from the Oracle Determinations Server.

“attribute-outcome” (optional, recurring element)

This sub-element of entity is a element used to request an attribute as an outcome. By specifying an attribute-outcome you are asking the Determinations Server to tell you what the value of the attribute is, as opposed to setting a value yourself.

The attribute-outcome element has the following attributes:

"id" (required attribute, xsd:string) – the identifier (name) of the attribute as defined in the rulebase.

"outcome-style" (required attribute, enumeration) – the outcome style this must be one of:

value-only – return the value of the attribute (if known) only

decision-report – return the value of the attribute and a full decision report

base-attributes – return the value of the attribute and a base attributes decision report

"screen-if-unknown" (required attribute, xsd:boolean) – if this set to true and if the value of the attribute in unknown. A screen with the next question needed to resolve the attribute will be returned.

“attribute” (optional, recurring element)

This sub-element of entity sets the value of an attribute. The value of the attribute is set in the sub element which will be one of: boolean-val, currency-val, date-val, number-val, text-val (see below).

The attribute element has the following attributes:

“id” (required, xsd:string) - This attribute represents the ID of the rulebase attribute whose value is to be set.

“state” (optional, enumeration) - This attribute represents the state the rulebase attribute should be set to. Valid state values are ‘known’, ‘uncertain’ and ‘unknown’. Usually this attribute is not set in the request and exists to provide information about the attribute in the response; except in the case of it being set to 'uncertain'.

“inferencing-type” (optional, enumeration) – This is the inferencing type of the attribute. It will be one of: base-level, goal, intermediate, stand-alone. This attribute is not set in the request and exists to provide information about the attribute in the response.

"boolean-val" (optional, single element) – this sub-element of attribute sets the value of the attribute to a boolean value. This element must contain boolean text; for example: <boolean-val>false</boolean-val>

"currency-val" (optional, single element) – this sub element of attribute sets the value of the attribute to a number, which is treated like money value. This element must contain number; for example: <currency-val>2000</currency-val>

"date-val" (optional, single element) – this sub-element of attribute sets the value of the attribute to a date value. This element must contain international date in the form YYYY-MM-DD text; for example: <date-val>2002-02-28</date-val>

"number-val" (optional, single element) – this sub-element of attribute sets the value of the attribute to a number value. This element must contain number; for example: <number-val>33.14</number-val>

"text-val" (optional, single element) – this sub element of attribute sets the value of the attribute to a text value. This element must contain text; for example: <boolean-val>This is some text</boolean-val>

"properties"

"relationships" (optional, single element) – this sub element of entity contains all the relationship (relationship sub-elements).

"relationship" (optional, recurring element) – this sub element of relationships specifies a particular relationship. It will specify 0 or more target elements. If there are 0 elements this means that the relationship is known, but has no targets (if the relationship is never specified, this means that the relationship is unknown, and the engine assumes that it may exist.

name (mandatory attribute, xsd:string) – the name of the relationship.

"target" (optional, recurring) – this sub-element of relationship this specifies the target, or "to" part of the relationship (for example, parents "to" target children). The target is a single attribute ref.(see below)

ref (mandatory attribute, XSD:IDREF) – this attribute identified the entity instance that is the target of the relationship, that must be a "label" attribute of an entity.

 

See also:

Specifying an attribute's values

Specifying Entity Sets and Entity Instances

Determining an attribute's value

Returning a Decision Report