Use Case diagram-UML diagram-2

12,791 views 31 slides Apr 26, 2015
Slide 1
Slide 1 of 31
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31

About This Presentation

Descriptive slides for the Use case Diagrams in UML


Slide Content

Duration: 3 Hrs
1
RamakantSoni
Assistant Professor
Dept. of Computer Science
B K Birla Institute of Engineering & Technology, Pilani, India
Ramakant Soni @ BKBIET Pilani

Each use case represents a unit of useful functionality that subjectsprovide to
actors.
An associationbetween an actor and a use case indicates that the actor and the
use case somehow interact or communicate with each other.
Only binary associations are allowed between actors and use cases.
Ramakant Soni @ BKBIET Pilani 2
Only binary associations are allowed between actors and use cases.
An actor could be associated to one or several use cases.
Customer actor is associated with two use cases -Browse Items and Place Order.

A use case may have one or several associated actors.
Manage Account use case is associated with Customer and Bank actors.
Ramakant Soni @ BKBIET Pilani 3
If there are several actors associated to the same use case, it may not be obvious
from use case diagram which actor initiatesthe use case, i.e. is a "primary
actor". (In non-standard UML, primary actorsare those using system services,
and supporting actorsare actors providing services to the system.)

UML allows the use of multiplicityat one or both ends of an association between the
actor and the use case.
Multiplicity of a Use Case
When an actor has an association to a use casewith a multiplicitythat is greater than
one at the use case end, it means that a given actor can be involved in multiple use
casesof that type.
Ramakant Soni @ BKBIET Pilani 4
Bank actor is involved in multiple Transfer Funds use cases.
use case multiplicitycould mean that an actor interacts with multiple use cases:
•in parallel (concurrently), or
•at different points in time (overlapping), or
•mutually exclusive (sequentially, random, etc).

Multiplicity of an Actor
Requiredactormaybeexplicitlydenotedusingmultiplicity1orgreater.
Multiplicity0..1ofactormeansthattheactormayormaynotparticipatein
anyoftheirassociatedusecases.
Ramakant Soni @ BKBIET Pilani 5
CheckoutusecaserequiresCustomeractor,hencethe1multiplicityof
Customer.TheusecasemaynotneedCreditPaymentService(for
example,ifpaymentisincash),thusthe0..1multiplicity.

Two or more Player actors are involved in the Play Game use case.
Each Player participates in one Play Game.
Ramakant Soni @ BKBIET Pilani 6
Each Player participates in one Play Game.
For instance, multiplicity of actorcould mean that interaction of a particular
use case with several separate actor instances might be:
•simultaneous (concurrent) interaction, or
•overlapping interaction, at different points in time, or
•mutually exclusive (sequential, random, etc.) interaction.

Use cases could be organized using following relationships:
•Generalization
•Association
•Extend
•Include
Ramakant Soni @ BKBIET Pilani 7
•Include

Generalization between Use Cases
Generalizationbetween use cases is similar to generalization between classes –
child use case inherits properties and behavior of the parent use case and may
override the behavior of the parent.
Generalization is shown as a solid directed line with a large hollow triangle
arrowhead, the same as for generalizationbetween classifiers, directed from the
more specific use case to the general use case.
Ramakant Soni @ BKBIET Pilani 8
Web User Authentication use case is abstract use case specialized by Login,
Remember Me and Single Sign-On use cases.

Use cases can only be involved in binary associations.
Binary Association
Binary associationrelates twotyped instances. It is normally rendered as a
solid line connecting two classifiers, or a solid line connecting a single
classifier to itself (the two ends are distinct). The line may consist of one or
more connected segments.
Job and Year classifiers are associated
Ramakant Soni @ BKBIET Pilani 9
Job and Year classifiers are associated
Two use cases specifying the same subject cannot be associated since
each of them individually describes a complete usage of the system.

Ramakant Soni @ BKBIET Pilani 10

Example 1:
Airport check-in and security screening business model
Purpose: An example of a business use case diagram for airport check-in
and security screening.
Credits to: http://www.uml-diagrams.org
Ramakant Soni @ BKBIET Pilani 11
and security screening.
Summary: Business use cases are:
Individual Check-In
Group Check-In (for groups of tourists)
Security Screening, etc.
representing business functions or processes taking place in an airport and
serving needs of passengers.

Actors are :
•Passenger,
•Tour Guide,
•Minor (Child),
•Passenger with Special Needs (e.g. with disabilities), all playing external
roles in relation to airport business.
Use cases are :
Ramakant Soni @ BKBIET Pilani 12
•Individual Check-In
•Group Check-In (for groups of tourists),
•Security Screening , etc. -representing business functions or processes
taking place in airport and serving the needs of passengers.
•Baggage Check-in and Baggage Handling <<extend>> Check-In use
cases, because passenger might have no luggage, so baggage
check-in and handling are optional.

Ramakant Soni @ BKBIET Pilani 13

Example 2: Bank ATM
Purpose:Describeusecasesthatanautomatedtellermachine(ATM)
providestothebankcustomers.
Summary:
Customer(actor)usesbankATMtocheckbalancesofhis/herbank
accounts,depositfunds,withdrawcashand/ortransferfunds(usecases).
ATMTechnicianprovidesmaintenanceandrepairs.
Ramakant Soni @ BKBIET Pilani 14
AlltheseusecasesalsoinvolveBankactorwhetheritisrelatedto
customertransactionsortotheATMservicing.
ATMisabankingsubsystemthatprovidesbankcustomerswithaccessto
financialtransactionsinapublicspacewithouttheneedforacashier,
clerkorbankteller.

Ramakant Soni @ BKBIET Pilani 15

OnmostbankATMs,thecustomerisauthenticatedbyinsertingaplastic
ATMcardandenteringapersonalidentificationnumber(PIN).Customer
AuthenticationusecaseisrequiredforeveryATMtransactionsoweshowit
asincluderelationship.
Ramakant Soni @ BKBIET Pilani 16
Ifneeded,customermayaskATMforhelp.ATMTransactionusecaseis
<<extended>>viaMenuextensionpointbytheATMHelpusecase
wheneverATMTransactionisatthelocationspecifiedbytheMenuand
thebankcustomerrequestshelp,e.g.byselectingHelpmenuitem.

ATMTechnicianmaintainsorrepairsBankATM.Maintenanceusecase
includesReplenishingATMwithcash,inkorprinterpaper,Upgradesof
hardware,firmwareorsoftware,andremoteoron-siteDiagnostics.
Diagnosticsisalsoincludedin(sharedwith)Repairusecase.
Ramakant Soni @ BKBIET Pilani 17

Example 3:
e-Library online public access catalog (OPAC)
Purpose: List top level use cases for e-Library online public access catalog.
AnOnlinePublicAccessCatalog(OPAC)isane-Librarywebsitewhichis
partofIntegratedLibrarySystem(ILS),alsoknownasaLibrary
ManagementSystem(LMS),andmanagedbyalibraryorgroupoflibraries.
Ramakant Soni @ BKBIET Pilani 18
Summary:Patronsofalibrarycansearchlibrarycatalogonlinetolocate
variousresources-books,periodicals,audioandvisualmaterials,orother
itemsundercontrolofthelibrary.Patronsmayreserveorrenewitem,
providefeedback,andmanagetheiraccount.

Ramakant Soni @ BKBIET Pilani 19

Example 3:
Online shopping use case diagrams
Purpose: Provide top level use cases for a web customer making purchases
online.
Summary: Web customer actoruses some web site to make purchases
online.
Ramakant Soni @ BKBIET Pilani 20
online.
Top level use casesare:
•View Items,
•Make Purchaseand
•Client Register.

Description:
WebCustomerusessomewebsitetomakepurchasesonline.Toplevel
usecasesareViewItems,MakePurchaseandClientRegister.
ViewItems(usecase)couldbeusedbycustomerastoplevelusecaseif
customeronlywantstofindandseesomeproducts.Thisusecasecould
alsobeusedasapartofMakePurchaseusecase.
Ramakant Soni @ BKBIET Pilani 21
ClientRegister(usecase)allowscustomertoregisteronthewebsite.
Note,thatCheckoutusecaseis<<included>>usecasenotavailableby
itself.
checkoutis part of make purchase.
ExceptfortheWebCustomeractorthereareseveralotheractorswhich
willbedescribedbelowwithdetailedusecases.

Ramakant Soni @ BKBIET Pilani 22

ViewItemsusecaseisextendedbyseveraloptionalusecases-customer
maysearchforitems,browsecatalog,viewitemsrecommended for
him/her,additemstoshoppingcartorwishlist.Alltheseusecasesare
extendingusecasesbecausetheyprovidesomeoptionalfunctions
allowingcustomertofinditem.
Ramakant Soni @ BKBIET Pilani 23
CustomerAuthenticationusecaseisincludedinViewRecommended Items
andAddtoWishListbecausebothrequirecustomertobeauthenticated.
Atthesametime,itemcouldbeaddedtotheshoppingcartwithoutuser
authentication.

Checkoutuse case includes several required uses cases. Web customer
should be authenticated. It could be done through user login page, user
authentication cookie ("Remember me") or Single Sign-On (SSO).
Web site authentication service is used in all these use cases, while SSO also
requires participation of external identity provider.
Checkoutuse case also includes Paymentuse case which could be done
either by using credit card and external credit payment service or with
PayPal.
Ramakant Soni @ BKBIET Pilani 24
PayPal.

Ramakant Soni @ BKBIET Pilani 25

Example 4:
Credit card processing system
Purpose: Define major use cases for a credit card processing system(credit
card payment gateway).
Summary:Themerchantsubmitsacreditcardtransactionrequesttothe
creditcardpaymentgatewayonbehalfofacustomer.Bankwhichissued
Ramakant Soni @ BKBIET Pilani 26
creditcardpaymentgatewayonbehalfofacustomer.Bankwhichissued
customer'screditcardisactorwhichcouldapproveorrejectthe
transaction.Iftransactionisapproved,fundswillbetransferredto
merchant'sbankaccount.

Creditcardprocessingsystemdescription
CreditCardProcessingSystemisasystemunderdesignorconsideration.
PrimaryactorforthesystemisaMerchant’sCreditCardProcessingSystem.
Themerchantsubmitssomecreditcardtransactionrequesttothecredit
cardpaymentgatewayonbehalfofacustomer.Bankwhichissued
customer'screditcardisactorwhichcouldapproveorrejectthe
transaction.Iftransactionisapproved,fundswillbetransferredto
merchant'sbankaccount.
Ramakant Soni @ BKBIET Pilani 27
AuthorizeandCaptureusecaseisthemostcommontypeofcreditcard
transaction.Therequestedamountofmoneyshouldbefirstauthorizedby
Customer'sCreditCardBank,andifapproved,isfurthersubmittedfor
settlement.Duringthesettlementfundsapprovedforthecreditcard
transactionaredepositedintotheMerchant'sBankaccount.

Credit card processing system description
Insomecases,onlyauthorizationisrequestedandthetransactionwillnot
besentforsettlement.Inthiscase,usuallyifnofurtheractionistakenwithin
somenumberofdays,theauthorizationexpires.Merchantscansubmitthis
requestiftheywanttoverifytheavailabilityoffundsonthecustomer’s
creditcard,ifitemisnotcurrentlyinstock,orifmerchantwantstoreview
ordersbeforeshipping.
Capture(requesttocapturefundsthatwerepreviouslyauthorized)use
Ramakant Soni @ BKBIET Pilani 28
Capture(requesttocapturefundsthatwerepreviouslyauthorized)use
casedescribesseveralscenarioswhenmerchantneedstocompletesome
previouslyauthorizedtransaction-eithersubmittedthroughthepayment
gatewayorrequestedwithoutusingthesystem,e.g.usingvoice
authorization.

Credit card processing system description
Credituse case describes situations when customer should receive a refund
for a transaction that was either successfully processed and settled through
the system or for some transaction that was not originally submitted through
the payment gateway.
Voiduse case describes cases when it is needed to cancel one or several
related transactions that were not yet settled. If possible, the transactions
will not be sent for settlement. If the Void transaction fails, the original
Ramakant Soni @ BKBIET Pilani 29
will not be sent for settlement. If the Void transaction fails, the original
transaction is likely already settled.
Verifyuse case describes zero or small amount verification transactions
which could also include verification of some client's data such as address.

Ramakant Soni @ BKBIET Pilani 30

References:
[1] http://www.uml-diagrams.org/
Ramakant Soni @ BKBIET Pilani 31