Book a Demo

Author Topic: How do you format a message in sequence diagrams UML conform  (Read 3196 times)

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
How do you format a message in sequence diagrams UML conform
« on: February 21, 2020, 03:34:52 am »
In version 2.5 of the UML standard, on page 577 they show examples of how return messages are formatted. I understand portions of the syntax but I also don't understand how to get this in EA. The example I am trying to achieve is:

v=mymsg(w=myout:16):96

Now, on a sequence diagram I know I can do the following:
  • Draw a message from one lifeline to the other lifeline, and mark "Is Return".
  • Instead of selecting the message from the Message combobox, simply type the name of the message "mymsg"
  • In the Return Value field, enter 96
  • In Assign To field, type in v
I do not know how to achieve w=myout:16. Before I solve this however, tell me if this is correct:

I have a class Engine, with two private attributes of type int. They are w and v.

so when I call the operation mymsg above I am assigning the Engine Class attributes v the return value of mymsg (which is 96) and w is assigned the value of the parameter myout (which was 16).

If that is so, I still don't know how to get the parameter assignment in EA to show. The return value of the operation works fine, it's the parameter that I am worried about.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How do you format a message in sequence diagrams UML conform
« Reply #1 on: February 21, 2020, 07:43:42 am »
Basicall you can simply type that whole string in the message field of the return message and it will appear as typed. You could type in any rubbish as well.

q.

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
Re: How do you format a message in sequence diagrams UML conform
« Reply #2 on: February 21, 2020, 05:43:05 pm »
That is true, but I wanted to avoid that and get the message syntax in a proper way in EA. Another reason is while I can do that for the message, another user might use the "Assign to", and yet another one might type something in the arguments, something in the message, and something in the assign to field. This will lead to inconsistencies in data entry. Using the EA dialog I have achieved most of the message syntax using the fields, it's the parameters that I have trouble with. I guess there I will have to simply type in for example:

myout:16

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How do you format a message in sequence diagrams UML conform
« Reply #3 on: February 21, 2020, 07:24:51 pm »
Since EA isn't checking this field you can only only get a bit on the safe side if you run a script regularly that checks messages according to whatever rules you might set up.

q.