Prev | Next |
Define Metamodel Constraints
When extending UML to develop a domain-specific Profile, Enterprise Architect allows you to specify constraints to restrict the connectors that can be drawn from a Stereotype, either using the Quick Linker or from the Toolbox. These constraints are defined using the relationships under the 'Metamodel' page of the 'Profile' toolbox.
Access
Ribbon |
Design > Diagram > Toolbox: |
Keyboard Shortcuts |
|
Add Metamodel Constraints to a Profile
Item |
Detail |
See also |
---|---|---|
Meta-Relationship |
A Meta-Relationship connector between two Stereotypes is used to specify a valid UML Connector between these two Stereotypes. The name of the UML Connector should be set in the tag 'metaclass' on the Meta-Relationship connector. In the Profile example, a Meta-Relationship connector is drawn from ServiceSpecification to ServiceInterface and the name of the UML Connector is specified in the 'Tags' tab of the Properties window for the connector. After importing this Profile into a Model, Enterprise Architect will show the UML Connector when the Quick Linker is used to draw a relationship between a ServiceSpecification and ServiceInterface. |
|
Meta-Constraint |
A Meta-Constraint connector between two Stereotypes is used to specify a constraint between these two Stereotypes. The constraint should be set in the tag 'umlRole' on the Meta-Constraint connector. In the Profile example, a Meta-Constraint connector is drawn from ActualProjectMilestone to ProjectMilestone and the constraint is specified as classifier on the tag 'umlRole' in the connector's Tagged Values. After importing this Profile into a model, Enterprise Architect will show only the ProjectMilestone stereotyped elements when assigning a classifier for ActualProjectMilestone element. Constraint values for the tag 'umlRole' include:
|
Constraints on Meta-Constraint connector |
Stereotyped Relationship |
A Stereotyped Relationship connector between two Stereotypes is used to specify a valid stereotyped connector between these two Stereotypes. The Stereotype name should be set in the tag 'stereotype' on the Stereotyped Relationship connector. In the Profile example, a Stereotyped Relationship connector is drawn from ApplicationComponent to ApplicationEvent and the stereotype of the relationship is set to 'Assignment' in the connector's Tagged Values. After importing this Profile into a model, Enterprise Architect will show the 'Assigned' option when the Quick Linker is used to draw a relationship between an ApplicationComponent and ApplicationEvent. Note :
|