Topic
  • 4 replies
  • Latest Post - ‏2006-06-24T02:28:20Z by Cheng,Ku-Tse
SystemAdmin
SystemAdmin
1130 Posts

Pinned topic Drawing Sequence Diagram

‏2006-06-19T11:38:16Z |
Hi,

Do we have to draw seperate sequence diagrams for success and failiur scenarios of a single use case.

Or can we model many scenarios in a single diagram using guard conditions.

Thanking You,
Chamal.
Updated on 2006-06-24T02:28:20Z at 2006-06-24T02:28:20Z by Cheng,Ku-Tse
  • ScottAmbler
    ScottAmbler
    92 Posts

    Re: Drawing Sequence Diagram

    ‏2006-06-20T20:23:33Z  
    > Hi,
    >
    > Do we have to draw seperate sequence diagrams for
    > success and failiur scenarios of a single use case.

    You should draw a sequence diagram, or any diagram for that matter, only if it adds value to your effort.

    Some people will do this level of modeling, but it's pretty heavy. Most people just draw diagrams for the complex stuff.

    Another option is to create a single activity diagram modeling the entire use case. I provide an example of exactly this at http://www.agilemodeling.com/artifacts/activityDiagram.htm#Figure3Swimareas

    >
    > Or can we model many scenarios in a single diagram
    > using guard conditions.

    You could, but the diagram might get pretty complex. Try it and see what happens.

    • Scott
    Practice Leader Agile Development, IBM Rational
  • SystemAdmin
    SystemAdmin
    1130 Posts

    RE:Drawing Sequence Diagram

    ‏2006-06-21T02:17:10Z  
    A few thoughts and ideas for you on this one.

    The simplest answer is do the one that is easiest. Usually the one that
    is easiest to create is easiest to read as well.

    If two flows are fairly complex, they would probably be hard to put on
    the same diagram. If a flow is just a message or two, then it would be
    silly to put it onto its own diagram.

    Also, take advantage of subflows. DON'T draw the whole sequence twice.

    My favorite approach is to draw a single sequence diagram for the main
    scenario, but to put subflows on the diagram and show that they are
    alternates of each other.

    In the future I plan to try using activity diagrams as well to separate
    control logic, but I haven't gotten the chance to experiment with that.

    If you are unfamiliar with what I mean by subflows on a sequence
    diagram, or on how to show to messages or subflows are alternates, then
    you may want to take IBM's Mastering Object Oriented Analysis and Design
    class.

    The one thing I don't do myself is just use guard conditions. They tend
    to be innadequate when there is more than a single message or when there
    is more than two alternates.

    --ant

    -----Original Message-----
    From: uml-bounces@lists.ca.ibm.com mailto:uml-bounces@lists.ca.ibm.com
    On Behalf Of chamsy
    Sent: Monday, June 19, 2006 4:38 AM
    To: uml@lists.ca.ibm.com
    Subject: uml Drawing Sequence Diagram
    Hi,

    Do we have to draw seperate sequence diagrams for success and failiur
    scenarios of a single use case.

    Or can we model many scenarios in a single diagram using guard
    conditions.

    Thanking You,
    Chamal.
    _______________________________________________
    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:Drawing Sequence Diagram

    ‏2006-06-21T20:22:50Z  
    In fact, I would expand on this by asking - Why are you drawing
    sequence diagrams? Or, what benefit are you expecting to gain?

    Examples:
    1) Is it to demonstrate the operation of your system in a
    presentation - then keep them simple, just show overviews of how
    it works and not all the alternatives?
    2) Is it to document the design for a developement team - then
    you may want to overview the success and failure scenarios, show
    how they relate, and pad the details out with expalnatory text?
    3) Are they to generate code - then you will want to include
    every fine detail in the diagrams?

    To answer your question though, I like sequence diagrams to be
    simple. They are great for demonstrating the interactions beween
    objects in a system (or even between systems). As someone else
    mentioned, when you have an alternative path draw it as another
    diagram and show it as an extension to the normal flow sequence
    diagram. There is no reason this sequence diagram fragment
    cannot be presented on the same page in order to demonstrate a
    single sequence diagram with alternate paths, but broken down
    into fragments.

    Hope this helps,

    Les.
    ________________________________________________
    Get your own "800" number
    Voicemail, fax, email, and a lot more
    http://www.ureach.com/reg/tag
    • On Tue, 20 Jun 2006, ScottAmbler (disadmin@us.ibm.com)
    wrote:

    > Hi,
    >
    > Do we have to draw seperate sequence diagrams for
    > success and failiur scenarios of a single use case.

    You should draw a sequence diagram, or any diagram for that
    matter, only if it adds value to your effort.
    _______________________________________________
    uml mailing list
    uml@lists.ca.ibm.com
    Unsubscribe:uml-leave@lists.ca.ibm.com
  • Cheng,Ku-Tse
    Cheng,Ku-Tse
    5 Posts

    Re: Drawing Sequence Diagram

    ‏2006-06-24T02:28:20Z  
    I think it should be yourself to answer this question. Try to find out the successful experience. you can ask yourself for second question, "In what condition can we model many scenarios in a single diagram using guard conditions? Can it be a pattern?". Working in a consistent way will help on the quality and software asset management.