Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Contents
Prev Next

Constraints

If you need to define the conditions and rules under which an element operates and exists, you can do this by setting Constraints on the element, in conjunction with its responsibilities (internal requirements). 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 element Feature and Compartment Visibility function; this also reveals any constraints inherited from parent elements.

Access

On a diagram or in the Project Browser, select an element and:

Ribbon

Design > Element > Manage > Properties > Constraints

Design > Element > Manage > Specific Properties Page > Constraints

Context Menu

Right-click on element | Properties > Constraints   or

Right-click on element | Properties Page | Constraints

Keyboard Shortcuts

Alt+Enter : Constraints

Shift+Alt+C

Other

Double-click on Element : Constraints

Define constraints for an element

Field/Button

Description

See also

Constraint

Type the value of the constraint.

Type

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

Status

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

Notes

  • Type in any additional details or comments on the constraint
  • You can format the notes text using the Notes toolbar at the top of the field

Notes Toolbar

New

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

Save

Click on this button to save the constraint data.

Defined Constraints

This field lists the constraints defined in the element, showing the constraint name, type and status.

Delete

Click on a constraint in the Defined Constraints list and click on this button to immediately remove the constraint from the element.

(If you have two or more constraints in the element.) Click on a constraint in the Defined Constraints list and click on one of these buttons to move the constraint one position up or down in the list.

Learn more