Upload
ben-avraham
View
220
Download
5
Embed Size (px)
DESCRIPTION
tip
Citation preview
8/4/2015 HowtoDrawUMLUseCaseDiagramDetermineSubjectBoundaries,DefineActors,DescribeUseCases.
http://www.umldiagrams.org/usecasediagramshowto.html 1/5
HowtoDrawUMLUseCaseDiagramThereareseveralapproachesonhowtodrawUMLusecasediagrams.Ifyoudon'tknowfromwheretostart,trytofollowthestepsdescribedhere.
DefineSubjectSubjectisabusiness,softwaresystem,subsystem,component,device,etc.thatwearedesigningorjusttryingtounderstandhowitisworking.Itisveryimportanttodefinewhatkindofsystemitis,andwhatisitsscopeorboundary.Giveitapropername,anduseappropriatestereotype,e.g.BusinessorSubsystem.
Forexample,wewanttodescribeaPharmacy,anditisnotsoftwarepharmacyprescriptionsystembutactualpharmacybusiness.So,wewilldrawitasshownbelow,usingBusinessstereotype.
BusinessPharmacyasUMLsubject.
AnotherexampleofasubjectshownbelowisTicketvendingmachine,i.e.vendingmachinethatsellsandproducesticketstocommuters.Thiskindofmachineisacombinationofbothhardwareandsoftware,anditisonlyapartofthewholesystemsellingticketstothecustomers.SowewilluseSubsystemstereotype.
TicketvendingmachineasUMLsubject.
HerearesomeotherexamplesofUMLsubjectname:DepartmentStoreAirportAutomatedTellerMachine(ATM)PointofSale(POS)TerminalOnlineTravelReservationSystemElectronicPrescriptionService
Bydeclaringasubjectwearedefiningboundariesofthesystem,tobeabletodeterminewhatorwhoisinsidethesystem,andwhatorwhoisoutsideofit.
DefineActorsUMLactorissometype,grouporparticularfacetofusersthatrequiresomeservicesfromthesubject.Actorisanexternalentity,whichcouldbeahumanuserofthedesignedsystem,orsomeothersystemordeviceusingoursystem.
8/4/2015 HowtoDrawUMLUseCaseDiagramDetermineSubjectBoundaries,DefineActors,DescribeUseCases.
http://www.umldiagrams.org/usecasediagramshowto.html 2/5
ForthePharmacybusinesswedefinedabove,Customerisanexampleofanactor.Customerusesservicesprovidedbypharmacy.Pharmacistworkinginthepharmacyisnotanactor,heorsheispartofthebusinessandisusuallycalledbusinessworker.
CustomerisabusinessactorforthePharmacybusiness.
Ticketvendingmachineallowscommuterstobuytickets.SoCommuterisouractorinthiscase.
Commuterisanactorfortheticketvendingmachine.
Actorsshouldhavenamesaccordingtotheroletheyplayinrelationtooursystem.Examplesofactornames(userroles):SupplierPassengerReceptionistWebClientBankPaymentAuthorizationSystem
DefineUseCasesNowaswedefinedtheboundariesofthesystemthatwearedesigningoranalysing,andexternalusersofthesystem,weneedtodefinewhatdothoseusersneedfromthesystem.Eachusecasespecifiesaunitofcompleteandusefulfunctionalitythatthesubjectprovidestotheactor(s).Usecaseshouldreflectuserneedsandgoals,andshouldbeinitiatedbyanactor.
Forthepharmacycustomerabusinessusecasewouldbetogetsomemedicine.SoweareaddingProcureMedicinesbusinessusecase.BusinessactorCustomerparticipatinginthebusinessusecaseshouldbeconnectedtotheusecasebyassociation.
BusinessusecaseProcureMedicinesfortheCustomerofthePharmacybusiness.
TheultimategoaloftheCommuterinrelationtoourticketvendingmachineistobuyaticket.SoweareaddingPurchaseTicketusecase.Purchasingticketmightinvolveabank,ifpaymentistobemadeusingadebitorcreditcard.SowearealsoaddinganotheractorBank.Bothactorsparticipatingintheusecaseshouldbeconnectedtotheusecasebyassociation.
8/4/2015 HowtoDrawUMLUseCaseDiagramDetermineSubjectBoundaries,DefineActors,DescribeUseCases.
http://www.umldiagrams.org/usecasediagramshowto.html 3/5
TicketvendingmachineprovidesPurchaseTicketusecasefortheCommuterandBankactors.
Toplevelusecasesshoulddescribecompleteunitoffunctionalityprovidedtotheactor.Examplesofusecasenames:HireEmployeeTransferFundsFindBookMakeTravelReservationsSchedulePatientAppointment
DescribeUseCaseBehaviorsUsecasebehaviorsmaybedescribedinanaturallanguagetext(opaquebehavior),whichiscurrentcommonpractice,orbyusingUMLbehaviordiagramsforspecificbehaviorssuchasactivity,statemachine,interaction.
UMLtoolsshouldallowlinkingbehaviorstothedescribedusecase.ExampleofsuchbindingofausecasetothebehaviorrepresentedbyactivityisshownbelowusingUML2.5notation.
PurchaseTicketusecaseownsbehaviorrepresentedbyPurchaseTicketactivity.
PurchaseTicketactivitydiagramexamplebelowdescribesbehaviorofthePurchaseTicketusecase.
8/4/2015 HowtoDrawUMLUseCaseDiagramDetermineSubjectBoundaries,DefineActors,DescribeUseCases.
http://www.umldiagrams.org/usecasediagramshowto.html 4/5
ExampleofPurchaseTicketusecasebehaviordescribedusingactivitydiagram.
Usecasediagramsexamples
Noticedaspellingerror?SelectthetextusingthemouseandpressCtrl+Enter.
Disqusseemstobetakinglongerthanusual.Reload?
Follow@uml_diagrams
umldiagrams.org2129Megusta
0
byKirillFakhroutdinovThisdocumentdescribesUML2.5andisbasedonOMGUnifiedModelingLanguage(OMGUML)2.5specification [UML2.5FTFBeta1].AllUMLdiagramswerecreatedinMicrosoftVisio2007or2010using UML2.2stencils.Youcansendyourcommentsandsuggestionstowebmasteratwebmaster@umldiagrams.org.
8/4/2015 HowtoDrawUMLUseCaseDiagramDetermineSubjectBoundaries,DefineActors,DescribeUseCases.
http://www.umldiagrams.org/usecasediagramshowto.html 5/5
Copyright20092014umldiagrams.org.Allrightsreserved.