company logo

Rules

Object types and properties support a static definition of objects and object classes. An advanced knowledge approach, however, is to describe, how objects behave. Typically, the behavior of objects is described as common behavior of objects of a given object type ("birds are able to fly" or "things are able to fall").

One typical approach is describing behavior as rules. A rule is a feature that describes how object or property instances change from one state to the other or how objects interact with other objects. Rules are referred to for different purposes (rule categories):

  • Constraints are used as validation rules for objects and properties
  • State transitions describe the way how objects change or interact
  • Operations provide derived information

Defining rules is an advanced approach and not typically used when starting defining concepts. Later on, it becomes, however, important, because building applications is impossible without knowing the rules, according to which objects in the application behave and interact with each other.

Typically, rules apply on single values, object instances or object collections. In order to control rules, any number of parameters (properties) might be passed to a rule. Depending on the rule category, it may change the state of the instance it applies on or return a result property. Parameters and result are features of the rule.

There is no clear distinction between rule and characteristic or property, since characteristics (like age) might be also expressed as operation rule, which returns the age. Again, it depends on the experts view, whether age is considered more as characteristic of person or as rule evaluating the age or as both.

Related topics