Use Case Realization

I l @ ve RuBoard

The use case diagram presents an outside view of the system. The functionality of the use case is captured in the flow of events. Scenarios are used to describe how use cases are realized as interactions among societies of objects. A scenario is an instance of a use caseit is one path through the flow of events for the use case. Scenarios are developed to help identify the objects, the classes, and the object interactions needed to carry out a piece of the functionality specified by the use case. Scenarios document decisions about how the responsibilities specified in the use cases are distributed among the objects and classes in the system. They also provide an excellent communication medium to be used in the discussion of the system requirements with customers. "Scenarios speak the language of the end user and the domain expert, and therefore provide a means for them to state their expectations about the desired behavior of a system to its developers." [1]

[1] Booch, Grady. Object Solutions . Redwood City, CA: Addison-Wesley, 1995.

Each use case is a web of scenariosprimary scenarios (the normal flow for the use case) and secondary scenarios (the what-if logic of the use case). This means that there are numerous scenarios for any given systemall the primary and secondary scenarios for all the use cases. During the early stage of analysis it is safe to say that looking at the primary scenarios for each identified use case is enough. When you find that each new scenario is repeating a lot of steps from previously identified scenarios, then you have reached the finish line. "This phase of analysis should be drawn to a close once the team has elaborated approximately 80 percent of a system's primary scenarios along with a representative selection of the secondary ones. Elaborate upon any more, and your analysis will likely reach diminishing returns; elaborate upon any fewer, and you won't have a sufficient understanding of the desired behavior of the system to properly understand the risks." [2]

[2] Ibid .

In the Rational Unified Process, use case realizations are captured in the Logical View of the model. We will again make use of the concept of a stereotype to show that the use cases that we create in the Logical View of our model are the realizations of the use cases contained in the Use Case View of our model. In other words, the use cases in the Logical View have the same name as the use cases in the Use Case View along with a stereotype of Realization. In the UML, use case realizations are drawn as dashed ovals as shown in Figure 5-1. These Logical View use cases typically are shown on a use case diagram (or set of use case diagrams) contained in the Logical View of your model.

CREATING A LOGICAL VIEW USE CASE DIAGRAM IN RATIONAL ROSE

graphics/quatranirose_icon.gif
  1. Right-click to select the Logical View package in the browser and make the shortcut menu visible.

  2. Select the New:Use Case menu choice. This will add a new use case diagram called NewDiagram to the browser.

  3. While the NewDiagram is still selected, enter the name Realizations.

Figure 5-1. UML Notation for a Use Case Realization

graphics/05fig01.gif

A browser view of the Realizations Use Case Diagram is shown in Figure 5-2.

CREATING USE CASE REALIZATIONS IN RATIONAL ROSE

graphics/quatranirose_icon.gif
  1. Double-click on the Realizations use case diagram in the browser to open the diagram.

  2. Click to select the Use Case icon from the toolbar.

  3. Click on the use case diagram window to place the use case. This will place the new use case on the diagram and also add it to the browser.

  4. Double-click on the use case to open the Use Case Specification.

  5. Enter the name of the use case (same name as the use case in the Use Case View) in the Name field. (Note: You must enter the name in the Specification or in the Browser to invoke Rational Rose's namespace support. If you enter the name on the use case diagram, Rational Rose will assume that the use case is the same use case that is in the Use Case View.)

  6. Click the arrow in the Stereotype field to make the drop-down menu visible.

  7. Select use-case realization.

  8. Click the OK button to close the Use Case Specification.

Figure 5-2. Use Case Realization Diagram in the Browser

graphics/05fig02.gif

The Realizations Use Case diagram is shown in Figure 5-3.

Figure 5-3. Use Case Realization Diagram

graphics/05fig03.jpg

Traceability between the use cases in the Logical View and the use cases in the Use Case View is visualized by adding the Use Case View use cases to the Realizations diagram and connecting them to their realizations using a realize relationship.

The Realizations Use Case diagram showing traceability is shown in Figure 5-4.

Figure 5-4. Use Case Realization Diagram

graphics/05fig04.gif

I l @ ve RuBoard


Visual Modeling with Rational Rose 2002 and UML
Visual Modeling with Rational Rose 2002 and UML (3rd Edition)
ISBN: 0201729326
EAN: 2147483647
Year: 2002
Pages: 134

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net