Sequence diagrams are a popular dynamic modeling solution in UML because they specifically focus on lifelines, or the processes and objects that live simultaneously, and the messages exchanged between them to perform a function before the lifeline ends. Along with our UML diagramming tool, use this guide to learn everything there is to know about sequence diagrams in UML.
What is a sequence diagram in UML?
To understand what a sequence diagram is, it's important to know the role of the Unified Modeling Language, better known as UML. UML is a modeling toolkit that guides the creation and notation of many types of diagrams, including behavior diagrams, interaction diagrams, and structure diagrams.
A sequence diagram is a type of interaction diagram because it describes how—and in what order—a group of objects works together. These diagrams are used by software developers and business professionals to understand requirements for a new system or to document an existing process. Sequence diagrams are sometimes known as event diagrams or event scenarios.
Sequence diagrams are especially helpful when you need to visualize interactions over time in complex architectures while still keeping the flow readable for both technical and non-technical stakeholders.
You may also encounter a specialized variant called a system sequence diagram (SSD). System sequence diagrams, also known as SSD, are actually a subtype of sequence diagrams in UML. These charts show the details of events that are generated by actors from outside the system. Where a standard sequence diagram can model multiple internal objects collaborating, an SSD typically treats the system itself as a single “black box” and focuses on the external actor-to-system event flow for a particular use case.
Note that there are two types of sequence diagrams: UML diagrams and code-based diagrams. The latter is sourced from programming code and will not be covered in this guide. Lucidchart's UML diagramming software is equipped with all the shapes and features you will need to model both. And with our diagram-as-code feature, it's faster and easier than ever. You can create a custom sequence diagram on your Lucidchart document using Mermaid coding.
Benefits of sequence diagrams
Sequence diagrams can be useful references for businesses and other organizations. Try drawing a sequence diagram to:
- Represent the details of a UML use case.
- Model the logic of a sophisticated procedure, function, or operation.
- See how objects and components interact with each other to complete a process.
- Plan and understand the detailed functionality of an existing or future scenario.
If you’re specifically using a system sequence diagram (SSD), it can also help you clarify how the system responds to externally generated events and what operations those events should trigger. SSDs are ideal for demonstrating when and how tasks are completed in a system, especially as those tasks relate to use cases.
Here are a few specific examples of when to use SSDs:
- In a step-wise fashion, modeling operations of the system in response to events
- Building a blueprint for the main success scenario of a given use case, then creating alternative paths
- Identifying major system events and operations in order to come up with realistic estimates of resources needed
Use cases for sequence diagrams
The following scenarios are ideal for using a sequence diagram:
- Usage scenario: A usage scenario is a diagram of how your system could potentially be used. It's a great way to make sure that you have worked through the logic of every usage scenario for the system.
- Method logic: Just as you might use a UML sequence diagram to explore the logic of a use case, you can use it to explore the logic of any function, procedure, or complex process.
- Service logic: If you consider a service to be a high-level method used by different clients, a sequence diagram is an ideal way to map that out.
- Sequence diagram Visio - Any sequence diagram that you create with Visio can also be uploaded into Lucidchart. Lucidchart supports .vsd and .vdx file import and is a great Microsoft Visio alternative. Almost all of the images you see in the UML section of this site were generated using Lucidchart.
Basic symbols and components
| Symbol | Name | Description |
| Object symbol | Represents a class or object in UML. The object symbol demonstrates how an object will behave in the context of the system. Class attributes should not be listed in this shape. | |
| Activation box | Represents the time needed for an object to complete a task. The longer the task will take, the longer the activation box becomes. | |
| Actor symbol | Shows entities that interact with or are external to the system. | |
| Package symbol | Used in UML 2.0 notation to contain interactive elements of the diagram. Also known as a frame, this rectangular shape has a small inner rectangle for labeling the diagram. | |
| Lifeline symbol | Represents the passage of time as it extends downward. This dashed vertical line shows the sequential events that occur to an object during the charted process. Lifelines may begin with a labeled rectangle shape or an actor symbol. | |
| Option loop symbol | Used to model if/then scenarios, i.e., a circumstance that will only occur under certain conditions. | |
| Alternative symbol | Symbolizes a choice (that is usually mutually exclusive) between two or more message sequences. To represent alternatives, use the labeled rectangle shape with a dashed line inside. |
In system sequence diagrams (SSDs), many of these same elements appear, but they’re often used with a tighter focus on external actors, the system boundary, and the events exchanged between them. Most elements we cover in use case diagrams remain in use throughout a system sequence diagram, including:
-
Objects: This box shape with an underlined title represents a class (or object) in UML. Within an SSD, this shape models the system as a black box (a system with inner workings that are not immediately visible).
-
Actors: Shown by stick figures, actors are entities that interact with the system, and yet are external to it.
-
Events: The system events that the actors generate in the sequence. A dashed line, known as a lifeline, represents events in an SSD. Lifelines may begin with a labeled rectangle shape or an actor symbol.
Common message symbols
Use the following arrows and message symbols to show how information is transmitted between objects. These symbols may reflect the start and execution of an operation or the sending and reception of a signal.
| Symbol | Name | Description |
| Synchronous message symbol | Represented by a solid line with a solid arrowhead. This symbol is used when a sender must wait for a response to a message before it continues. The diagram should show both the call and the reply. | |
| Asynchronous message symbol | Represented by a solid line with a lined arrowhead. Asynchronous messages don't require a response before the sender continues. Only the call should be included in the diagram. | |
| Asynchronous return message symbol | Represented by a dashed line with a lined arrowhead. | |
| Asynchronous create message symbol | Represented by a dashed line with a lined arrowhead. This message creates a new object. | |
| Reply message symbol | Represented by a dashed line with a lined arrowhead, these messages are replies to calls. | |
| Delete message symbol | Represented by a solid line with a solid arrowhead, followed by an X. This message destroys an object. |
One practical reminder when placing messages: Objects can communicate across the diagram and don’t need to be adjacent, as long as the arrows clearly connect the correct lifelines and activations. Remember that any object can send or receive a message from any other; they do not have to be adjoining objects.
Sequence diagram examples
Sequence diagram of a hospital management system
Technology has completely transformed the field of medicine, as it has with most industries. A hospital information system, also known as a hospital information system, helps doctors, administrators, and hospital staff managing all of the activities and information collected at a hospital, including checkups, prescriptions, appointments, and information on the patients and their caretakers. The diagram below provides a simple view of how the primary processes operate with each other over time.
Sequence diagram for ATM systems
An ATM allows patrons to access their bank accounts through a completely automated process. You can examine the steps of this process in a manageable way by drawing or viewing a sequence diagram. The example below outlines the sequential order of the interactions in the ATM system.
Beyond these examples, sequence diagrams are frequently used to document common web application flows such as sign-in, password reset, and multi-factor authentication, where the ordering of requests and responses is critical.
How to make a sequence diagram
In Lucidchart, creating a sequence diagram from scratch is surprisingly simple. Just follow these steps:
1. Get started with Lucidchart
If you haven't registered with Lucidchart, you can sign up for free. Log in and select a template or open a new document. With Lucidchart's import features, you also have the option to import existing diagrams from Visio and other diagramming platforms to collaborate and work off of documents you've already started.
From there, the workflow typically breaks into three phases: Identify what to model (participants and messages), build the diagram (manually or from markup), and then format and share it with collaborators.
2. Identify and add components
Identify the components of your system that should be diagrammed. The first necessary set of components is the objects. The objects, sometimes called actors, are the principal players that perform tasks and send messages. For example, in a login sequence, two of the objects would be the potential visitor or user and the login page a visitor uses to interact with the platform they’re attempting to log into.
The other set of components you must identify are the messages the objects will send. What information is passed from one object to another? In the user authentication process we describe, the messages show how a user enters information into the browser to gain access to the webpage and how the web browser will then cross-check credentials to the designated application.
A quick way to validate your participant list is to ask: Who initiates the interaction, which systems or interfaces receive it, and what downstream services must respond before the scenario completes?
3. Add or import shapes
Lucidchart has an entire UML shape library with all the standard shapes needed to create professional sequence diagrams. Click on Shapes in the upper-left corner of the editor and select "UML" to add UML shapes to your toolbar.
If you still need more shapes, you can search icons using the image search feature, or you can import your own stencils and icons. When it comes to symbols and shapes for UML sequence diagrams, there are no limitations in Lucidchart.
4. Create your sequence diagram
Lucidchart provides a variety of ways to create your sequence diagrams.
Automate the process by using sequence markup: If you prefer to generate diagrams from text rather than drawing everything by hand, Lucidchart supports a markup-driven approach. Lucidchart speeds up the process of creating sequence diagrams with our sequence markup feature. This feature allows users to create beautiful sequence diagrams faster and with less hassle. By automating the process, you can generate a sequence diagram simply by typing your markup order directly into the editor.
Just navigate to the UML Sequence shape library, and click Use Markup. A text pad will open, where you can type out the order of your sequence and its rules. When you're ready, click Build, and click back out into the editor to see your new automatically generated sequence diagram.
Manually build a sequence diagram: Once the UML shape library is enabled, it's easy to add your shapes to the canvas with a simple drag-and-drop action. Add rectangles to the top of the canvas, one for each object, and label each rectangle with the name of the object. If the object is both external and internal to the system, you may choose to use an actor symbol instead of a rectangle. You can find this symbol in the use case diagram section of the toolbox.
Represent the flow of time in a sequence by clicking and dragging lines from the object shapes. Dotted lines will instantly appear, symbolizing lifelines. How long you make these lifelines depends on how many messages you must present in the sequence.
Use a template: Lucidchart has a variety of sequence diagram templates to get you started that you can customize to your specific needs.
5. Add text and concepts to your sequence diagram
To create a message, drag out an activation box from the shape library. The activation box is a long, thin rectangle. Drag it onto the dotted lifeline and adjust the size as necessary.
Once you have an activation box in place, click on the box and drag a message arrow out from it. You can label the message by clicking and typing. To change the arrow's direction, click on the message arrow and then the information icon, and choose Reverse direction.
If an action is destroyed in the sequence, use a delete symbol (X) at the end of the lifeline to show that it has been destroyed.
Make sure that all messages correspond to the correct activation box, and remember that the diagram is finished when the last message is drawn.
6. Format your sequence diagram
Lucidchart makes final formatting easy. Check that the logic is sound and that all the processes line up correctly. Although the lifelines don't show a specific timeframe, messages should always be listed in sequential order vertically.
Once you've personally reviewed the document, select and format the desired areas on the diagram. Click Themes in the right sidebar to select a pre-made style format or select your specific shapes and lines of choice to update their fonts, colors, and line settings. You can save time if you set your default styles before you get started with your own custom choice of fonts, line styles, and sizes.
7. Publish, implement, and share
Once your diagram is accurate and formatted, the final step is getting it in front of the people who need it—developers, reviewers, and business stakeholders. Share and publish your finished sequence diagram from Lucidchart to explain your systems clearly to others. Collaborative settings allow you to maintain full control over your diagram. Publish and embed your chart in your company wiki, send it to other current Lucidchart users or non-users with easy share features, and download your final sequence diagram in any file format, even Visio. You can even share your diagram as a link or on your social media channels.
With our extensive list of Lucidchart integrations, you can publish your sequence diagrams on platforms like Google Workspace and add your diagram to any spreadsheet, document, or presentation. You can just as easily add your sequence diagram to Microsoft Office tools like Word, Excel, or PowerPoint quickly, thanks to our free Microsoft add-ons. No matter the operating system you're on, collaborating no longer has to be expensive or come with limitations.
Sequence diagrams are one of the most popular options in UML. Lucidchart makes creating these diagrams simple with the shapes, interface, and collaborative setting you need. Sign up free and create your UML diagrams today!
Ready to create your own UML diagram? Try Lucidchart. It's fast, easy, and free to get started.

Everything you need to make a diagram
Make a polished, professional diagram for free with Lucidchart. No matter what you have in mind, we have the tools you need to build it. Make an account and start diagramming today.
Sign up free


