Find the entity for an attribute

After you have defined an entity, every attribute which contains the entity text will attach to that entity. Attributes which do not contain entity text are global.

For example, assume the attributes in the following table are part of a rulebase where "the household member" has been defined as an entity:

 

Attribute text Entity level Explanation
the household member is male the household member contains "the household member"
a household member is eligible global "a household member" does not match "the household member"
the former household member has left global "former" interrupts the attribute text
the household member’s annual income the household member adding extra letters or characters on the left or right hand side is ok
the date of birth of the household member the household member entity text may appear anywhere in the attribute text

 

Both variable and statement attributes can be defined to belong to an entity in this way.

Check attribute entity levels

Once you have compiled your rules, you can check entity levels in the build model in Oracle Policy Modeling. To open the build model view, go to View | Build Model.

Attributes which are not within the scope of an entity are placed in the Global level. The list of global attributes are displayed in the right-hand pane:

 

 

To view a list of entity-level attributes, click on the entity name. The list of entity-level attributes will be displayed in the right-hand pane:

 

Why attribute scope is important

Once you define an entity, you cannot use attributes which belong to that entity in rules which operate outside the context of that entity.

For example, the following rule would be invalid (assume an entity "the child" has been defined):

the claimant is eligible for transport assistance if

the child travels a long distance to get to school

This is because we don't know which instance of the child (eg Max, Kat, Sarah) should be used in this rule.