Book a Demo

Author Topic: Sequence Diagram - callback messages  (Read 7051 times)

mselis

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Sequence Diagram - callback messages
« on: July 29, 2005, 07:34:17 am »
Hello,

I am creating a sequence diagram and I have the following situation:
  • ClassA calls Method1 of ClassB, that calls Method2 from ClassA that calls Method3 from ClassC
  • ClassA calls Method4 of ClassC
What I would like to see in the sequence diagram is that the call from ClassB to Method2 in ClassA creates a new activation block, but this is not the case.

This causes some confusion, because now it looks like the call from ClassA to Method3 of ClassC occurs after Method2, instead of inside it...

Extending the source activation of the Method2 call just makes things worse, because then Method4 seems to be called when Method1 is still running... >:(

Any ideas how to solve this?
Thanks.
Marc
« Last Edit: July 29, 2005, 07:36:25 am by mselis »

TrtnJohn

  • EA User
  • **
  • Posts: 176
  • Karma: +0/-0
    • View Profile
Re: Sequence Diagram - callback messages
« Reply #1 on: July 29, 2005, 10:00:15 am »
If the callback from Class B to A occurs because of the original message from Class A to B then why would you want to end the original activation in Class A?  The original message from class A is still active because it has not yet completed.   It won't complete until all the calls return.  (i.e. when method 4 of Class C returns)

Regardless, you can right-click on the first  message from Class A to Class B and select "End Source Activation" to get what you want.

mselis

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Sequence Diagram - callback messages
« Reply #2 on: July 31, 2005, 11:13:58 pm »
Thanks for the replay...
but I'm sorry, I think I didn't express myself clearly...

I don't want the original activation in ClassA to end, I just want to see the callback from ClassB to ClassA as an extra activation block beside it (like a self-message).

I added some ASCII art show what I would like to see:

ClassA      ClassB     ClassC
X---------->
X
XX<--------
XX
XX--------------------->
XX
X
X----------------------->

This shows clearly that the first call from A to C occurs because of the call from B to A, whereas the second one is not.

Now I just get this, which is not clear enough in my opinion:

ClassA      ClassB     ClassC
X---------->
X
X<---------
X
X---------------------->
X
X
X---------------------->


I hope this makes things more clearly....

Marc

matthias

  • Guest
Re: Sequence Diagram - callback messages
« Reply #3 on: August 02, 2005, 04:08:19 am »

Hi Marc,

I found the same result like you.

I would say: some parts of EA are still "under construction".

Matthias

jeffclark

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Sequence Diagram - callback messages
« Reply #4 on: August 02, 2005, 07:15:15 am »
There's a Diagram Gate which will allow you to drop it down on the inside of Class A. Class B makes a call to this. However, it doesn't seem to be able to expand correctly. Even when you resize it, it goes back to being a box.

You can call from it to Class C, but the end point seems to float in the air instead of extending the Diagram Gate down.
JPClark, INC.

mbc

  • EA User
  • **
  • Posts: 237
  • Karma: +1/-0
  • Embedded software developer
    • View Profile
Re: Sequence Diagram - callback messages
« Reply #5 on: August 02, 2005, 07:15:30 am »
For your information, I have requested this from Sparx Systems in February 2004:

My request:
Quote
One is that when Object1 calls a function in Object2, which in turn calls a function of Object 1, I think there should be a rectangle on top of the original invocation rectangle, like there is for self-messages.


Their reply:
Quote
Unfortunately, we don't currently have the functionality to support your first request -- reflecting a new method invocation from an external call to the target lifeline.  This is something that should and will be implemented.  Thank you for the note.


As far as I know, it is still not implemented.

Best regards,
Mikkel

ufechner

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Sequence Diagram - callback messages
« Reply #6 on: August 02, 2005, 09:30:28 am »
Hello,

just want to say, that I am missing this functionality, too.

Regards:

Uwe Fechner