Pre-Store Record Validation Before Insert

Previous Next

See Also

When a record is stored, a couple of actions and checks are performed.

· If data has been entered in a USoft application window, record validation starts with checking if all mandatory columns have been entered. If so, the Rules Engine performs the checks listed.

 

· If an INSERT statement is executed in the SQL Command dialog, or if a record is inserted in a non-USoft application that connects to the USoft Rules Engine via ODBC:
1. Default values are set.
2. Foreground authorization is checked.
3. Corrective domain constraints are evaluated.

If a domain has a superdomain, the constraints on the superdomain are evaluated first, then the constraints on the domain itself. Within the domain, all checks are performed according to the Position in Checking Order attribute, set when defining the domain constraint.

4. Sequence numbers are generated.
5. Corrective single-record constraints and those corrective multi-record constraints for which the updated table is the triggering table are evaluated.
6. All mandatory columns must have been entered.
7. Domain Checks.
8. Restrictive domain constraints are evaluated for non-empty fields.

If a domain has a superdomain, the constraints on the superdomain are evaluated first, then the constraints on the domain itself. Within the domain, all constraints are evaluated according to the Position in Checking Order attribute.

9. Uniqueness of all keys (primary, secondary, etc.) is checked.
10. Restrictive, non-transitional, single-record constraints are evaluated.
11. Restrictive, transitional, single-record constraints are evaluated.
12. Restrictive, transitional, multi-record constraints are evaluated.
13. For subtypes, if the totality and exclusivity rules of subtype sets have been set to Immediate, these checks are performed now.

At this point, the record is inserted. If the record itself contains subtype data, the subtype record is inserted first, then the supertype record.