简体   繁体   中英

Represent sequence diagram from flow of events

I have a flow of events and alternative events for a Login use case.

Basic Flow:

  • The actor enters his/her name and password.
  • The system validates the entered name and password and logs the actor into the system.

Alternative Flows:

  • Invalid Name/Password: If, in the Basic Flow, the actor enters an invalid name and/or password, the system displays an error message. The actor can choose to either return to the beginning of the Basic Flow or cancel the login, at which point the use case ends.

I come up with this diagram: 在此处输入图像描述

I was said that there is no need for an intermediate Login Screen life line. How should I design the diagram now, according to conditions given above?

This diagram is not bad. It is however somewhat confusing, because:

  • Login is not really a use-case , even if it's a popular practice. This has however no impact on your SD diagram itself.
  • Showing actors in a sequence diagram is not formally correct, even if it's a popular practice.
  • Login Screen is in fact a part of System , which creates a kind of implicit redundancy.

Don't worry about too much about the two first points, if this is the kind of practices that your teacher showed you.

The last point could easily be addressed:

  • The last lifeline could be more specific about the internals (example here ), or,
  • Keep only two lifelines, one for the actor and one for the system. THis is in my view the better alternative when you use actors in a SD.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM