Topic
  • 4 replies
  • Latest Post - ‏2008-08-20T22:12:32Z by SystemAdmin
SystemAdmin
SystemAdmin
1130 Posts

Pinned topic Condition in sequence diagram

‏2008-08-19T08:26:47Z |
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
Updated on 2008-08-20T22:12:32Z at 2008-08-20T22:12:32Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1130 Posts

    Re: [uml] Condition in sequence diagram

    ‏2008-08-19T15:43:09Z  
    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<Unsubscribe%3Auml-leave@lists.ca.ibm.com>
    >
    >
    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


    _______________________________________________
    uml mailing list
    uml@lists.ca.ibm.com
    Unsubscribe:uml-leave@lists.ca.ibm.com
  • SystemAdmin
    SystemAdmin
    1130 Posts

    RE: [uml] Condition in sequence diagram

    ‏2008-08-19T18:47:26Z  
    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<Unsubscribe%3Auml-leave@lists.ca.ibm.com>
    >
    >
    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


    _______________________________________________
    uml mailing list
    uml@lists.ca.ibm.com
    Unsubscribe:uml-leave@lists.ca.ibm.com
    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/sequen
    ce_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
    <mailto:Unsubscribe%3Auml-leave@lists.ca.ibm.com>
    _______________________________________________
    uml mailing list
    uml@lists.ca.ibm.com
    Unsubscribe:uml-leave@lists.ca.ibm.com
  • SystemAdmin
    SystemAdmin
    1130 Posts

    Re: RE: [uml] Condition in sequence diagram

    ‏2008-08-20T03:35:16Z  
    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/sequen
    ce_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
    <mailto:Unsubscribe%3Auml-leave@lists.ca.ibm.com>
    _______________________________________________
    uml mailing list
    uml@lists.ca.ibm.com
    Unsubscribe:uml-leave@lists.ca.ibm.com
    Dear Scott and ant thank you for your help. I know about alt but the problem is there is no if in my sequence these classes should be connected to the actor directly and I don't have any if in my actor! as I said before these are buttons on my form and the actor can click on any button which have their own functions so when I connect my actor to these classes for example "Main Form" an actor have two choice click on save which has the btnSave_Click() function and Cancel button which has the btnCancel_Click() and notice that and actor is directly connected to the "Main Form" class
  • SystemAdmin
    SystemAdmin
    1130 Posts

    Re: RE: [uml] Condition in sequence diagram

    ‏2008-08-20T22:12:32Z  
    Dear Scott and ant thank you for your help. I know about alt but the problem is there is no if in my sequence these classes should be connected to the actor directly and I don't have any if in my actor! as I said before these are buttons on my form and the actor can click on any button which have their own functions so when I connect my actor to these classes for example "Main Form" an actor have two choice click on save which has the btnSave_Click() function and Cancel button which has the btnCancel_Click() and notice that and actor is directly connected to the "Main Form" class
    alt does not require an if. It can be used for a switch-case scenario as
    well. However, this is only part of the problem. It sounds like you need to
    show that you could click on any of the following buttons. Then, as a
    separate issue, what happens if you click on a particular button.

    I would diagram at a high level, which button clicks are available using a
    communication diagram. I would not go into detail on that diagram.
    I would then diagram separately, the sequence for each particular button
    click using either a sequence diagram or a communication diagram depending
    on which ever makes more sense to me under the current situation.
    Scott Fleming
    On Tue, Aug 19, 2008 at 10:35 PM, uml <disadmin@us.ibm.com> wrote:

    > Dear Scott and ant thank you for your help. I know about alt but the
    > problem is there is no if in my sequence these classes should be connected
    > to the actor directly and I don't have any if in my actor! as I said before
    > these are buttons on my form and the actor can click on any button which
    > have their own functions so when I connect my actor to these classes for
    > example "Main Form" an actor have two choice click on save which has the
    > btnSave_Click() function and Cancel button which has the btnCancel_Click()
    > and notice that and actor is directly connected to the "Main Form" class
    >
    > _______________________________________________
    > uml mailing list
    > uml@lists.ca.ibm.com
    > Unsubscribe:uml-leave@lists.ca.ibm.com<Unsubscribe%3Auml-leave@lists.ca.ibm.com>
    >
    >
    alt does not require an if. It can be used for a switch-case scenario as well. However, this is only part of the problem. It sounds like you need to show that you could click on any of the following buttons. Then, as a separate issue, what happens if you click on a particular button.

     
    I would diagram at a high level, which button clicks are available using a communication diagram. I would not go into detail on that diagram.
    I would then diagram separately, the sequence for each particular button click using either a sequence diagram or a communication diagram depending on which ever makes more sense to me under the current situation.

    Scott Fleming

     
    On Tue, Aug 19, 2008 at 10:35 PM, uml <disadmin@us.ibm.com> wrote:
    Dear Scott and ant thank you for your help. I know about alt but the problem is there is no if in my sequence these classes should be connected to the actor directly and I don't have any if in my actor! as I said before these are buttons on my form and the actor can click on any button which have their own functions so when I connect my actor to these classes for example "Main Form" an actor have two choice click on save which has the btnSave_Click() function and Cancel button which has the btnCancel_Click() and notice that and actor is directly connected to the "Main Form" class

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


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