Within LANSA, there are three levels at which business rules can be defined:
LANSA supports Repository-based rules in order to centralize the business rules of your application. Instead of repeatedly coding the same business rules into each program, LANSA allows a rule to be defined once for a field or table, and then it will be applied during database operations from any LANSA application. To simplify your application development, LANSA supports a variety of different Rule Types.
The order in which validation rules are performed is Function, then Field and lastly Table. Your functions may perform coded checks before they perform database operations. The field and table validation rules are not called until the function performs a database operation using the Object Access Module (OAM).
The order of importance of the validation hierarchy is defined as Field, then Table and lastly Function. For a field to be used in a table, it must be defined to the Repository first. If the same field is used in three different tables, all three tables will all refer to the same Repository field. Consequently, each table will use the same field level validation rules for that specific field. (This logic is also true of functions which use one table.) Hence, field rules are included in tables which are then used by functions. Even though a function level check may be performed before the field and table checks, the field and table checks are considered higher in the hierarchy because they provide ultimate control of your validations.
Also See
Field Rules and Triggers Development
Rule and Trigger Definitions in the Technical Reference Guide