This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread 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 Elasticsearch in Action this week in the Big Data 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: 2531
    
  10

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Condition (if-else) in Sequence diagram