Row Events |
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:
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:
Related Topics |