Contrary to popular belief, sequence diagrams are not just for large, complex software systems. You can use them to model any system, regardless of size or complexity. But what are they, and why are they important?
A sequence diagram is a type of Unified Modeling Language (UML) diagram showing the sequential interactions between objects in a system. It is a visual representation of how objects communicate with each other to complete a task. Keep reading to learn how they can help professionals understand and document system behavior. This article provides 10 sequence diagram templates to get you started.
In this article
Part I. 10 Sequence Diagram Examples
Imagine you're designing a new e-commerce system. How will customers interact with the system to purchase products? A sequence diagram can help you visualize this process and identify potential problems. In this part, we will provide 10 pre-designed sequence diagrams from the Wondershare EdrawMax Templates Community for your projects.
As a dedicated diagram maker, Wondershare EdrawMax supports 280+ types of diagrams and offers 15,000+ ready-made templates. Download it and visit the templates community to find the one most suitable for you.
Sequence Diagram For Online Shopping Payment System
This sequence diagram is a simplified example. There may be additional steps in the online payment process depending on the specific store and payment gateway used. When you shop online, you choose items and add them to your cart.
Then, you enter your shipping and payment information. The online store sends the payment information to the payment gateway for authorization. Once the store receives the payment, they process your order.
Sequence Diagram for E-Commerce Retail Store
The UML sequence diagram starts with the user, who can log in or view products. If you log in, you can view your cart and make a payment. Once logged in, you can select a product to view its details and add it to your cart. The database section shows the steps that the system takes to process your requests.
When you search for a product, the system searches the database for the product information. When you add a product to your cart, the system updates the cart in the database. When you make a payment, the system processes the payment and updates the database accordingly.
Sequence Diagram for 3-Phase Commit (3PC) Protocol
The coordinator initiates the process by sending a pre-commit request to all participants. The participants execute the requested transaction and send a pre-commit reply to the coordinator. The coordinator then decides whether to commit or roll back the transaction and sends a request to all participants. This sequence diagram ensures that all participants commit or roll back the transaction together.
Sequence Diagram for Marketing
You can use this marketing system sequence diagram as a roadmap to introduce a new product. It begins with the idea of a product not yet available on the market. The solution is to conduct a market survey, discuss solutions, get market feedback, and implement the strategies.
This sequence diagram example can help you visualize the steps in addressing a marketing challenge. It can help to ensure that all the necessary steps are taken and that the team is working towards a common goal.
Sequence Diagram for Software Login
A software login sequence diagram shows the steps in logging in to a software system. The user enters their credentials into the login form and clicks the login button. The backend system checks the credentials against a database of users.
If the credentials are valid, the user is logged in and redirected to the home page. If the credentials are invalid, the user is shown an error message and asked to try again.
Sequence Diagram for Loan
A loan sequence diagram shows the steps involved in applying for a loan. The customer requests a loan from the clerk/agent, who verifies their details and generates a loan request in the system. The system generates a loan ID and provides it to the customer, who views the loan request. The customer views and updates the loan request, and the clerk/agent sends it for processing.
The system processes the loan request and sends a confirmation message to the customer. The officer processes the loan request and grants the loan or sends the request back for further review. Once granted, the officer changes the status of the loan request and closes it.
Sequence Diagram for Assisted Registration
This UML sequence diagram template shows the steps in registering for a mobile app using a payment processor SDK. The mobile app generates a client token and initiates the BT app or browser switch, passing in the client token. The user enters their PayPal login credentials and consents to share their PayPal information with the mobile app.
The mobile app pre-populates the registration profile with the user's PayPal information. The user enters their password, PIN, and MFA code and completes the registration process. If the registration is successful, the mobile app creates a wallet for the user and logs them in.
Sequence Diagram for Online Recruitment
This sequence diagram template shows the steps in applying for an online job. The job seeker sends an email to the employer or receptionist, expressing their interest in a job vacancy. The employer then checks the system to see if there are any available vacancies the applicant is qualified. If they do, the employer arranges an interview.
Sequence Diagram for Submitting Comments
The sequence diagram shows submitting a comment to a website using AJAX. The website validates user comments to ensure they meet the website's guidelines. If the comment is valid, the website submits it to the server using AJAX. The server then processes the user comments and stores it in the database.
Once the user comments have been stored, the server returns a success message to the website. The website then updates the user interface to show the new user comments.
The system sequence diagram also shows a few alternative paths that can happen in the process. For example, if the comment is invalid, the website will display an error message to the user. Additionally, if the server is unavailable, the website will display an error message to the user.
Sequence Diagram for Bank Transactions
This template shows the sequence of steps in a bank transaction, such as a deposit or withdrawal. The customer first provides their credentials and account number to the teller. The teller then verifies the account number and credentials. If the verification is successful, the teller will proceed with the transaction.
For a deposit, the customer will provide the teller with the amount of cash or check they want to deposit. The teller will then record the deposit and update the customer's account balance.
For a withdrawal, the teller will check the customer's account balance to ensure that they have sufficient funds. If they do, the teller will dispense the cash and update the customer's account balance.
Now that you have a basic understanding of sequence diagrams and have seen ten examples, you can start using them in your work. But what if you need to update it to reflect a new feature or change? The next part will show how to customize a template to meet your project needs.
Part II. How To Customize a Sequence Diagram Example
Do you want to use and customize the above-listed sequence diagrams but didn't know where to start? Or maybe you have tried creating one using some diagram makers, but they were too complicated or didn't give you enough options.
One of the best ways to customize a sequence diagram is to use a diagramming tool like Wondershare EdrawMax. It is easy to use, with plenty of customization options and a built-in symbol library. So, if you are ready, follow the steps below to create one for your work needs.
Download and install EdrawMax. Log in with an account of Wondershare, Google, Facebook, or Twitter.
Launch the app, then go to Templates and search for a sequence diagram template.
Step 3: There are different ways to customize the selected template:
From the More Symbols section in the left panel, you can drag and drop a symbol from the UML Sequence Diagram drop-down list to the canvas.
Select an element, such as a shape or line, to open the floating toolbar. Here, edit the Styles, Fill, or Line settings. In addition, go to Home in the upper navigation pane and select an arrow style from the Connector drop-down list.
Once done, go to File in the upper navigation pane and click Export & Send. Next, select a file format in the Export section and customize the settings before you export the diagram.
Part III. Tips for Making a Sequence Diagram
Creating a diagram is crucial for clear communication and efficient project planning. To help you design compelling sequence diagrams online or offline, consider these tips:
Identify the Actors and Objects
Actors are external entities that interact with the system, such as users. Objects are internal components of the system, such as classes, modules, or processes.
Keep It High-Level
Focus on illustrating the essential interactions. Avoid getting too granular since the goal is to provide an overview, not exhaustive detail.
Use a Template
A UML sequence diagram template can provide a starting point for creating your diagram. There are many different templates available online, both free and paid. You can also create your sequence diagram templates.
Use colors to distinguish between different types of actors and objects. It can make your sequence diagrams more visually appealing and easier to read.
Sequence diagrams are powerful tools for visualizing interactions between objects, including data flows, timing constraints, and object dependencies. They can help you to understand and design systems and communicate your ideas to others.
Whether new to these or need a refresher, you now have the knowledge and resources to create them effectively. With EdrawMax's user-friendly interface and pre-designed templates, it's the go-to diagramming tool for professionals and beginners alike. Start simplifying your project visualization with EdrawMax today!