Book a Demo

Author Topic: 2 styles for showing returned values  (Read 4556 times)

mylesr

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
  • Howdy!!
    • View Profile
2 styles for showing returned values
« on: March 24, 2005, 09:49:46 am »
In sequence diagrams, I have seen 2 styles of showing returned values.

1)  Show the returned value as "val := message" on the outgoing message line, which is the default in EA.

2)  Show the returned value on a separate, dotted return message line, which I would prefer.

Is there a way to have EA automatically use the 2nd style?  I can fake it by creating the return message separately, but for it to look right, I have to leave the returned value blank on the outgoing message which isn't right.  (Especially if I'm using the "Operations" button to use a previously defined method.)  Faking it like this will also be likely, I suspect, to cause problems in automatically updating the class diagram when messages are added to a sequence diagram (which should be an optional feature in EA in my opinion).  



thomaskilian

  • Guest
Re: 2 styles for showing returned values
« Reply #1 on: March 29, 2005, 01:24:32 am »
Always too lazy to read the UML spec, but my stomach tells me that the first is for a synchronous delivery of a return value and the dotted line for an unsynchronous. So there is no option to use the 2nd variant as default because you explicitely have to tell where and when the message is sent back.

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: 2 styles for showing returned values
« Reply #2 on: March 29, 2005, 03:18:52 pm »
Quote
and the dotted line for an unsynchronous.

I like it :D

I've wondered for some time what's the possible rationale for "Is Return" (and explicit return messages).

Mylesr, I appreciate your desire to use explicit returns.  However, I have found them to be more confusing and more difficult to manage later in the design than the implicit return.  As you point out , if you are using operations from the object's classifier as messages, then any return value automatically shows up as the val:=message(parms...) notation.
IMO, if your design has developed to the point of using actual operations then explicit returns are not necessary.  
Adding further downstream (or lower level) objects to the diagram and including their behaviour means that you will have a lot of work to manage the positioning of explicit returns.

hth
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.

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: 2 styles for showing returned values
« Reply #3 on: March 29, 2005, 11:36:04 pm »
Except - if there are any intervening calls to objects "further to the right" between call and return, that you wish to model.

mylesr

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
  • Howdy!!
    • View Profile
Re: 2 styles for showing returned values
« Reply #4 on: March 30, 2005, 07:53:26 am »
Okay.  I'll use implicit returns when applicable.  Thank you to everybody for the feedback.