L7.Activity Diagram
L7.Activity Diagram
L7.Activity Diagram
Scenario-based Flow-oriented
modeling modeling
Use case text Data structure diagrams
Use case diagrams Data flow diagrams
Activity diagrams Control-flow diagrams
Swim lane diagrams Processing narratives
Class-based Behavioral
modeling modeling
Class diagrams
State diagrams
Analysis packages
Sequence diagrams
CRC models
Collaboration diagrams 4
Developing an Activity Diagram
• Describes how activities are coordinated.
• Is particularly useful when you know that an operation has to achieve a number
of different things, and you want to model what the essential dependencies
between them are, before you decide in what order to do them.
• Record the dependencies between activities, such as which things can happen
in parallel and what must be finished before something else can start.
2. Transition
Activity1() Activity2()
1. Activities
NOTATION - 2
[x>0]
[x>0]
Activity1()
[x=0] [x=0]
[x<0] [x<0]
3. Decision Diamond
NOTATION - 3
Application/Department/Group/Role Boundaries
Activity Diagrams
[need to Reorder
reorder] item
[stock assigned
to all line items
and payment
authorised]
Dispatch
Order
Activity Diagram for
receiving Supply Receive
Supply
Choose outstanding
order items
* for each chosen
order item
Assign goods
to order
[all outstanding
order items filled]
Add remainder
Dispatch
to stock
Order
Combined Activity
Receive Diagram
order
Receive
Supply
* for each line
item on order Choose
Check line outstanding
Authorise item order items
Payment [in stock]
[failed] * for each chosen
[succeeded] Assign order item
Assign goods
Cancel to Order
to order
Order
[need to Reorder
reorder] item
[stock assigned
to all line items [all outstanding
and payment order items filled]
authorised] Dispatch
Add remainder
Order
to stock
Finance Order Stock
Processing Manager
Receive
order
Receive
Supply
* for each line
item on order Choose
Check line outstanding
Authorise item order items
Payment [in stock]
[failed] * for each chosen
[succeeded] Assign order item
Assign goods
Cancel to Order
to order
Order
[need to Reorder
reorder] item
[stock assigned
to all line items [all outstanding
and payment order items filled]
authorised] Dispatch
Add remainder
Order
to stock
With Swimlanes
• The client needs to know the whole address of a server for the
communication. Client performs some work which includes, making a
decision to initiate a connection to a server. If connection to the server
fails, or the server rejects the connection, the client may try again or may
give up. On successful connection, the client reads the request to execute
the services. GET_OS and GET_IP are the services which will execute
parallel and acknowledgement will be sent to the client by the server.
The ATM will service one customer at a time. A customer will be required to insert an
ATM card and enter a personal identification number (PIN) - both of which will be sent
to the bank for validation as part of each transaction. The customer will then be able to
perform one or more transactions.
The card will be retained in the machine until the customer indicates that he/she desires
no further transactions, at which point it will be returned. The ATM will communicate
each transaction to the bank and obtain verification that it was allowed by the bank. If
the bank determines that the customer's PIN is invalid, the customer will be required to
re-enter the PIN before a transaction can proceed.
If the customer is unable to successfully enter the PIN after three tries, the card will be
permanently retained by the machine, and the customer will have to contact the bank to
get it back. If a transaction fails for any reason other than an invalid PIN, the ATM will
display an explanation of the problem, and will then ask the customer whether he/she
wants to do another transaction.
The ATM will also maintain an internal log of transactions to facilitate resolving ambiguities
arising from a hardware failure in the middle of a transaction. Entries will be made in the
log when the ATM is started up and shut down, for each message sent to the Bank (along
with the response back, if one is expected), for the dispensing of cash, and for the receiving
of an envelope.
Log entries may contain card numbers and amounts, but for security will never contain a
PIN. To avail ATM facility, a customer is required to open/have an account in the bank and
apply for the ATM card. A customer can have one or more accounts and for each account,
only one ATM card will be provided.
The bank also provides SMS updates for every transaction of customer’s account. To obtain
SMS updates, customer is required to register his/her mobile number against his account in
the bank.