Prev Next

Define Stereotype Constraints

If you need to define the conditions and rules under which the Stereotype element operates and exists, you can do this by setting Constraints on the element. Typical constraints are pre- and post- conditions, which indicate things that must be true before the element is created or accessed and things that must be true after the element is destroyed or its action is complete.

You can show the constraints for an element directly on the diagram, using the 'Compartment Visibility' function.

Access

Select the Stereotype element, then display the 'Constraints' page of the 'Properties' dialog, using any of the methods outlined in this table.

Ribbon

Design > Element > Responsibilities > Constraints

Context Menu

Right-click on element | Properties | Responsibilities > Constraints

Keyboard Shortcuts

Shift+Alt+C

Other

Double-click Stereotype element > Constraints

Define constraints for a stereotype

Field/Button

Description

See also

New

Click on this button to clear the fields ready to create a new constraint.

Constraint

Type the value of the constraint.

Type

Click on the drop-down arrow and select the appropriate type (Pre-condition, Post-condition or Invariant).

Status

Click on the drop-down arrow and select the appropriate status.

Notes

Type any additional information required.

Save

Click on this button to save the constraint data.

OK

Click on this button to close the dialog.

Learn more