You can write a constraint that rejects any data manipulation that violates your business rule. For instance, if a user attempts to set a hire date that is earlier than the date of the job vacancy, you can write a constraint to reject this input. This type of constraint is called a restrictive constraint.
You can also write constraints that, instead of rejecting input, automatically perform some extra data manipulation in response to data input. For example, if the number of participants in a tour reservation changes, you can write a constraint to re-calculate the reservation price. This type of constraint is called a corrective constraint.
If your implementation requires external (non-USoft) processing, you can write a Java of C# component and let your constraint invoke this component. This is referred to as RDMI (Rules-Driven Method Invocation). RDMI constraints may be restrictive or corrective, or they may be invocative:
•If the effect is to ensure data integrity by blocking certain forms of data manipulation, the constraint is restrictive.
•If the effect is to ensure data integrity by performing extra data manipulation, the constraint is corrective.
•In other cases, the constraint is invocative. For example, a constraint that tells an e-mail server to send a message is an invocative constraint.
More on these subjects
Restrictive single-record constraints
Restrictive multi-record constraints
Corrective single-record constraints
Corrective multi-record constraints
Rules-Driven Method Invocation (RDMI)