Active relationships are referred to as behavioral relationships and are used primarily in use case diagrams. There are four basic types of behavioral relationships: communicates, includes, extends, and generalizes. Notice that all these terms are action verbs. Table below illustrates the arrows and lines used to diagram each of the four types of behavioral relationships. The four relationships are described next.
Relationship | Symbol | Meaning |
---|---|---|
Communicates | An actor is connected to a use case using a line with no arrowheads. | |
Includes | A use case contains a behavior that is common to more than one other use case. The arrow points to the common use case. | |
Extends | A different use case handles exceptions from the basic use case. The arrow points from the extended to the basic use case. | |
Generalizes | One UML "thing" is more general than another "thing." The arrow points to the general "thing." |
COMMUNICATES. The behavioral relationship communicates is used to connect an actor to a use case. Remember that the task of the use case is to give some sort of result that is beneficial to the actor in the system. Therefore, it is important to document these relationships between actors and use cases. In our first example, a Student communicates with Enroll in Course. Examples of some components of a student enrollment example are shown in the use case diagrams in the figure below.
INCLUDES. The includes relationship (also called uses relationship) describes the situation in which a use case contains behavior that is common to more than one use case. In other words, the common use case is included in the other use cases. A dotted arrow that points to the common use case indicates the includes relationship. An example would be a use case Pay Student Fees that is included in Enroll in Course and Arrange Housing, because in both cases students must pay their fees. This may be used by several use cases. The arrow points toward the common use case.
EXTENDS. The extends relationship describes the situation in which one use case possesses the behavior that allows the new use case to handle a variation or exception from the basic use case. For example, the extended use case Student Health Insurance extends the basic use case Pay Student Fees. The arrow goes from the extended to the basic use case.
GENERALIZES. The generalizes relationship implies that one thing is more typical than the other thing. This relationship may exist between two actors or two use cases. For example, a Part-Time Student generalizes a Student. Similarly, some of the university employees are professors. The arrow points to the general thing.
Developing System Scope
The scope of a system defines its boundaries, what is in scope—or inside the system—and what is out of scope. The project usually has a budget that helps to define scope, and a start and end time. Actors are always outside the scope of the system. The communicates lines that connect actors to the use cases are the boundaries, and define the scope. Since a use case diagram is created early in the systems life cycle, the budget, starting time, and ending time may change as the project progresses; as the analyst learns more about the system, the use case diagrams, use case, and scope may change.