User Login Sequence Diagram

In order for stakeholders and project team to read the steps easier, you can optionally generate a UML sequence diagram from the scenario, to visualize the steps in sequence diagram. In this tutorial, we will try to write a simple user story and then generate a sequence diagram from it.

The following five quizzes help to test your knowledge about the class diagram, sequence diagram, state machine diagram, activity diagram and use case diagram. Select a quiz, set the number of questions you want to play and you're ready to begin! The above sequence diagram for Login operation shows how user logs into the system by interacting with various classes and the GUI. The corrections in above diagram: The Customer (Actor) will have to be renamed to 'Person' to differentiate from Customer Class. A new customer will enter his/her username.

User login uml sequence diagram

Writing user story scenario

Sequence diagram tool
  1. Create a new project with Visual Paradigm. Select Project > New from the application toolbar.
  2. In the New Project window, enter Online Shopping as project name. Click the Create Blank Project button.
  3. Open the User Story page in UeXceler. If you are not currently opening UeXceler, select UeXceler > UeXceler from the application toolbar first, and then open the User Story page.
  4. Create a general user story. Click on Add a feature that can... and enter User can add an item to shopping cart. as name.
  5. Double click on the user story to open it.
  6. Open the Scenario page.
  7. Enter the steps to accomplish this user story. Click on the first step and enter Open an item page.
  8. Press Enter and enter step 2: Select attributes (e.g. appearance, style).
  9. A quantity box will be displayed when the item user selected is still available for purchasing. Let's write an if-then-else for this. Press Enter to go to the third step. Then, press Ctrl-Space to toggle the Statement Control list.
  10. Select If from the Statement Control list.
  11. Enter out of stock.
  12. Let's say the system will display an 'out of stock' message in this situation. Press Enter to go into the if condition. Then, press Ctrl-Space again.
  13. This step is performed by the system. Let's create a System Response. Select System Response from the Statement Control list.
  14. Enter Display 'Out of stock' message..
  15. A quantity box will be displayed in the 'else' case. Now, press Enter and press Ctrl-Space to toggle the Statement Control list.
  16. Select Change to Else from the Statement Control list.
  17. Press Enter.
  18. Toggle the Statement Control list by pressing Ctrl-Space. Select System Response from the list and enter Show quantity box..
  19. Press Down to go to end if. Then, press Enter to go to step 5.
  20. The customer will then enter the quantity of item and add the item to cart. Enter Enter quantity. and Click 'Add to Cart'. as step 5 and 6, respectively.
  21. Once the item is added to cart, the system will prompt if the customer want to continue shopping. Press Enter to create a new step. Enter a system response Prompt 'Do you want to continue shopping?' as step 7.
  22. If the customer has chosen 'Yes', the system will then reopen the item page. Use the Statement Control list to add an if - has chosen 'Yes'.
  23. Press Enter to go into the if condition. Press Ctrl-Space to toggle the Statement Control list. This time, select Jump.
  24. Click on the tiny arrow button next to step 1 to represent the jumping to step 1.
SequenceUser Login Sequence Diagram

Generating sequence diagram from user story

We have just completed the scenario. Let's generate a UML sequence diagram from it. Select Synchronize to Diagram > Synchronize to Sequence Diagram from the toolbar.

User Login Sequence Diagram

A UML sequence diagram is generated from the scenario in a second.

If necessary, press Ctrl-Tab to go back to the user story.

Sequence Diagram Tool

Related Links