SE Lab - USE CASE DIAGRAMS
SE Lab - USE CASE DIAGRAMS
RSA documentation:
https://www.ibm.com/docs/en/rational-soft-arch/9.6.1?topic=diagrams-use-case
Tools
● In lab: IBM RSA
● For Practice: Lucidchart, draw.io, diagrams.net etc.
● For RSA
○ Go to File ->New Project Model
○ Select Requirements
○ Empty use case package
Behavioral diagrams
Notations
Secondary Actors: Who uses the system for maintenance or admin purposes.
Example: in-house E-rickshaw app you are developing will allow registration
through your LMS accounts.
Actor: Customer
Symbol: A dashed arrow from including use case to included use case with
keyword <<includes>>.
A use case that can be extended by other use case under specific
conditions.
Travel Agency
Purpose: To portray various changes in state of the class. Changes are triggered by
Events.
Show the different situations a system can be in and how it moves between them.
For example the class StaffMember has an attribute startDate which determines
whether a StaffMember object is in the probationary state.
Example: Different states of object of class - Order
Words on the Line/Arrow
Processed
Trigger : an action
[items available]Processed/Deliver
Types of Event
Menu Visible
Menu Visible
State for Item selected()/highlightItem()
DropDownMenu entry/displayMenu
do/playSound
Object exit/hideMenu
States of Campaign object
authorized(authorization code
/AssignStaff(), must be a member of Campaign
AssignManager() Commissioned
class
Start authorized(authorizationCode)[contact
signed]/setCampagnActive()
Active
Campaign Completed()/prepareFinalStatement()
paymentReceived(payment)
Completed [paymentDue - payment > zero]
paymentReceived(payment)
[paymentDue - payment < =zero]
Recursive transition models any
payment event that does not
Paid reduce the amount due to zero or
ArchiveCampaign/unAssignSta beyond
ff();unAssignManager
States of Campaign object : Additional Transition
authorized(authorization code
/AssignStaff(), must be a member of Campaign
AssignManager() Commissioned
class
Start authorized(authorizationCode)[contact
signed]/setCampagnActive()
Active
Campaign Completed()/prepareFinalStatement()
paymentReceived(payment)
Completed [paymentDue - payment > zero]
paymentReceived(payment)
paymentReceived(payment)
[paymentDue - payment =zero]
[paymentDue - payment < zero]/generateRefund()
Paid
ArchiveCampaign/unAssignSta
ff();unAssignManager
Nested subStates
ACTIVE
AdvertPreparation
advertsApproved()
extendCampaign() /authorize()
/modify Budget()
confirmSchedule()
RunningAdverts Scheduling
campaignCompleted()
/prepareFinalStatement()
Nested States
Active
Include / Running
Hidden
decomposition
indicator icon
ACTIVE
Running
AdvertPreparation
advertsApproved()
extendCampaign() /authorize()
/modify Budget()
confirmSchedule()
RunningAdverts Scheduling
campaignCompleted()
/prepareFinalStatement()
Monitoring
surveyComplete()
Survey
Evaluation
runSurvey()
Concurrent States
A transition to a complex state is equivalent to a simultaneous transition to the
initial states of each concurrent statechart
A transition to the Active state means that the Campaign object simultaneously
enters the Advert Preparation and Survey states
cont…
Once the composite states is entered a transition may occur within either
concurrent region without having any effect on the state in the other concurrent
region
A transition out of the Active state applies to all its substates (no matter how
deeply nested)
Synchronized Concurrent States
Synchronization bar [like fork and join]
campaignCompleted()
/prepareFinalStatement()
Monitoring surveyComplete()
Survey
Evaluation
runSurvey()
To Do : Previous Year
Draw the State Chart Diagram for the Weather Monitoring System. The monitoring
object responds to different service requests and state transitions triggered by
these requests. The paused monitoring system will starts if it receives a Startup
message. It will remain in waiting state until it receives any of these signals/
messages (Test, Report weather, Clock Signal, Calibrate). A collecting state is
entered when a clock (PTO) signal is received. After collection, it will again move
to waiting state. If reportWeather message is received, the system moves to
summarising state. It will transmit the data before moving to waiting state again. If
calibrate message is received, the system moves to calibrating state. Testing state
requires calibration OK and test message for transmission to trigger
Solution
Sequence Diagrams
● Sequence diagrams demonstrate the behavior of objects in a use case by
describing the objects and the messages they pass.
● Interaction: describes a collection of communications between instances,
including all ways to affect instances, like operation invocation, as well as
creation and destruction of instances
● Kinds
• Sequence diagram shows a set of objects and the messages sent and received
by those objects.
• The objects are typically named or anonymous instances of classes, but may
also represent instances of other things, such as collaborations, components, and
nodes.
• Collaboration diagram shows a set of objects, links among those objects, and
messages sent and received by those objects.
• The objects are typically named or anonymous instances of classes, but may
also represent instances of other things, such as collaborations, components, and
nodes.
Self Message
Reply
Create and Delete Messages
Sequence Diagrams: Library Management Systems
Collaboration Diagrams: Library Management Systems
Examples from Internet: Hotel Reservation State Transition Diagram
Examples from Internet: Surveillance System
Examples from Internet: Bidding Items
Examples from Internet: A Seminar during registration