Topic
  • 5 replies
  • Latest Post - ‏2005-11-18T04:31:05Z by SystemAdmin
Liam
Liam
10 Posts

Pinned topic Sequence Diagram - Loop/Iteration

‏2005-11-09T09:58:14Z |
I am using Rose 2003.06.14.

I want to be able to show that I am looping over a number of messages in a sequence diagram.

The code I am trying to represent is as shown below:-

code
for (;;)
{
blocking_call();
read_message();
add_message_to_buffer();
}
[/code]

I understand that you can use a prefix of * to represent a loop. However how do you represent loopeng ove a number of method calls?

Thanks
Liam
Updated on 2005-11-18T04:31:05Z at 2005-11-18T04:31:05Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    3659 Posts

    Re:Sequence Diagram - Loop/Iteration

    ‏2005-11-09T17:01:49Z  
    Liam wrote:
    > how do you represent loopeng ove a number of method calls?

    You don't. My copy of Rose is a bit older, but this weakness has been
    known for a long time, and it probably continues.

    By a remarkable coincidence, I am nearing completion of a book on the
    UML (is anyone a good friend of a publisher?) that handles this topic,
    and here's what it says:

    "Conditional execution and iteration of a group of messages is not
    supported at all by Rose. Here again, putting these things in a
    sequence diagram usually indicates that the diagram is showing more
    detail than best practices would allow. When conditional execution or
    iteration of a group of messages is absolutely necessary, the best way
    in Rose is to insert a note describing the iteration and use the note
    anchor to tie each message in the group back to the note."

    I've got a mental block right now, so I don't remember the technique in
    Rose, but I think you can make the note move physically up or down in
    the diagram when an anchored message is moved. Obviously, I don't use
    this much. Maybe someone else on the list can remember.

    You have given a code fragment to show what you want to model in your
    sequence diagram, and that suggests that you are modelling too much
    detail. You actually need an information-hiding strategy for putting
    the diagram together, because modelling in this kind of detail leads to
    sequence diagrams that are too wide and graphically unreadable -- which
    kinda defeats the purpose of a visualization tool.

    -Eric
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe rose
    ============================================================>
  • SystemAdmin
    SystemAdmin
    3659 Posts

    Re: Re:Sequence Diagram - Loop/Iteration

    ‏2005-11-15T18:29:14Z  
    Liam wrote:
    > how do you represent loopeng ove a number of method calls?

    You don't. My copy of Rose is a bit older, but this weakness has been
    known for a long time, and it probably continues.

    By a remarkable coincidence, I am nearing completion of a book on the
    UML (is anyone a good friend of a publisher?) that handles this topic,
    and here's what it says:

    "Conditional execution and iteration of a group of messages is not
    supported at all by Rose. Here again, putting these things in a
    sequence diagram usually indicates that the diagram is showing more
    detail than best practices would allow. When conditional execution or
    iteration of a group of messages is absolutely necessary, the best way
    in Rose is to insert a note describing the iteration and use the note
    anchor to tie each message in the group back to the note."

    I've got a mental block right now, so I don't remember the technique in
    Rose, but I think you can make the note move physically up or down in
    the diagram when an anchored message is moved. Obviously, I don't use
    this much. Maybe someone else on the list can remember.

    You have given a code fragment to show what you want to model in your
    sequence diagram, and that suggests that you are modelling too much
    detail. You actually need an information-hiding strategy for putting
    the diagram together, because modelling in this kind of detail leads to
    sequence diagrams that are too wide and graphically unreadable -- which
    kinda defeats the purpose of a visualization tool.

    -Eric
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe rose
    ============================================================>
    There's actually another way to do this... Define a "dummy" operation in the same class that calls all three operations. You can then make a call to that operation with the "*iteration constratin" notation.

    Note that this was a problem with UML 1.x in general. UML 2.0 has introduced formal constructs to handle this problem. But then, Rose does not support UML 2.0 (that's in Rational Software Modeler/Architect).
  • Liam
    Liam
    10 Posts

    Re: Re:Sequence Diagram - Loop/Iteration

    ‏2005-11-16T16:24:31Z  
    There's actually another way to do this... Define a "dummy" operation in the same class that calls all three operations. You can then make a call to that operation with the "*iteration constratin" notation.

    Note that this was a problem with UML 1.x in general. UML 2.0 has introduced formal constructs to handle this problem. But then, Rose does not support UML 2.0 (that's in Rational Software Modeler/Architect).
    Do you know if there is any plans for Rose to support UML 2.0?

    Thanks
  • SystemAdmin
    SystemAdmin
    3659 Posts

    Re: Re:Sequence Diagram - Loop/Iteration

    ‏2005-11-16T16:31:03Z  
    • Liam
    • ‏2005-11-16T16:24:31Z
    Do you know if there is any plans for Rose to support UML 2.0?

    Thanks
    Yes, I do know.
    There are no plans to upgrade Rose to UML 2.0
    IBM/Rational has RSM (Rational Software Modeler) that
    fully supports UML 2.0

    Eric Aker
    > Do you know if there is any plans for Rose to support
    > UML 2.0?
    >
    > Thanks
  • SystemAdmin
    SystemAdmin
    3659 Posts

    Re: Sequence Diagram - Loop/Iteration

    ‏2005-11-18T04:31:05Z  
    Hi Liam,

    I attended the Rational Software Development conference in India during september 2005.
    There they have some info about the UML 2.0 and its advanced features.
    The features like, loops and conditional statements are present in uml2.0 and there are also additional features in other diagrams too.
    So in your current version it is not possible to have these features in the diagrams.
    So should have RSx to do so...
    You can get the UML 2.0 Specification from the OMG Site..

    Regards,
    satish.r