Constraints
A constraint is a declaration that establishes a restriction or business rule generally involving several classes.
Most constraints involve associations between classes.
Examples of constraints:
• The person in charge of a department must belong to the department.
• Any invoiced order must already have been delivered.
• The delivery date must be later than the order date.
A sensor covering a zone can trigger an alarm for that zone only.
To create a constraint in the class diagram:
1. Click the
Constraint button

in the object toolbar.

If it is not displayed, select
View Views and Details and select the "Constraints" check box.
2. Then click one of the associations concerned by the constraint, and drag the mouse to the second association before releasing the mouse button.
The Add Constraint dialog box appears.
3. Enter the name of the constraint, then click Add.
The constraint then appears in the drawing.

You can link a constraint to other classes or associations using the
Link button