UML - Sequence Diagram how to show alternate course

不打扰是莪最后的温柔 提交于 2019-12-13 04:20:06

问题


I've a function called logon(uname,pass) which returns either success or failure message. Should i show this as ALT fragment?

Basically I'm after transforming this use case to sequence diagram:

> main flow:
> 1. User provide username password.
> 2. Display successful message after logon.
> 
> alternate flow:
> 1. User provide invalid username and passsword.
> 2. Display invalid username or passwrod message.

Thanks


回答1:


See this example.

Having said that, I'm with @Tanparmaiel in preferring an activity diagram for alternatives: much more visually intuitive.

hth.




回答2:


You should use an Activity diagram which depicts the workflow of the action/activities of your application. The sequence diagram shows how the processes interact with one another and in what order.



来源:https://stackoverflow.com/questions/6000268/uml-sequence-diagram-how-to-show-alternate-course

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!