There are three ideas to consider:
 
1.  Combined Fragments
This is the optional/alternative box that Scott recommended.  They are called combined fragments.  They look like a set of rectangles joined top to bottom, each rectangle representing a different alternative. This URL shows you what they look like:
http://oldresources.visual-paradigm.com/uml_diagrams/sequence_diagram/sequence_diagram_notation.html?s=interaction+occurrence (scroll down to alternative combined fragment)
http://oldresources.visual-paradigm.com/uml_diagrams/sequence_diagram/using_alternative_combined_fragments_in_sequence_diagram.html
 
2.  Interaction Occurrence / Interaction Use
Now, if the messages in each fragment are a small set with few objects, you can include them right in the rectangle.  But if there are a lot of messages and plenty of objects, many of which are only used inside of the fragment, you may want to put them on a separate diagram.  To link the new diagram to the old, you will use an Interaction Occurrence.  The same URL above shows you an Interaction Use.
 
3.  Use a note
If the messages are a single message each, some people just plop a note down, anchor it to each message and say Alternate Flows.
 
Hope this helps!
 
    --ant


From: uml-bounces@lists.ca.ibm.com [mailto:uml-bounces@lists.ca.ibm.com] On Behalf Of Scott Fleming
Sent: Tuesday, August 19, 2008 8:43 AM
To: uml@lists.ca.ibm.com
Subject: Re: [uml] Condition in sequence diagram

Kianoosh
UML  sequence diagrams offer the concepts of optional and alternative sequences. They are each represented by a box around a sequence. Alternative is sort of like if...elseif...else logic. Optional logic is sort of like if this condition is true then do this stuff with out the else condition.
Scott Fleming

 
On 8/19/08, uml <disadmin@us.ibm.com> wrote:
I have an actor which can click on for example save or cancel and I have a class which define my form how should I connect this actor to the class? How should I show that that actor has a choice between clicking on save or cancel button?(events in programming)



Best regards:



         Kianoosh Akhavan Karbassi

_______________________________________________
uml mailing list
uml@lists.ca.ibm.com
Unsubscribe:uml-leave@lists.ca.ibm.com


LOCKQUOTE>