Need help in a login sequence diagram

2019-08-08 18:55发布

问题:

hi everyone i'm à newbie in uml and my question is simple:i want to draw a sequence diagram for members login and the steps are as follows:


the member visits the login page

enters email/pwd

clicks login

then the system goes to the database

if record exists

if account active

  display login success msg 

else (account not active)

  display error msg

else(record does not exists)

display error msg


and the diagram should contains the following objects:

  • member

  • login page

  • System

  • database

so can any one show me how it's done and thanks in advance.

回答1:

The best is simply not to use a sequence diagram for things which are better expressed in code like if and loop. However, if there is a need for it, use fragments and put the according sections inside.

See here for examples.

Your case will start looking like this: