Dependency relationship (UML)
A dependency relationship (Engl. Dependency ) is a model element in the Unified Modeling Language (UML), a modeling language for software and other systems.
description
A dependency relationship in UML2 is a directed relationship between a dependent ( client ) and an independent element ( supplier ). Both endpoints can also consist of several dependent or independent elements.
There is a crucial difference between dependency relationships and associations : no instances can be created of dependency relationships. If two classes are connected to an association, then two instances of these classes are also connected to an instance of the association, that is, to an object relationship. There are no comparable consequences for dependency relationships because no instances can be created from them.
A dependency relationship is graphically represented as a dashed line with an open arrowhead. The arrowhead is drawn at the independent element.
Types of dependency relationships
Usage relationship
The use relationship ( Usage ) indicates that the dependent element uses the independent element. A usage relationship is decorated with the keyword «use»
.
Abstraction relationship
If an element is an abstraction of another element may be between the two an abstraction relation ( Abstraction ) be modeled. In the general case, an abstraction relationship can be «abstract»
recognized by the keyword . However, special cases differ from this. «derive»
indicates that the dependent can be derived from the independent element. «trace»
indicates that there is a dependency relationship between the two model elements that must be taken into account when changes are made to the independent element. If an element refines another element, for example by modeling additional details, a dependency relationship with the keyword «refine»
can indicate this.
Inclusion Relationship
The inclusion relationship means that one use case takes into account the behavior of another use case, i.e. the included use case is called when the other dependent one expires. An inclusion relationship is decorated with the keyword “include”.
Realization relationship
The realization relationship ( Realization ) and the interface realization relationship ( InterfaceRealization ) are two further forms of the abstraction relationship. Here the independent element stands for a specification and the dependent element for a realization of the same. Often times, this relationship models that a class implements an interface , a pattern that is common in models for object-oriented software.
The graphical notation for a realization relationship differs from the generic notation for a dependency relationship in that the arrowhead is drawn as an open , closed tip, as in generalization . Compare the example on the right.
Distribution relationship
The distribution relationship (English. Deployment ) models a dependency between an artifact and a node . It indicates that the artifact will be delivered to the node and installed there in an appropriate manner. A distribution relationship is decorated with the keyword «deploy»
.
The figure on the right shows two distribution relationships between two artifacts and a node.