3 3 2 Validation Rule Levels

Visual LANSA

3.3.2 Validation Rule Levels

Within LANSA, there are three levels at which business rules can be defined. The levels of the validation hierarchy include:

  • Field Level (defined as part of the repository field definition)
  • File Level (defined as part of the repository file definition)
  • Function/Component Level (defined using RDML).

The order in which validation rules are performed at execution time is Function/Component Level, then Field Level and lastly File Level. Your programs may perform RDML coded checks before they perform database operations. The field and file validation rules are not called until the program performs a database operation using the Object Access Module (OAM).

The order of importance of the validation hierarchy is defined as Field, then File and lastly Function/Component. For a field to be used in a file, it must be defined to the repository first. If the same field is used in three different files, all three files will all refer to the same repository field. Consequently, each file will use the same field level validation rules for that specific field. (This logic is also true of multiple programs which use one file.) Hence, field rules are included in files which are then used by functions/components. Even though a function/component level check may be performed before the field and file checks, the field and file checks are considered higher in the hierarchy because they provide ultimate control of your validations.

Almost all validations will be specified at file level. (Refer to Field versus File Level Rules.)

Ý 3.3 Field Rules and Triggers Development