Return value of call messages

In collaboration and sequence diagrams, I can’t get the return value and operation parameters to appear with a call message. Is there a way to display them ,other than choosing another message type (send for example) and writing them by hand in the message name ?

Albert

Dear Albert,

In order to display the operation signature, you need to assign an operation to the call message. To do this, change the message type to “Call”, then right-click on it and select “Select Operation”. You may find that this menu item is disabled, this is because the “to” end LifeLine has not been assigned a base classifier to it. To assign a base classifier to the LifeLine, right-click on it and select “Select Class”.

Regards,

Antony.

In fact, this is what I had already done. And I obtained the display of the operation signature but I could not instanciate the parameters and name the variable that will store the return value.
i.e. :
I got : max(i : int, j : int) : int
I wish to have : the_max = max (52, 12)

What am I doing wrong ?

Dear Albert,

Sorry for misunderstanding your question. The feature you mentioned is currently not supported in VP-UML, but I do think it is a useful feature and I have forwarded your request to our development team. Thank you for your suggestion.

Regards,

Antony.

I want to do the same thing as Albert.
I’m using v5.3 build sp3_20061111.

Is it possible today ? (I don’t reach to do it).

Regards,

Jeremy

Hi Jeremy,

Please right-click on the diagram and select Presentation Options > Show Message Operation Signature from the popup menu.

This should be what you are looking for.

Best regards,
Jick

Hi Jick, thanks.

…but I already did that.

I wanted

var := operation(param)

(var is a String variable)

instead of

operation(param): String

So I’m looking for getting the return value into a variable…

Regards,
Jeremy

Hi Jeremy,

Thank you for your reply. I am going to discuss your suggestion with our engineers.

Best regards,
Jick

Hi Jeremy,

What you requested is supported. Please download the patch at:
http://files3.visual-paradigm.com/200611/Patch/5-3-3_sp3_20061117e/vpplatform.jar

To install the patch:

  1. Shutdown VP-UML (or any running product) if it is running
  2. Replace $vp-suite-install-dir/lib/vpplatform.jar with the downloaded one
  3. Restart VP-UML

To show the message in the way you required:

  1. Adjust presentation options
    i) Right-click on the Sequence Diagram and select Presentation Options | Show Message Operation Signature
    ii) Right-click on the Sequence Diagram and deselect Presentation Options | Show Parameter Names in Message Operation Signatures

  2. Entering the detail
    i) Set a message to use Call message with an operation with params
    ii) Open the call action specification and enter the args (Enter N args for N params)
    iii) Enter the return value in the message specification

Hope this helps. I will post again when a complete release is ready. Please feel free to let me know if there are any comments about this change.

Best regards,
Jick

Thank you very much Jick, this feature is very useful for my university and me!

But… I’m not yet completely satisfied. :shock:

I get

var = operation(param): String

instead of

var = operation(param)

The return type is useless in this case, there’s no sense to show it if we show the return variable.

Please, could you discuss this with your engineers?

PS: very nice reactivity, congratulations!

Hi BigMadWolf,

Thanks for your feedback. I have passed your comment on to our engineers. I will let you know about their reply.

Best regards,
Jick

Hi BigMadWolf,

Another patch has been released to fix the problem of showing return type. Please download at:
http://files4.visual-paradigm.com/200611/Patch/5-3-3_sp3_20061117g/vpplatform.jar

Please follow the steps I posted before to apply this patch.

Best regards,
Jick

Thanks Jick, it works like a charm now. :wink:
Nice job VP!

Best regards,
Jeremy

Hi Jeremy,

You are welcome. Just feel free to contact us again if there are any suggestion.

Best regards,
Jick

Hi BigMadWolf,

Just to let you know that a new version is released (a week ago). Since you were asked to install a patch, I suggest you use the latest complete release, which can be downloaded at:
http://www.visual-paradigm.com/download/download.jsp?product=vpsuite

Have a nice weekend! :smiley:

Best regards,
Jick