The sequence diagram illustrates how a bank customer interacts with an ATM to withdraw cash. This client inserts the card and the ATM checks the bank database to confirm the card’s validity.  Next, the client inputs their PIN, and the database confirms it is correct. The client sends a request to withdraw cash and selects the amount to withdraw. If the user has enough funds, the ATM will dispense the cash, the user will take the cash, and finally, the ATM will return the card. In case the user does not have enough funds the system denies the request and ejects the card.


Edit this diagram in Gleek

ATM withdrawal diagram code in Gleek

User -Insert card-> ATM
ATM -Card number->+ Database
Database -Card ok->- ATM
ATM -Pin request->+ User
User -Pin->- ATM
ATM -Check pin->+ Database
Database -Pin is correct->- ATM
ATM -Option menu->+ User
User -Withdraw request-> ATM
ATM -Amount request-> User
User -Amount selected->- ATM
ATM -Check the funds-> Database

/alt Transaction approved
Database -. Suffcient funds-> ATM
ATM -Dispense cash-> User
User -Take cash-> ATM
ATM -Return card-> User

/alt Transaction rejected
Database -Insufficient funds-> ATM
ATM -Show rejection details-> User
ATM -Return the card-> User

About sequence diagrams

Sequence or event diagrams help create an overview of how a system works. Sequence diagrams show how all the different parts interact with each other over time, carry out the required actions, and complete processes. A sequence diagram descends from top to bottom showing a sequence of interactions and sequence diagram notations.

Similar sequence diagram examples

Online shopping sequence diagram

Sales process sequence diagram

Notes template sequence diagram

Library management sequence diagram

Travel management system sequence diagram

Railway reservation system sequence diagram

Student management system sequence diagram

State synchronisation sequence diagram

User login sequence diagram