A require constraint states the required constraints imposed on the model, expressed formally or informally in a requirement or a use case.

There are two ways these constraints can be required:

Requiring a constraint by referencing a constraint defined elsewhere in the model

Requiring constraints via the Textual Editor

To require constraints via the Textual Editor


  1. In the body of an element for which you want to reference a constraint, declare one of the following:
    1. For an unnamed require constraint, declare the require keyword, then follow with the name of the constraint you want to reference.
    2. For a named require constraint, declare the require constraint keyword, name the new usage, and then reference subset the constraint you want to reference.
  2. Specify the constraint (expression, attributes, etc.) in the element's body.
  3. Click the Synchronize button.

constraint massLimit {
    attribute mass : MassValue;
    attribute massLimit : MassValue;
    mass <= massLimit
}
requirement def MaximumMass {
    attribute massActual : MassValue;
    attribute massRequired : MassValue;

    require massLimit {                                    // step 1.a - unnamed usage reference subsets another constraint usage
        :>> mass = massActual;
        :>> massLimit = massRequired;
    }

    require constraint mLimit ::> massLimit {  // step 1.b - named usage reference subsets another constraint usage
        :>> mass = massActual;
        :>> massLimit = massRequired;
    }
}

Requiring constraints via the Drag and Drop handler in a view

To require constraints via the Drag and Drop handler in a view


  • Drag and drop a constraint element from the Containment tree or use its symbol's Drag and Drop handler and drop it on:
    • the requirement element symbol that you want to require the constraint by referencing it using the Create Require Constraint command. 
    • the use case element symbol that you want to require the constraint by referencing it using the Create Objective or Create Require Constraint of Objective commands. 
    • the require constraint symbol that you want to require by referencing the constraint using the Set Required Constraint command.

Requiring constraints via the Specification panel

To require constraints via the Specification panel


  • Drag and drop a constraint element from the Containment tree or use its symbol's Drag and Drop handler and drop it on the Required Constraint field in the Properties section of the Specification panel for the require constraint element. 
    The appropriate constraint is specified for the element.

Requiring constraints via the view palette

To require constraints via the view palette


  1. In the view palette, under the Requirements group, click require.
  2. Do one of the following:
    1. To require an existing constraint, in the view pane, click on the use case or requirement element symbol, then on the constraint element symbol. 
    2. To require a new constraint, in the view pane, click on the use case or requirement element symbol, then elsewhere in the view pane to create a requirement element symbol. 
      The require path is drawn between the element symbols.

Requiring constraints via the smart manipulator in a view

To require constraints via the smart manipulator in a view


  • In a view, do one of the following:
    • To require an existing constraint, select the use case element symbol, and in its smart manipulator, click the require command. Click on the requirement or constraint element symbol.
    • To create a new require constraint, select the use case element symbol, and in its smart manipulator, click the require command. Click elsewhere in the view pane to create a requirement element symbol.
      The require path is drawn between the element symbols.

Requiring a constraint via the owned require constraint usage itself as the required constraint

Requiring constraints via the Textual Editor

To require constraints via the Textual Editor


  1. In the Textual Editor, place the cursor where you want to create the element and declare the keyword require constraint for a require constraint usage
  2. Specify the element name.
  3. Specify the constraint (expression, attributes, etc.) in the element's body.
  4. Click the Synchronize button.

requirement def MaximumMass {
    attribute massActual : MassValue;
    attribute massRequired : MassValue;

    require constraint mLimit {                   // named constraint
        massActual <= massRequired
    }
}

Requiring constraints via the symbol compartment in a view

For more information, see the Compartments page.

To require constraints via the symbol compartment in a view


  1. Do one of the following:
    1. Select an element symbol and click the Create Element button on it. In the dropdown menu, click the require constraint element.
    2. Select an element symbol and on the right side of the require constraints compartment, click the Create require constraint button.
  2. Specify the constraint (expression, attributes, etc.).
    The new element is created and displayed in the require constraints compartment.

Requiring constraints via the Specification panel

To require constraints via the Specification panel


  1. Open the Specification panel.
  2. Do one of the following:
    1. In the Properties section bar, click the Create Element button. The shortcut menu appears. Click the require constraint element in the shortcut menu.
    2. In the require constraints compartment section's bar, click the Create require constraint button.
  3. Specify the constraint (expression, attributes, etc.).
    The element is created in the require constraints compartment.