Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Activity A

Flag Order Historical Details

Activity B

Print Outstanding Credit Invoices

Activity C

Send a Message to the Sales Department

 |
A trigger function allows a business activity to be associated directly with a database table. When a specified event happens to information in the table, then the trigger(s) will be automatically invoked.
Similar to validation checks, LANSA supports Repository-based triggers in order to centralize the business logic of your application. Instead of repeatedly coding the same business procedures into each program, LANSA allows a trigger to be defined once for a field or table, and then it will be applied during database operations from any LANSA application.
Sensible use of triggers may transform the way that an application is designed. The user interface can be fully designed, and then the complexities and rules can be introduced later by using table validation rules and database trigger functions. The resulting design is much more in the "object oriented" style. Triggers separate "business function" from "user interface" in a much clearer and easier way.
Also See
Trigger Definition in the Technical Reference Guide
Trigger Condition in the Technical Reference Guide
Trigger Functions in the LANSA for i User Guide

Image RemovedImage Added

REP007 - Table Validation Rules/Triggers in the Repository Tutorial.

...