File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Condition (if-else) in Sequence diagram

 
Sam Gehouse
Ranch Hand
Posts: 281
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to best show condition (if-else) in sequence diagram.

For example, if login is successfull move on.

If login is not successful, then redirect.

Is it fine to show both the conditions in the same sequence digram? But the lifeline of an object may have to end in false condition, but the lifeline will continue if it were true.
 
Jan Cumps
Bartender
Posts: 2576
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
UML2 has support for if-then-else in sequence diagrams.
The mechanism is called Structured Control:Conditionala execution.
This link shows an example.

Regards, Jan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic