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
See this example.
Having said that, I'm with @Tanparmaiel in preferring an activity diagram for alternatives: much more visually intuitive.
hth.
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.