Page History
To validate elements that are not used in a diagram
...
- Create a a Package and apply the «activeValidationSuite» stereotype.
- Under the created Package, create a Constraint and apply the «validationRule» stereotype.
- and apply the «ValidationSuite» stereotype.
- Right-click the Package to open its Specification window.
- On the left side menu, select Constraints → Create.
Click three dots next to the Applied Stereotype property and set it to «validationRule». Click Apply.
Note If you cannot see the Traceability node, make sure the Expert or All mode is enabled.
- Click three dots next to the Severity, Error Message, and Abbreviation properties to specify them Specify the Severity, Error Message, and Abbreviation for the created validation rule.
- Specify the constrained element - Click three dots next to the Constrained Element property to specify the metaclasses and stereotypes whose instances are validated if not used on in the diagram.
- Click three dots next to specify the Specification property property. Specification dialog opens.
From the Language the Language drop-down list, select a select StructuredExpression.
- Click Expert at the bottom of the dialog. The dialog is switched to the Expert mode.
- In the Body area of the Specification
On the left side of the dialog, click Create Operation → Operation
.Click the Operation from Model operation type on the right side of the dialog.
Select the Not opaque behavior from the model.
Note The Apply Filter check box must be unselected!
- On the left side of the dialog, select the A parameter of the Not operation and press Delete.
- On the right side of the dialog, click the Operation from Model operation type.
- On the right side of the dialog, click the Operation from Model operation type.
- On the left side of the dialog, click the Element parameter of the UsageInDiagrams operation and press Delete.
→ Not.
Note If you cannot see the Operation from Model operation under Operations, make sure the Expert mode is enabled.
Note If you cannot see the Not operation, make sure the Apply Filter box is not checked.
- Select A → Reset.
Select A → Operation from Model → IsEmpty.
Select Input → Operation from Model → UsageInDiagrams.
- Select Element → Reset.
- Select Element → Contextual Variable.
- Click OKSelect the Contextual Variable from the Other category.
Select the IsEmpty opaque behavior from the model.
Note |
---|
The Apply Filter check box must be unselected! |
Select the UsageInDiagrams opaque behavior from the model.
Note |
---|
The Apply Filter check box must be unselected! |