Tool Mentor: Performing Use-Case Analysis Using Rational Software Development Platform
This tool mentor describes how to perform use case analysis using the SDP modeling environment.
Main Description

Overview

This tool mentor assumes that a Design Model and Use-Case Model have been created in accordance with the Model Structure Guidelines for RSx. It also assumes that the Use-Case Model has been populated with actors and use cases by following Find Actors and Use Cases.

In this tool mentor, the following steps are performed for each use case in the current iteration:

The following steps are performed once per iteration:

Additional Tool Information

Create the Use-Case Realization

For each use case to be analyzed:

  1. Navigate to the package in which the use-case realizations are to be created. See Model Structure Guidelines for RSx.
  2. Add a UML Collaboration to that package to represent the use case realization. Give it the same name as the use case you are realizing. Optionally assign to it the UML Keyword "Use Case Realization".
  3. In the package where you created the use case realization, create a free form diagram. Drag the use case realization onto it. Now drag the use case itself (from the use case model) onto the diagram. Draw a realization relationship from the use case realization to the use case. At this point, the traceability semantics have been established. You may now discard the free-form diagram if you wish. From this point forward you will be able to use Topic Diagrams and Traceability Analysis features to examine the derivation and refinement relationships within your models.

Supplement the Use-Case Descriptions

If the use-case description needs to be supplemented with additional internal behavioral descriptions, this can be done by adding to an existing use-case description created by following the steps outlined in Detail a Use Case. If the internal behavior of the system bears little resemblance to its external behavior, a completely separate description may be warranted. In this case, attach a separate use-case specification document (see Artifact: Use Case for the template) to the collaboration , or if an external (linked) document is not desired and the description can be concise, capture it in the model documentation of the collaboration.  See help book iconLinking Model Elements to External Files.

Find Analysis Classes from Use-Case Behavior

  1. Navigate to the package that will contain the analysis classes. See Model Structure Guidelines for RSx.
  2. Create one or more class diagrams to capture the analysis classes. See help book iconAdding Class Diagrams to Model Elements.
  3. Add the analysis classes. See help book iconAdding Class Diagrams to Model Elements.
  4. Assign analysis class stereotypes as appropriate. See help book iconApplying Stereotypes to Model Elements.
  5. Add a brief description to each class. See help book iconDocumenting Model Elements.
  6. Optionally associate a document with each class. See help book iconLinking Model Elements to External Files.

For more information, refer to the help book iconModeling Static Structure with Class Diagrams topic in the online Help.

Distribute Behavior to Analysis Classes

  1. Navigate to the package in which the analysis-level use-case realization (a UML Collaboration) was created.
  2. For each named sub-flow (scenario) of the use case, select the use-case realization (i.e. the Collaboration) and add a Sequence Diagram to it. This will also result in a UML Interaction being added to the Collaboration. Name both the Interaction and the Sequence Diagram to match the name you assigned to the use case flow in the use case model. See help book iconCreating UML Sequence Diagrams.
  3. In the model documentation for the Interaction, type a brief description of the scenario that the sequence diagram depicts. Also copy and paste this description to the model documentation of the sequence diagram itself. See help book iconDocumenting Model Elements.
  4. Drag and drop actors (from the use case model) and analysis classes onto the diagram to create objects for interaction. Or as needed, create new analysis classes as participants in the interaction. See help book iconSequence Diagrams.
  5. Add messages between the objects. Semantically speaking, these messages are instance specifications of operations so you will map them to existing operations or will create new operations as needed. See help book iconSequence Diagrams.
  6. Describe each message (the element of the Interaction) in its model documentation field. See help book iconDocumenting Model Elements.
  7. To describe how the object behaves when it receives the message, assign an operation to the message. (If the operation does not exist, add one to the class as described under Describe Responsibilities below, and then assign the operation to the message.) Describe each operation (the element of the Analysis Class) in its model documentation field.
  8. Define the signatures of any newly created operations.

For more information, refer to the following topics in the online Help:

  • help book iconModeling Static Structure with Class Diagrams
  • help book iconSequence Diagrams

Describe Responsibilities

  1. Describe responsibilities of the class by adding operations. See help book iconManaging Attributes and Operations in Classifiers.
  2. Add a description to each operation. See help book iconDocumenting Model Elements.

Describe Attributes and Associations

Use the following steps below to describe attributes and associations.

Define Attributes

The model documentation field of each attribute should describe what information is to be stored in the attribute. This can be optional when the nature of the information can be made obvious by providing a precise descriptive name for the attribute. Specify multiplicity on each attribute.

See the help book iconAdding Attributes to Classifiers in Diagrams topic in the online Help.

Establish Associations Between Analysis Classes

  1. Navigate to each use-case realization, and add a class diagram to show the participants in the use-case realization; optionally, you can name it Participants. See help book iconAdding Class Diagrams to Model Elements.
  2. Populate the diagram with all the classes that participate in the realization. Discover which classes these are, by examining the lifelines in the sequence diagrams you created previously.
  3. With the classes placed on the diagram, show any existing associations among them - see help book iconRelationships.
  4. Add new association relationships between classes as appropriate. Examination of the sequence diagrams of the use case realization will reveal which classes talk to each other, and what types are passed among them as message parameters. This information will suggest what associations should exist, and in some cases will suggest other (new or existing) classes that should be added to the Participants diagram.
  5. Specify multiplicity on each association end. See help book iconSetting the Multiplicity Property.
  6. Specify navigability on each association end. Where multiplicity is greater than 1, and you anticipate that a specialized type of container class will be used to hold the collection of source class instances, make a note of it either in the attribute's model documentation field or in a note on the Participants diagram. See help book iconDirected Association Relationships.

Describe Event Dependencies Between Analysis Classes

Give a name or stereotype the associations to indicate event dependencies. See help book iconRelationships and help book iconApplying Stereotypes to Model Elements.

Reconcile the Use-Case Realizations

Examine the analysis classes and their associations. Identify and resolve inconsistencies, and remove any duplicates.

Qualify Analysis Mechanisms

The analysis mechanisms used by a class and their associated characteristic do not need to be captured in a formal way. A note attached to a diagram or an extension to the description of the class (see help book iconDocumenting Model Elements and help book iconAdding Notes to Shapes) is sufficient to convey the information.

Establish Traceability

Add traceability dependencies between the Analysis/Design-Model elements and other models, as specified in project guidelines. For example, there may be a separate business model, conceptual data model, or model of user interface screens that you wish to trace analysis classes to. To do this:

  1. Create a diagram for Traceability.
  2. Drag and drop elements to be traced onto the diagram.
  3. Add the traceability dependencies (abstraction dependencies optionally stereotyped <<trace>>). See help book iconAbstraction Relationships
  4. Generate a traceability report: model elements that have trace relationships, including implicit relationships, to and from implementations are displayed in the Model Report view. See help book iconTraceability Relationships

Review the Results

It may be helpful to publish any models to html format. Also note that diagrams can be copied to Microsoft Word and other programs.

For more information, refer to help book iconPublishing Models and to the help book iconPublishing a Model to Web tutorial.

Additional Tool Information

Tutorials:

  • help book iconIntroduction to Modeling Perspective 

Samples:

  • help book iconUML Models - Simple UML Model 

More Information