4 5 1 Rule Concepts

Visual LANSA

4.5.1 Rule Concepts

Within LANSA, there are three levels at which business rules can be defined:

  • Field Level as part of the repository field definition
  • File Level as part of the repository file definition
  • Program Level as defined in the code of a Function or Component.

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 file, and then it will be applied during database operations from any LANSA application. To simplify your application development, LANSA supports a variety of different 4.5.2 Rule Types.

The order in which validation rules are performed is Function, then Field and lastly File. Your functions may perform coded checks before they perform database operations. The field and file 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 File and lastly Function. 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 functions which use one file.)  Hence, field rules are included in files which are then used by functions. Even though a function 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.

Also See

Field Rules and Triggers Development

Rule and Trigger Definitions in the Technical Reference Guide

4.5.2 Rule Types

4.5.3 Rule Hierarchy

4.5.4 Understanding Rule Sequence

Ý 4.5 File Rules & Triggers Development