This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line! See this thread for details.
You can certainly do if-else branches in UML though their is not a standard way to achieve this. This is because of the flexibility inherit in UML. Just write your conditions so that they are easily recognized as being the inverse of each other.
To an extent you can do this by using the following notation: [x>10>]myMessageForFirstCase() [x<=10]myMessageForAnotherCase() if you need to do more elaborate cases such as multiple messages from an object based on the same conditional, then it is probably best to separate the alternatives into multiple sequence diagrams.
I disagree. A Sequence Diagram tells very little about the implementation. If you would like to test both conditions then that is fine, if not then it is just as good. The purpose of a Sequence or Collaboration Diagram is to show interaction between objects in a Use Case, no more, no less.
Sequence Diagram does tell implementation details if your diargam is for implementation. You can do reverse engineering on classes or java files to get sequence diagrams. But you may get if - else that do not comform to UML. S.D. can be in three levels: conceptual, specification, implementation.
look! it's a bird! it's a plane! It's .... a teeny tiny ad
a bit of art, as a gift, that will fit in a stocking