In order to run a test case or debug session, you need to firstly set up the data to use.
Set the value for a base level attribute
Set up entities and containment relationships
When you are investigating the inferences that are made by setting particular attribute values, you need to set values for the base level attributes directly.
To set the value of a base level attribute directly:
If you have entities in your rulebase, you will need to create entity and relationship instances in order to investigate any rules which use those entities/relationships. For example, if you have a rulebase containing the entity "the child" and you are assessing a family with 3 children then you will need to create 3 instances of "the child" in the debugger. It is easiest to set these up before you start to investigate goals or to observe the effects of setting values for attributes.
Entity instances are added via their containment relationships. To create an entity instance for an entity in the Data view:
TIP: At this point it can be useful to provide a value for the identifying attribute for each of the entity instances. This will make it easier to distinguish between the entity instances when debugging. In the example above, the child's name attribute is the identifying attribute for the child entity. Following the steps above for setting the value for a base level attribute, you would set the value of the child's name attribute for each of the entity instances you have added. This value (eg Frank) then replaces the generic entity label (eg child 1) in the Data view:
You can also add a new entity instance by selecting the containment relationship and using the Add Instance button in the relationship editor:
For entities contained within other entities, instances are created in the same way as above, using the containment relationships within the existing instances.
To delete an entity instance:
The selected entity instance will be removed from the list of entity instances for that entity.
TIP: You can also delete an entity instance by selecting the containment relationship in the Data view, and then selecting the entity instance to be deleted in the relationship editor and using the Delete Instance button:
Once entity instances have been created within their containment relationships, you may set up any reference relationships between the entity instances.
Reference relationships are shown underneath the entity instance in the Data view, and can be set once the relevant entity instances have been created via their containment relationships. For example, having created three children Samuel, Benjamin and William, and an instance of "the school" entity, Canberra High School, you might set that one of the children attends the school. To do this:
NOTE: When you set targets for static relationships, the relationship will become known - it is not possible to leave the relationship as unknown.
To remove the association between a target entity instance and the relationship:
Using the relationship editor in the right hand pane of the Data view, you can switch from viewing a relationship (from the direction of the source entity) to viewing the reverse relationship (from the direction of the target entity). Note here that the 'source' and 'target' entities of a relationship are relative, and the entities referred to by these terms depend on which relationship direction is being considered.
For example, you may have a many-to-one relationship between child and school entities called 'the child's school', with a reverse relationship 'the school's students'. If you have already set the school for one child, you could easily navigate between these entity instances to view and set the reverse relationship, for other children who attend the school. To do this:
See also: