dw rt modelado so a usecase4 pdf

Upload: angel-bernardino-andrade

Post on 07-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    1/27

    Model service-oriented architecture with IBMRational Software Architect: Part 4. Use CasemodelsSkill Level: Intermediate

    Bertrand PortierIT ArchitectIBM

    Gregory Hodgkinson ([email protected])SOA LeadProlifics

    11 Mar 2008

    This fourth tutorial in this series covers the use case model. It continues using theonline DVD rental case study introduced in the previous three parts, and you will use

    IBM Rational Software Architect to produce a use case model based on that casestudy.

    Section 1. Before you start

    Learn what to expect from this tutorial and how to get the most out of it.

    About this series

    This tutorial series gives you a detailed look at modeling service-orientedarchitectures (SOA) by using IBM Rational Software Architect. Although primarilyfor software architects and about the activities that they perform, it is also helpful topeople in other roles in the software development process, including those whoprovide input into software architecture, such as business analysts, and those whouse the software architecture as input to perform their own activities, such as

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 1 of 27

    mailto:[email protected]://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/mailto:[email protected]
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    2/27

    software designers and developers (architecture realization, design, andimplementation). This series also covers several core SOA concepts that are usefulto a wide audience.

    You will learn how to do these three things, in these areas:

    Architecture. Describe what SOA comprises and where it fits into theoverall software development process.

    Services. Design the service architecture for a solution that uses SOA.

    Models. Demonstrate how Rational Software Architect supports amodel-driven development (MDD) approach to the specification ofservice-oriented architectures.

    After describing software architecture and defining the place of services within it, this

    series then introduces Rational Software Architect and its SOA- andarchitecture-related features.

    These tutorials use a fictitious online DVD rental case study throughout for threemain purposes:

    To describe the work products used as input to the service architectureactivities, including the component business model, business processmodel, system use case model, and external systems part of the designmodel.

    To describe, step-by-step, how the service model representing thearchitecture is specified in Rational Software Architect, including serviceconsumers, service specifications, service partitions, atomic andcomposite service providers, services, service collaborations, serviceinteractions, and service channels.

    To explain how the service model is then used in the subsequent phasesof the software development process, specifically in design andimplementation.

    About this tutorial

    In Part 1, we introduced the video rental case study that is used as the examplethroughout this tutorial series. We placed service architecture within the frameworkof the Rational Unified Process, and introduced the IBM SOA Solution Stack forreference. We noted the various work products that are used as input to a servicearchitecture, and then used the case study to provide examples for two of them: the

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 2 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    3/27

    business architecture model (described in Part 1 in the form of a componentbusiness model) and the business process model.

    In Part 2, we took a detailed look at what a domain model is, and how it can berepresented in Rational Software Architect. You started to get hands-on experience

    with the tool and created the domain model used in this series.

    In Part 3, we explained how to model the external systems that we want to integrateinto our service oriented architecture. We described bottom-up analysis and themodeling of these external systems in terms of interfaces and components.

    In this part, we cover the use case model. We start by positioning and describing theuse case model in terms of its inputs and how it contributes to the modeling of yourSOA. Then we describe how to create the model in Rational Software Architect, andhow to detail it using the various use case model elements.

    Objectives

    At the end of this part of the tutorial series, you should be able to:

    Describe the value of a use case model

    Produce a use case model that specifies actors, use cases, and use caseflows

    Prerequisites

    To get the most value from this tutorial, it is recommended (but not mandatory) thatyou be familiar with the following:

    Service-oriented architecture (SOA)

    IBM Rational Software Architect

    Unified Modeling Language (UML)

    IBM Rational Unified Process (RUP)

    Important:We highly recommend reading the first three parts in this tutorial series beforereading this part (click the "More in this series" link, upper-left).

    System requirements

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 3 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    4/27

    Rational Software Architect, Version 7 (Fix Pack 005 or later)

    Section 2. Create the Use Case model

    There is one last model that we'll be reviewing before getting on to the Servicemodel: the Use Case model. It will be an important input later when modeling servicecollaborations and interactions in the service model.

    Introducing the Use Case model

    Models such as the IBM Component Business Model, the business process

    model, and the domain model are business-level models. However, the system UseCase model (often referred to as just the Use Case model) is at the IT level ratherthan the business level. Although the business is still very much central to ourconsiderations, we are now modeling more than just things in the business.Specifically, we are extending our view to consider IT things (more specifically.software systems).

    The Use Case model is our most abstract IT-level model. It looks at the solution froma requirements point of view, so we can ask: What behavior does this solution needto support? It is used to specify the black-box behavior of the solution byrepresenting the requirements as a set of interactions between external actors and a

    system. Where the Business Process model provides a sequential end-to-end viewof business steps, which may in some cases include interactions with a system, theUse Case model focuses on just these interactions and therefore provides aninteraction-based view of system requirements.

    A Use Case model defines two things, primarily:

    The definition of external actors who interact with the system

    A list of use cases that they interact with

    Furthermore. each use case specification will include information about triggeringbusiness events, preconditions, and post-conditions. Most important, though, thedetailed, step-by-step description of the behavior represented by the use cases willbe contained in a basic flow of events, along with a set of possible alternative flows(alternatives to the basic flow of events).

    Use case modeling is very useful when you want to create a structured view of thescope of the system. Each use case forms a package of requirements specifications

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 4 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    5/27

    that will then be taken further in the project workflow (namely to design andimplementation, for example). Thus, by adding a use case to the model, you areexpanding the scope of design and implementation work.

    Analyzing the actor-system interactions helps a great deal when an application is

    largely driven by a user interface (UI, screens). For example, in our DVD2U casestudy, we will model a Notify of Return use case, where DVD2U members use aWeb interface to notify DVD2U that they have sent DVDs back by mail. The Notify ofReturn use case details which will then be used to design the Notify of Return Webpage.

    However, Use Case models do not cover only UI-based interactions. In cases wherethere is an external system interacting with the system that you are scoping, theactor will be a system actor, rather than a human actor. The rest of the basicconstructs used to specify the behavior at a requirements level will be the same asin the UI-based interactions.

    For each of these two different types of interactions, you may have a different set ofadditional specification work products that suit that specific type of interaction. Forexample, human actor-driven use cases always benefit from having additionalsimple screen mockups, navigation flow specifications, and specifications of fields.In the same way, you may supplement system actor-driven use cases with amapping to the external system specs that Part 3 of this series described (see the"More in this series" link in the upper-left corner of the screen).

    Inputs to use case modeling

    Use case modeling is part of the Requirements discipline, and it leverages work

    products produced by previous project activities. Broadly speaking, we divide theseinto top-down and bottom-up inputs:

    Examples of top-down work products that we have covered in this seriesso far are the Component Business model (see Part 1), the BusinessProcess model (Part 1 again) and the Domain model (see Part 2).

    We have looked at a single bottom-up work product: the ExternalSystems model (see Part 3).

    There is a further stream of top-down work products that are outside of the scope ofthis series, yet are still very useful to recognize for use case identification. Thisstream includes business needs, system features. and supplementary specifications.These work products, along with those mentioned earlier, are summarized below inFigure 1.

    Figure 1. Inputs to the Use Case model

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 5 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    6/27

    The following are brief descriptions of the nature of these inputs:

    Business Process model. It is used to identify business tasks thatshould be described with use cases (those involving actor-system

    interaction).

    Component Business model. Business functional areas are defined inthe Component Business Model and can be used to form the boundariesof system use case packages i.e. the boundaries of the systems that owneach of the system use cases.

    Domain model. When naming and describing use cases, we use thevocabulary of business things defined in the domain model.

    Features. If a list of features is used as a light-weight mechanism forscoping the requirements of the system, then this is a useful requirementview for using to identify use cases. Each feature should trace to at leastone use case or at least one supplementary specification.

    External Systems model. External systems defined in this model willbecome system actors in the Use Case model.

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 6 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    7/27

    How the Use Case model is used during the SOA modeling activity

    As previously mentioned, the Use Case model is a very helpful structured view ofthe scope of a project. You can use them as informative requirements packages andarrange screen designs around them, because they provide a package of related

    human-UI interactions.

    In the same way, when SOA is the architectural style, use cases providerequirements packages about interactions that are then realized with services. Weuse a technique where, for each use case in the Use Case model, we specify aservice collaboration in the Service model. Then, for each flow under a use case(basic and each of the alternatives), we specify a service interaction (a UMLinteraction) under the service collaboration. In this way, we use the contents of theUse Case model to package the dynamic specifications in the service model.

    Creating the UML Use Case model in Rational SoftwareArchitect

    Tip:The starting point for this section is the SOA tutorial project that is the result of Part 3of this series.

    1. Download the file, DVD_Rental-Part3-ProjectInterchange.zip (seeDownloads), and then follow these instructions to import the project intoyour workspace.

    Note:If you still have the workspace available from Part 3, skip these steps and proceed toStep 8.

    2. Start Rational Software Architect. Use the default workspace or create anew one.

    3. After it has launched, close the Welcome screen if you are in a newworkspace.

    4. Select File > Import.

    5. In the Import wizard, type project in the field labeled Select an importsource filter, and then select Project Interchange and click Next (Figure2).

    Figure 2. Import the Project Interchange

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 7 of 27

    http://download.html/http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/http://download.html/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    8/27

    6. Click Browse, and point to the location where you saved theDVD_Rental-Part3-ProjectInterchange.zip file.

    7. Select SOA Tutorial, and click Finish (Figure 3).

    Figure 3. Import the SOA tutorial project

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 8 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    9/27

    8. Select Window > Open Perspective > Modeling to switch to theModeling perspective (if you are not in it already).

    If you expand the SOA tutorial project, you should see something like Figure 4 inyour Project Explorer view.

    Figure 4. Initial Project Explorer view

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 9 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    10/27

    9. Select the SOA Tutorial project, right-click, and select New > UMLModel.

    10. In the New UML Model wizard, click Next to use the standard template.

    11. In the next screen, specify Use Case Model for the file name. Also, makesure that Create a default diagram in the model is selected, and thenselect Use Case Diagram for the default diagram type.

    12. Click Finish.

    Note:In this tutorial, the Use Case model is so simple that we do not need to use the UseCase model template that is provided. We simply use the Blank Model template.

    Your SOA Tutorial project should now look something like Figure 5.

    Figure 5. The initial Use Case model

    Section 3. Specify the Use Case model elements

    Now, specify these elements of the Use Case model: actors, list of use cases, usecase classifications, and use case flows.

    Actors

    In the Business Process model, we identified a role named Member (the DVD2Umember), and another role called Receiving Clerk (the person working at theDVD2U warehouse). Also, in the Design model (external systems section), weidentified an existing system for Customer Relationship Management. These areall candidates for actors in this Use Case model, so you will now create use case

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 10 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    11/27

    actors to represent the roles that they will play in these use cases (a use case actordefines a role that can be played when interacting with the system).

    1. In the Main diagram, select Actor in the palette, and click somewhere inthe diagram. This will create a new actor. Name it Member.

    2. Repeat the previous step for Receiving Clerk and Customer RelationshipManagement.

    Your diagram should now look something like Figure 6.

    Figure 6. The use case actors

    You know that Member and Receiving Clerk are human actors; whereas, Customer

    Relationship Management is a system. You will now use keywords to distinguishbetween human and system actors.

    3. Select the Member actor, and, in the Properties view, click theStereotypes tab.

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 11 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    12/27

    4. Type human in the Keywords field (Figure 7).

    Figure 7. Keyword: human

    5. Repeat the previous two steps for the other two actors (specify systemfor the Customer Relationship Management actor).

    Your Use Case model, under the Project Explorer, should be like Figure 8.

    Figure 8. The actors of the Use Case model

    Identifying use cases

    In the Business Process model, we identified a business task named Notify of return,which is performed by the Member and classified as Human-System interaction(Figure 9). Next, you will create a use case for this.

    As a general rule, consider the scope of a system use case to be at the level of anatomic system transaction as experienced by the actor. This means that, rather than

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 12 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    13/27

    being new use cases themselves, the next two System Only tasks (Retrievemember's standing and Send out next video) are considered to be part of the scopeof the same system use case.

    Figure 9. The Return Video Business Process model (1 of 2)

    Also, we identified another business task named Record receipt that is performed bythe Receiving Clerk and classified as Human-System interaction (Figure 10). You

    will create a use case for this also. According to the general rule mentioned earlier,Add copy back to stock is considered to be part of this same use case.

    Figure 10. The Return Video Business Process model (2 of 2)

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 13 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    14/27

    Notice that the business analysts did a very good job of classifying the businesstasks in the Business Process model (color-coded orange for Human Only, grey forSystem Only, or blue for Human-System). As you can see, the two business tasksthat we identified use cases from are shown in blue, which mean that they areHuman-System, thus perfect candidates for use cases. However, some use caseswill be based solely on System Only use cases, in which case they will either have asystem actor or they will have Time as an actor if they are kicked off in batch style.Also notice that Human Only tasks do not have any corresponding system usecases, because they are totally manual (although they may produce outputs that areused by downstream Human Only or System Only tasks).

    For this tutorial, you do not need to see the detail of connectors (multiplicity androles) on the use case UML diagrams. Change your Preferences now so thatRational Software Architect does not show them by default:

    6. Select Window > Preferences.

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 14 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    15/27

    7. Under Preferences, type connector in the Filter field.

    8. Click Modeling > Diagrams > Appearance, and select Connectors (seeFigure 11).

    9. Uncheck both Show multiplicity and Show roles (Figure 11), and thenclick Apply and OK.

    Figure 11. Preferences for connectors

    10. In the Main diagram, select Use Case in the palette, and click a blankarea of the use case diagram. This will create a new use case. Name itNotify of Return.

    11. Repeat the previous step for the Record Receipt use case

    12. Member is a role for Notify of Return. Hover your mouse cursor over

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 15 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    16/27

    Member. When the outgoing connector appears (Figure 12), click anddrag it onto Notify of Return.

    Figure 12. A role's outgoing connector

    1. Repeat the previous step to connect Customer Relationship Managementto Notify of Return and to connect Receiving Clerk to Record Receipt.

    Your diagram should now look something like Figure 13.

    Figure 13. Use cases and actors

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 16 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    17/27

    Organizing use cases

    With larger Use Case models (for example, those that contain a dozen use cases), itis a good practice to classify (categorize) use cases. There are differentclassification approaches that you can follow. One is to classify use cases accordingto the business functional area where they belong. You will do that for this Use Casemodel example, even though it contains only two use cases. In this case, thebusiness functional areas are the Component Business Model's business

    components (Figure 14).

    Figure 14. The Component Business Model map for DVD2U

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 17 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    18/27

  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    19/27

    Figure 15.

    Figure 15. The Use Case model under the Project Explorer

    Note:In a typical use case modeling activity, the architect would validate the use cases toeliminate any that are not architecturally significant and to ensure that they havebeen appropriately factored. In this simple DVD2U example, we keep the two usecases, and we will make sure that our design addresses the requirements that theydescribe.

    Use case flows

    Identifying the set of use cases to describe the scope of the project is usually doneby using a Use Case model, but this is only a small part of the overall use casespecification. A great deal of effort is spent in detailing each use case specification.This is where the exact requirements are specified. This is requirements analysiswork, conducted by a systems analyst. The various other work products will be usedas useful input, as described earlier.

    For each use case, the following information is captured (in addition to the functional

    area that it belongs to and its actors):

    Overview. A high-level description of the goal of the use case in one ortwo sentences

    Business event. What triggers the use case

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 19 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    20/27

    Preconditions. The conditions that must be in place for the use case tohappen

    Post-conditions. What is changed as a result of running the use case

    The Notify of Return use case might look like this example:

    Overview: This use case describes how a DVD2U member can use the DVD2Uuser-interface to notify DVD2U that they have returned DVDs by mail.

    Business event: Member wants to notify DVD2U of the return of one or moreDVDs.

    Preconditions: Member is logged onto the system. Member has viewed theirMember Rentals.

    Post-condition: For each video title returned, its status is changed to RETURNED.

    Note:This type of information (as well as the text that describes flows) is often captured inproductivity software documents (such as Microsoft Word). For example, you canuse a template with a section for each use case, with the specific information withintables.

    In this tutorial, you will simply capture this information in the UML use case'sdocumentation field:

    1. From the Project Explorer, select the Notify of Return use case.

    2. From the Properties view, select the Documentation tab, and copy andpaste the information that Listing 1 shows.

    Listing 1.The Notify of Return Use Case documentation

    Overview:This use case describes how a DVD2U member can use theDvD2U user-interface to notify DVD2U that they have returned DVD(s) by mail.

    Business Event:Member wants to notify DVD2U of the return of one or more DVD(s).

    Preconditions:* Member is logged on to the system* Member has viewed their member rentals

    Post-conditions:For each video title returned, its status is changed to RETURNED.

    The bulk of the specification of a use case is contained in the use case flows. A use

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 20 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    21/27

    case flow describes how the outcome of the use case (for example, Member hasnotified of return) is achieved, through a sequence of Actor-System interactions andsystem actions. For each use case, you need at least a basic flow (the "sunny day"or "happy path" that happens in normal conditions), and, optionally, one or morealternative flows ("rainy day" or "unhappy path" scenarios).

    With DVD2U, notification of return allows valued members to get their next title sentbefore the previous one (for which they are notifying of return) has been received.This gives Members an incentive to notify DVD2U that they have returned theirvideo. In addition, this allows DVD2U to better manage the DVD stock and, possibly,to know when a DVD is lost. For Notify of Return, we identify a basic flow and onealternative flow for valued members:

    Listing 2. Basic flow of Notify of Return

    1. Member indicates which member rentals they have returned.

    Steps 2-5 repeat for each member rental indicated:

    2. System updates return notification timestamp for the member rental.3. System retrieves the video copy status for the member rental.4. System updates the video copy status to be ON_THE_WAY_BACK.5. System retrieves the video list title for the member rental.6. System updates the video list title status to be RETURNED.7. System retrieves the member for the member rental

    and checks the member's membership standing.

    Notice how the description of the flow makes intensive use of the businessinformation specifications contained in the Domain model to, for example, describethe change in state of domain elements.

    Listing 3. Alternative flow of Notify of Return

    7a. Member has valued membership standing:7a.1 System retrieves the member's video list.7a.2 System sets member's video list's isNextVideoRequired to TRUE.7a.3 System informs Member that the next video will be on the way.

    3. Add the flow information to Notify of Return's Documentation field.

    The documentation for Notify or Return should now be as Listing 4 shows.

    Listing 4. Revised Notify of Return documentation

    Overview:This use case describes how a DVD2U member can use theDvD2U user-interface to notify DVD2U that they have returned DVD(s) by mail.

    Business Event:

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 21 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    22/27

    Member wants to notify DVD2U of the return of one or more DVD(s).

    Preconditions:* Member is logged on to the system.* Member has viewed their member rentals.

    Post-conditions:For each video title returned, its status is changed to RETURNED.

    Basic flow:1. Member indicates which member rentals they have returned

    Steps 2-5 repeat for each member rental indicated:2. System updates return notification timestamp for the member rental.3. System retrieves the video copy status for the member rental.4. System updates the video copy status to be ON_THE_WAY_BACK.5. System retrieves the video list title for the member rental6. System updates the video list title status to be RETURNED.7. System retrieves the member for the member rental

    and checks the member's membership. standing

    Alternative flows:7a. Member has valued membership standing:7a.1 System retrieves the member's video list.

    7a.2 System sets member's video list's isNextVideoRequired to TRUE.7a.3 System informs Member that the next video will be on the way.

    Section 4. Tips on tooling

    The subsections that follow offer useful observations of how Use Case modeling canuse various tools.

    Creating diagrams to represent flows

    In Rational Software Architect, you can use UML Activities to specify a use case'sflows by following these steps:

    1. From the Project Explorer, select a use case, right-click, and select AddUML > Activity.

    2. Then, inside of the Activity diagram, use partitions (actors), actions, andflows to specify what happens.

    3. Repeat for each flow.

    We did not do that for this tutorial, because we wanted to keep the Use Case modelsimple and show only a flow's written description. A disadvantage in this approach isthat flows are represented merely as plain text and, as such cannot be used as part

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 22 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    23/27

    of a model-driven development approach (validation, automations). For example,how can you automatically tell whether or not each use case has at least a basicflow associated with it? It is outside the scope of this tutorial to detail thisspecification technique. Although we would recommend that you consider usingActivities to model use case flows, we acknowledge that this technique might not suit

    everyone.

    Using Requisite Pro

    IBM Rational RequisitePro is the product that we used to manage allrequirements, including use cases. Remember that we said use case informationcould be captured in Word documents. In this case, you could use the RequisiteProand Word integration tool to bring the use case information into the RequisiteProdatabase. Then, using the Rational Software Architect and RequisitePro integrationfeature, you could trace the UML Use Case model elements to the Requisite Pro

    project elements. We did not show this in this here, because that is already coveredin other developerWorks articles.

    Ensuring traceability

    In the previous paragraph, we talked about traceability from the Rational SoftwareArchitect UML model to the RequisitePro requirement project. Another traceabilitythread goes from the Rational Software Architect UML model to the IBMWebSphere Business Modeler Business Process model. We identified use casesfrom tasks in the Business Process model, and we could include that trace between

    our models. We did not show this here, because Part 2 of this series has alreadydiscussed integration between Rational Software Architect and WebSphereBusiness Modeler.

    Section 5. What's next

    This part of the tutorial series explained using the Use Case model to describe the

    scope of the project in terms of use cases, which is at the core of the Requirementsdiscipline. We discussed the importance of this activity in an SOA project, and thenoutlined the creation of a Use Case model in Rational Software Architect. We thenlooked at modeling the various elements of this model (actors, use cases) and atdetailing each use case specification. In the parts of this series that follow, we willcover the model that is at the core of service-oriented architecture: the Servicemodel.

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 23 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    24/27

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 24 of 27

    http://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    25/27

    Downloads

    Description Name Size Downloadmethod

    project DVD_Rental-Part3-ProjectInterchange.zip13KB HTTPproject DVD_Rental-Part4-ProjectInterchange.zip17KB HTTP

    Information about download methods

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 25 of 27

    http://www.ibm.com/developerworks/apps/download/index.jsp?contentid=293405&filename=DVD_Rental-Part3-ProjectInterchange.zip&method=http&locale=http://www.ibm.com/developerworks/apps/download/index.jsp?contentid=293405&filename=DVD_Rental-Part4-ProjectInterchange.zip&method=http&locale=http://www.ibm.com/developerworks/library/whichmethod.htmlhttp://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/developerworks/library/whichmethod.htmlhttp://www.ibm.com/developerworks/apps/download/index.jsp?contentid=293405&filename=DVD_Rental-Part4-ProjectInterchange.zip&method=http&locale=http://www.ibm.com/developerworks/apps/download/index.jsp?contentid=293405&filename=DVD_Rental-Part3-ProjectInterchange.zip&method=http&locale=
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    26/27

    Resources

    Learn

    Read Part 1 of this series, "Model Service-Oriented Architectures with Rational

    Software Architect: Part 1. Case study, tools, and the business view ". Read Part 2 of this series, "Model Service-Oriented Architectures with Rational

    Software Architect: Part 2. Modeling the business domain ".

    Read Part 3 of this series, "Model Service-Oriented Architectures with RationalSoftware Architect: Part 3. External system modeling ".

    Read the developerWorks introductory article, "The Rational UML profile forbusiness modeling" by Simon Johnston (April 2004). The Rational UML profilefor Business Modeling is a component of the Rational Unified Process (RUP). Itpresents a UML language for capturing business models and is supported bythe Business Modeling Discipline in the RUP.

    Read the developerWorks intermediate-level article series, "Modeling SOA" byJim Amsden (October 2007). A series of five articles about developing softwarebased on service-oriented architecture (SOA). It shows how to use UML modelsextended with the IBM Software Service Profile to design an SOA solution thatis connected to business requirements, yet independent of the solutionimplementation. The author describes the business goals and objectives andthe business processes implemented to meet those objectives, and thenexplains how to use the processes to identify business-relevant servicesnecessary to fulfill the requirements that they represent.

    Visit the Rational software area on developerWorks for technical resources andbest practices for Rational Software Delivery Platform products.

    Subscribe to the developerWorks Rational zone newsletter. Keep up withdeveloperWorks Rational content. Every other week, you'll receive updates onthe latest technical resources and best practices for the Rational SoftwareDelivery Platform.

    Subscribe to the Rational Edge newsletter for articles on the concepts behindeffective software development.

    Browse the technology bookstore for books on these and other technical topics.

    Get products and technologies

    Download a trial version of Rational Software Architect.

    Download trial versions of IBM Rational software.

    Download IBM product evaluation versions and get your hands on applicationdevelopment tools and middleware products from DB2, Lotus, Rational,

    developerWorks ibm.com/developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008. All rights reserved. Page 26 of 27

    http://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase1.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase1.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase1.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase3.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase3.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase3.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/rational/library/4476.htmlhttp://www.ibm.com/developerworks/rational/library/4476.htmlhttp://www.ibm.com/developerworks/rational/library/4476.htmlhttp://www.ibm.com/developerworks/views/rational/libraryview.jsp?search_by=Modeling+SOA:&S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/views/rational/libraryview.jsp?search_by=Modeling+SOA:&S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/rationalhttps://www.ibm.com/developerworks/newsletter/http://www.ibm.com/developerworks/rational/rationaledge/http://www.ibm.com/developerworks/apps/SendTo?bookstore=safarihttp://www.ibm.com/developerworks/downloads/r/rswa/?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/downloads/?S_TACT=105AGX15&S_CMP=ARThttp://www.ibm.com/developerworks/downloads/?S_TACT=105AGX15&S_CMP=ARThttp://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/developerworks/downloads/?S_TACT=105AGX15&S_CMP=ARThttp://www.ibm.com/developerworks/downloads/?S_TACT=105AGX15&S_CMP=ARThttp://www.ibm.com/developerworks/downloads/r/rswa/?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/apps/SendTo?bookstore=safarihttp://www.ibm.com/developerworks/rational/rationaledge/https://www.ibm.com/developerworks/newsletter/http://www.ibm.com/developerworks/rationalhttp://www.ibm.com/developerworks/views/rational/libraryview.jsp?search_by=Modeling+SOA:&S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/rational/library/4476.htmlhttp://www.ibm.com/developerworks/rational/library/4476.htmlhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase3.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase3.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase1.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase1.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase.html?S_TACT=105AGX15&S_CMP=LPhttp://www.ibm.com/developerworks/edu/r-dw-rt-modsoacase.html?S_TACT=105AGX15&S_CMP=LP
  • 8/6/2019 Dw Rt Modelado So a Usecase4 PDF

    27/27

    Tivoli, and WebSphere.

    Discuss

    Rational Software Architect, Data Architect, Software Modeler, ApplicationDeveloper and Web Developer forum: Ask questions about Rational Software

    Architect.

    Check out developerWorks blogs and get involved in the developerWorkscommunity.

    About the authors

    Bertrand Portier

    Bertrand Portier is an IT Architect with IBMs worldwide SOA TechnicalSales organization. He used to work for IBM SWG SOA Advanced

    Technologies to help customers with strategic SOA transformations andcreate SOA assets for IBM. He is heavily involved in model-driven andasset-based development, and has extensive experience with Webservices. A regular speaker at conferences and the author of severaltechnical articles, he also co-authored a redbook on SOA solutions

    Gregory Hodgkinson

    Gregory Hodgkinson is a lead consultant at Prolifics(www.prolifics.com). Previous to that he was a founder, director, andthe SOA lead at the company 7irene. He has 10 years of experience insoftware architecture, initially specializing in the field ofcomponent-based development (CBD), then moving seamlessly intoservice-oriented architecture (SOA). His extended area of expertise isthe software development process, and he assists Prolifics and IBMcustomers in adopting RUP framework-based agile developmentprocesses and SOA methods. He is still very much a practitioner, andhas been responsible for service architectures for a number of FTSE100 companies. He presents on agile SOA process and methods at

    both IBM (Rational and WebSphere) and other events and has alsoco-authored a Redbook on SOA solutions.

    ibm.com/developerWorks developerWorks

    Part 4. Use Case models Trademarks Copyright IBM Corporation 2008 All rights reserved Page 27 of 27

    http://www.ibm.com/developerworks/forums/dw_forum.jsp?forum=430&cat=24http://www.ibm.com/developerworks/forums/dw_forum.jsp?forum=430&cat=24http://www.ibm.com/developerworks/blogs/http://www.ibm.com/developerworks/communityhttp://www.ibm.com/developerworks/communityhttp://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/developerworks/ibm/trademarks/http://www.ibm.com/developerworks/communityhttp://www.ibm.com/developerworks/communityhttp://www.ibm.com/developerworks/blogs/http://www.ibm.com/developerworks/forums/dw_forum.jsp?forum=430&cat=24http://www.ibm.com/developerworks/forums/dw_forum.jsp?forum=430&cat=24