Book a Demo

Author Topic: Sequence Diagram  (Read 5703 times)

ceeper

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Sequence Diagram
« on: February 19, 2007, 01:07:29 am »
I am using a sequence diagram to model a complex use case. The diagram consists of 5 different life-lines representing the different entities. This diagram is an overview of the whole use case.

Now, I want to create some more sequence diagram, showing subsets of the complex diagram. For example, I take 2 of the 5 Life-lines into the new diagram. I want to display the interaction between this entities. The sequence diagram shall be based on the main diagram, that means changes to the "master" diagram shall be visible to my client diagramm. All interaction on the master diagram (between the 2 entities) shall be visible to my new diagram.

I tries to link the instances into the new diagram, but no interaction is shown. Of course, i may add the interactions by mayself, but that's stupid work. The interaction are the same.
Is there any way to share the message-flow over several diagrams?


sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Sequence Diagram
« Reply #1 on: February 20, 2007, 04:20:21 am »
I don't have a real answer to your question but I must ask - why do you have a sequence diagram that is so complex that it needs breaking down into subsets?  In fact why do you have a sequence diagram that that attempts to describe the entire behavioural nature of a system (solution) for a particular use case?

On my planet there are several, or ocassionally many, design steps, decisions and models betwixt a use case and a sequence diagram.  

You could try copying the diagram, and deleting the info flows that are irrelevant to each scenario you are exploring. But somehow I dont think that is your answer. Did you inherit or design this beast?

bruce

"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

sl@sh

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Re: Sequence Diagram
« Reply #2 on: February 20, 2007, 08:03:52 am »
I agree with bruce on both accounts:

1. keep it simple - if you want an overview diagram, the sequence diagram is the wrong choice.

2. if all else fails, copy the diagram!  ;) (this method works in many other tools as well, btw.) Be warned, however: the messages will not be linked, just copied. So when you change one diagram this won't be reflected in the other! But see #1 above...

ceeper

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Sequence Diagram
« Reply #3 on: February 20, 2007, 11:03:59 pm »
I think you misunderstood me me. The previews design steps are done, use case diagrams are written.
To undersand the workflow, you must see the context of all involved parties. Let me explain a simple
example:

A and B are systems communicating a complex protocol. The sequence diagram shows both parties with
a lot of message flows. Now a new entity C is defined to proxy all operation as man-in-the-middle.
As result A interacts with C and C interacts with B.
My job as project leader is to coordiante the communication from A,B and C.
Any system of A,B and C is implemented by a different company. Company A is advised to contact
company C and to write functional specification. Also B is advised to specify the access to company C.
In fact there is no direct communication between A and B.

My requirements are:
* model message flow from A. B and C
* model message flow from A to C
* model message flow from C to B

My complete message flow holds any required information. For me it would be the simplest way the generate
the diagram A-C and C-B automatically. I know, copy and paste is possible, but this is a oneway. Once generated, i have to synchronize all diagrams by myself.

For example class diagram use the linking feature. Noone would become the idea to copy classes from diagram to diagram and synchronize them manually. The sequence diagram - in my opionion - uses the same mechanisms. The lifeline is _linked_ to the new diagram. So i expect the _same_ instance of the diagram.
Question: why does EA link the lifeline? Currently it acts as copy. Two diagrams link the same lifeline and changes from diagram a are not visible to diagram b.


KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Sequence Diagram
« Reply #4 on: February 21, 2007, 04:27:15 pm »
Quote
For example class diagram use the linking feature. Noone would become the idea to copy classes from diagram to diagram and synchronize them manually. The sequence diagram - in my opionion - uses the same mechanisms.

The difference is that class diagrams are structural, and any links attached to a class element are part of the definition of the class, and that is true whichever diagram the class appears on, and even if the class doesn't appear on a diagram.

Sequence diagrams are behavioural, showing an interaction between objects at some point in time. Messages attached to a lifeline aren't part of the definition of that object but are part of the definition of the diagram. They don't make sense on any other diagram.

What you want to do is break EA's one to one mapping of interaction to view, showing different views of the same interaction with different combinations of lifelines hidden and shown. EA can't do that I'm afraid.
« Last Edit: February 21, 2007, 04:28:39 pm by KP »
The Sparx Team
[email protected]

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Sequence Diagram
« Reply #5 on: February 21, 2007, 08:14:46 pm »
If A.B and C are not all in possession of the overall gestalt of the the system how the heck are they going to deliver a working system???

Since you say that the overall communication protocol is complex how is C expected to match the proxy components behaviour to the partial specification provided by B???

Surely specific behaviours of B are dependent on the state and  information flow provided by A, even if there is a proxy in the middle.  In fact, if the proxy is truly that then to A, C behaviourally looks just like B.  Similarly, to B the C component looks behaviourally just like A.

Somewhat bewildered...
bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

ceeper

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Sequence Diagram
« Reply #6 on: February 21, 2007, 10:18:03 pm »
Quote

What you want to do is break EA's one to one mapping of interaction to view, showing different views of the same interaction with different combinations of lifelines hidden and shown. EA can't do that I'm afraid.


I understand. It was confusing to me, that lifelines may be linked to different diagrams. But if EA stores interactions not into the lifeline but into the diagram, i can follow your explanation.

Just to understand the EA concepts: In which case would it be useful to link lifelines over several diagrams?

Thx for explanation!

ceeper

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Sequence Diagram
« Reply #7 on: February 21, 2007, 10:35:03 pm »
Quote
Surely specific behaviours of B are dependent on the state and  information flow provided by A, even if there is a proxy in the middle.  In fact, if the proxy is truly that then to A, C behaviourally looks just like B.  Similarly, to B the C component looks behaviourally just like A.

Somewhat bewildered...
bruce


This was only a simple example to explain may targets. Think of splitting A into A1 and A2.
I think we have a different view of the problem. Both we are starting the puzzle by painting the picture. Then we go different ways: i cut the puzzle into pieces and you create an empty pieces and copy a fragment of the big picture to it.

I understand may view is not supported by EA, so i will use your view of the problem. :o)

Thx for your interest in helping me!



sl@sh

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Re: Sequence Diagram
« Reply #8 on: February 22, 2007, 05:36:58 am »
I do understand your modelling problem. I still think that drawing a sequence diagram to model an overview of all the interaction is the wrong approach, especially if you already realized it is too complex.

You say the use cases are already defined. But that doesn't keep you from modeling some more refined stages, or does it?

Consider this example:
Code: [Select]
    ___   ___   ___
  ¦   ¦ ¦   ¦ ¦   ¦
  ¦ A ¦ ¦ B ¦ ¦ C ¦
  ¦___¦ ¦___¦ ¦___¦
 1  ¦     ¦     ¦
o--->¦     ¦     ¦
    ¦  2  ¦     ¦
    ¦---->¦     ¦
    ¦     ¦  3  ¦
    ¦     ¦---->¦
    ¦     ¦  4  ¦
    ¦     ¦<----¦
    ¦  5  ¦     ¦
    ¦<----¦     ¦
    ¦     ¦     ¦

What you want is sth like this instead:
Code: [Select]
    ___   ___  
  ¦   ¦ ¦   ¦
  ¦ A ¦ ¦ B ¦
  ¦___¦ ¦___¦
 1  ¦     ¦  
o--->¦     ¦  
    ¦  2  ¦  
    ¦---->¦  
    ¦  5  ¦  
    ¦<----¦  
    ¦     ¦  
and
Code: [Select]
    ___   ___
  ¦   ¦ ¦   ¦
  ¦ B ¦ ¦ C ¦
  ¦___¦ ¦___¦
 2  ¦     ¦
o--->¦     ¦
    ¦  3  ¦
    ¦---->¦
    ¦  4  ¦
    ¦<----¦
    ¦     ¦


My suggestion would be to subdivide Usecases to the level of the latter sequence diagrams and not draw the former sequence diagram at all.

ceeper

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Sequence Diagram
« Reply #9 on: February 22, 2007, 06:40:27 am »
Nice drawing, that's exactly my problem!

You suggestion to divide the diagram, caused a lot of problems.  Note, our simple example here used 3 lifelines, the original use case requires at least 5-7 lifelines.
Before i started my former diagram, we had several sub-diagrams. Any party painted the diagram from their view. When looking on the single diagram, everything seems to be good. But the diagrams in conjunction won't work. So we decided to create the former diagram to detect the problems.
After the problems were solved, the _old_ sub-diagrams had to be updated. May idea was to link the diagram's from here ... the rest is explained in this thread ;D

Thanks for you help! :)