This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Condition (if-else) in Sequence diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Condition (if-else) in Sequence diagram" Watch "Condition (if-else) in Sequence diagram" New topic
Author

Condition (if-else) in Sequence diagram

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
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

Joined: Dec 20, 2006
Posts: 2497
    
    8

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


OCUP UML fundamental and ITIL foundation
youtube channel
 
wood burning stoves
 
subject: Condition (if-else) in Sequence diagram