Row Events

Previous Next

See Also

The Rules Engine processes data manipulations in terms of row events. A row event occurs for each record that is inserted, updated, or deleted via a USoft application, either interactively by the user or indirectly by cascading rules. A row event occurs for example:

· When the user directly inserts, updates, or deletes a record in the interface.

 

· When a constraint performs a correction and inserts, updates or deletes one or more records as a result of some user action.

 

· When an INSERT, UPDATE or DELETE statement is issued through the SQL Command interface.

 

· When records are manipulated through an method like SqlScript().

Row events occur at record validation time, when the user issues a Store Record command, either explicitly, or implicitly by moving from one record to another or issuing a commit. At this point, field validations have already taken place.

If SQL statements manipulate more than one record, a row event is created for each record that is inserted, updated, or deleted.

Initial row events are user-initiated manipulations, for example when the user deletes a record by pressing the Delete button on the toolbar.

Triggered row events are row events performed as a result of an initial row event or another triggered row event.

Example

In the Travel Agency application, a participant is added to a reservation. This is the initial row event.

There is a business rule "When participants are added to a reservation, the price of the reservation must be re-calculated." This business rule is implemented by a corrective multi-record constraint.

The initial row event causes the price re-calculation of the corresponding reservation. This UPDATE of the corresponding reservation is an example of a triggered row event.

A triggered row event is always on a different table than the triggering row event, or on a different instance of the same table.

The Rules Engine performs checks on row events to determine if the row event is subject to any restrictive or corrective business rules:

· A restrictive rule may cause the row event to be a violation of that rule. In case of a violation, further processing is blocked. An error message is returned to the user.

 

· For each corrective rule, the row event may lead to corrections elsewhere in the application tables, and thus lead to new row events that are themselves subject to further restrictive and corrective business rules.

Related Topics

Pre-Store, Store-Record, and Post-Store Operations

Violation List