An entity is a grouping of things with rules or data in common. An entity often represents a group of people (eg children, applicants, stakeholders) but it can also represent a group of objects (eg textbooks), activities (eg assignments) or concepts (eg school terms).
Entities may be used to allow the same rule to be applied multiple times to make a determination. For example, you may have a rule to say that if any child of the applicant is of school age then the applicant is eligible for a tax rebate. You may collect the details of each of the person's children in order to infer whether each child is of school age, and from that infer whether or not the person is eligible.
Your rules might look something like this:
Rule 1:
the applicant is eligible for a tax rebate if
at least one of the applicant's children is of school age
Rule 2:
the child is of school age if
the child's age > 4
In this situation, the value of "the child's age" (base level) and "the child is of school age" (inferred) may be different for each instance of the child. For example:
Child 1 (Mary) | Child 2 (Darryl) |
---|---|
the child's age = 2 | the child's age = 6 |
the child is of school age = false |
the child is of school age = true |
These attributes are called entity-level attributes. Rules which use entity-level attributes are called entity-level rules.
A member of the entity group is called an entity instance. In the example above, Mary would be one instance of "the child" entity and Darryl would be another instance of "the child" entity.
Understand the different types of entities
There are two types of entities: regular entities and the global entity.
An entity can have zero or more entity instances. For example, children in a family, applicants on an application form, taxable events in a tax period. Using entities you can apply the same rules, or collect the same data, for multiple instances of an entity.
An attribute of an entity may hold one value at a time during an investigation for each instance of the entity. That attribute may have as many values as there are instances of the entity, and will only operate within the context of that entity instance.
Not all information relevant to your rules may belong to a particular entity. As such, Oracle Policy Modeling has a global entity which acts as a catch-all for information that does not belong to any other entity. For example "the sun is shining" is a global attribute that does not belong to the entity "the family, "the child" and so forth.
An attribute of a global entity may only hold one value at a time during an investigation, and that value persists across the entire rulebase, common to all entities and instances of entities.
The global entity is the default location of attributes. If you do not create entities in your rulebase, or if you create an attribute which does not belong to another entity, the attribute will be stored in the global entity.
The following diagram shows how instances of a child in a family situation have entity attributes:
In the diagram, both children are in the same family and are going to the same holiday destination, but each has their own distinct properties (entity attributes), such as name, age and favorite animal.
Entities are defined in a properties file for the project, rather than in individual Word and Excel documents. This eliminates the need to re-define the same entities in each rule file.
To add an entity to a properties file:
The entity that you have added will now be displayed in the left-hand pane of the properties file:
After you have defined an entity in this way, every attribute which uses the exact entity text (eg 'the child') becomes an entity-level attribute belonging to that entity.
When an entity is created:
The identifying attribute for an entity is the text attribute whose value is used for labeling instances of the entity in decision reports, Web Determinations and the debugger. So for example, if you had 'the child' text attribute as the identifying attribute for the entity 'the child', then after you have set values for 'the child' attribute (eg, 'Reid', 'Cohen' and 'Emery'), the child entity instances would be labeled accordingly.
As mentioned earlier, an identifying attribute is automatically created when a new entity is created.
By default, this text attribute has:
If you want to change any of these default settings you will need to edit the attribute. To do this:
To change the attribute that is used to identify an entity (or to specify one if there isn't one):
You can define a public name for your entity in the same way as you can define a public name for an attribute of an entity. The public name overrides the entity text. You should define a public name for an entity when the entity name in the data model differs from the entity name in the source material.
To define a public name for an entity, do the following:
See also: