wood burning stoves 2.0*
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
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
 
Consider Paul's rocket mass heater.
 
subject: Condition (if-else) in Sequence diagram