A guard is associated with a transition. At the time an event is
dispatched, the guard is evaluated, and if false, its transition is
disabled. In the UML metamodel, Guard is a child of
ModelElement.
A guard is shown on the diagram by the text of its expression in square
brackets ([]).
The details tabs that are active for guards are as follows.
ToDoItemStandard tab.
PropertiesSee Section 19.7.2, “Guard Property Toolbar” and Section 19.7.3, “Property Fields For Guard” below.
DocumentationStandard tab.
SourceStandard tab, containing the expression for the guard.
![]() | Note |
|---|---|
In the fullness of time this tab will contain code to implement the guard. This is not implemented in the current release of ArgoUML. | |
ConstraintsStandard tab. ArgoUML only supports constraints on Classes and Features (Attributes, Operations, Receptions, and Methods), so this tab is grayed out.
Tagged ValuesStandard tab. In the UML metamodel,
Guard has the following standard
tagged values defined.
derived (from the
superclass, ModelElement). Values
true, meaning the guard is
redundant—it can be formally derived from other
elements, or false meaning it
cannot.
![]() | Note |
|---|---|
Derived guards still have their value in analysis and design to introduce useful names or concepts, and in design to avoid re-computation. | |
![]() | Note |
|---|---|
The UML | |
Go
upNavigate up through the package structure.
Delete
This deletes the guard from the model
![]() | Warning |
|---|---|
This is a deletion from the model, not just the diagram. | |
NameText box. The name of the guard. By convention guard names start with a lower case letter and use bumpy caps to divide words within the name.
![]() | Note |
|---|---|
ArgoUML does not enforce this naming convention. | |
StereotypeDrop down selector. Guard has no stereotypes by default in the UML standard.
Navigate Stereotype
icon.
If a stereotype has been selected, this will navigate to the
stereotype property panel (see Section 15.4, “Stereotype”).
NamespaceText box. The namespace in which the guard is defined.
TransitionText box, showing the transition that owns this guard.
Button 1 double-click on the transition navigates to that transition.
ExpressionText box. The expression that defines the guard.
LanguageText box. It may be useful to indicate that the expression is written in a particular interpretation language with which to evaluate the text.