Use Case diagrams provide a way of describing the external view of the system and its interactions with the outside world. Actors, are a representation of the outside world, and they could be people or computer systems. A use case is a coherent unit of functionality provided by a system or class as manifested by sequences of messages exchanged among the system and one or more outside interactors (called actors), together with actions performed by the system. A use case diagram shows the relationship among actors and use cases within a system.
If you need to learn how to create new diagrams in a project, or the techniques for placing elements and drawing links, consult the User's Guide topics found under " Working with Diagrams: Basic Diagram Techniques" in the Table of Contents. See Related Topics below.
Use Case diagrams usually contain:
Use cases
Actors
Relationship links, specifically
Together can show the additional relationships Include and Extends in Use Case diagrams.
Elements of Use Case diagrams are defined by the UML and Together provides these on the Class Diagram Toolbar. Use Tool-tips to identify the different elements on the toolbar.
Outside of the basic mechanics of drawing the diagram to construct your use case views, there are several conceptual things you should understand about Use Case diagrams:
Typical uses of Use Case diagrams include modeling system context and modeling system requirements. Often you begin at a high level and specify the main use cases of the system itself: "Conduct Business" for example. Then you break the main system use cases down further. For example, the "Conduct Business" use case might have another level of detail that includes the use cases: "Enter Customers" and "Enter Sales". Once you have broken things down to the desired level of granularity, it's useful to have a convenient way of "drilling down" or "rolling up" to grasp the scope and relationships among the system's use case views.
Together's Hyperlinking feature makes it easy to create browse-through sequences comprised of any number of Use Case (or any other) diagrams. You can link entire diagram at one level of detail to the next diagram up or down in a sequence of increasing granularity, or you can link from key Use Cases or Actors to the next diagram. You can browse the hyperlink sequence to follow the relationships between the Use Case diagrams.
You aren't confined to such sequences, however. Hyperlinking is completely flexible and you can use it to link diagrams and elements in the ways most meaningful to you. For example, you might create a hierarchical browse-through sequence of Use Case diagrams, and within the diagrams themselves create hyperlinks that follow a specific Actor through all use cases that involve it.
The mechanics of creating and browsing hyperlinks are covered in User's Guide: Working with Diagrams: Basic Diagram Techniques: Hyperlinking diagrams.
You may find it more useful to show relationship of a Use Case diagram to some other diagram as part of the Use Case diagram itself, that is, not using the Hyperlinking feature. Representing another diagram as an element of the current diagram is called diagram importing.
An imported diagram is represented with a Package that displays the icon of the UML diagram type it represents and the diagram name. The Package also lists the elements of the diagram.
To import a diagram to the current diagram:
In the Model tab, select the node for the diagram you want to import and choose Copy from its speedmenu.
Right-click on the diagram background and choose Paste from the speedmenu.
Note:
Depending on the type of the destination diagram, the Paste Reference command may be enabled. This allows you to import by reference.
You can open the "imported" diagram using the speedmenu of its Package icon.
An Actor element characterizes the role played by an outside object; one physical object may play several roles and therefore several actors may model it. You can select the type of class the actor will belong by setting the stereotype property.
Select the stereotype from
the drop-drown list or enter a new one.
The list of stereotypes can be customized in the configuration file inspector.config. Search the file for "Actor".
A Use Case is a descriptor for a set of action sequences performed by a system (including variations thereof) that produces an observable result of value to one or more actors. The only properties of a Use Case are name and stereotype.
Stereotype: The list of Use Case stereotypes is empty by default. You can define your own set of stereotypes in the configuration file inspector.config. Search the file for "UseCase" and look for the empty values string.
There are several standard relationships among use cases or between actors and use cases. These are:
Communicates: The participation of an actor in a use case. This is the only relationship between actors and use cases. It can also be used between Actors to indicate necessary communication between them.
Extends: An extends relationship from Use Case A to Use Case B indicates that an instance of Use Case B may include (subject to specific conditions specified in the extension) the behavior specified by A. Behavior specified by several extenders of a single target use case may occur within a single use case instance.
Include: An include relationship from Use Case A to Use Case B indicates that an instance of the use case A will also include the behavior as specified by B.
Generalization: denotes a relationship in which objects of a specialized element can be substituted for the objects of a more general (parent) element.
Using the Clone command on the context menu of the navigation pane node, you can quickly create a new diagram with the same content as the existing one. The new diagram has a unique name and is created i the same package.
Using Add Existing command on the diagram's context menu, you can reuse any already created elements in other Use Case diagrams. Note: Elements imported this way are independent copies of the existing ones.