Search code examples
umldiagramsequence-diagram

Creating a sequence diagram to show admin privileges


In this sequence diagram I am trying to show:

  • Admin can login.
  • If login success -> redirect to admin dashboard
  • Once at admin dashboard, admin can click UI buttons to [ edit, view & delete ] a user

I am not sure if this diagram displays this correctly. Is it okay just to use Boundary "Admin Panel" to show different options or should each option be it's own boundary? e.g. boundary for edit user, delete user & view user.

Any feedback to improve this to make it clearer would be really appreciated

Thanks in advance. enter image description here


Solution

  • This diagram shows too much and in a misleading way.

    This diagram says that the Admin will login, then edit a user, the view a user, then delete a user. But I don’t think that you want to say that the Admin will always do all these actions and in this precise order. This is why this diagram is misleading.

    Moreover, I don’t think that when doing the three in this order there would be anything different from the case it would be done in a different order. So there’s no need to show all the possibilities in a single diagram.

    So, my advice:

    • cut this diagram in 4 different interactions: login, edit, view, and delete. All but the first one would have as precondition that user is logged in. In fact I make more assertive here what was already suggested for your registration scenario in your earlier question today
    • UML is neutral about what you can or should represent with the sequence diagram. Nevertheless, it is best kept for explaining interactions that are not obvious. Using it as a kind if visual programming for obvious interactions may be time-consuming modelling that tends to quickly be obsolete.
    • also, sequence diagrams are not the best way for modelling user interface. If you model your user interface with a wireframe storyboard (see links in the edit of my answer to your earlier question), you could then link the relevant sequence diagram to the relevant user interface design. The advantage is that you could verify with users that UI latch expectations based on the wireframe, but document for the developers what happens behind the scene, thus allowing to better understand how the short sequence contributed to the whole.