Book a Demo

Author Topic: updating class diagram after sequence diagram  (Read 3877 times)

bouche

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
updating class diagram after sequence diagram
« on: September 05, 2008, 12:58:48 am »
I've created a sequence diagram after finishing a class diagram.  I was under the impression that as I create messages between objects in a sequence diagram, that methods would be created and EA would update my class diagram.

Isn't this possible?  I thought I did this in a UML course that I took.

thanks.

Nizam Mohamed

  • EA User
  • **
  • Posts: 193
  • Karma: +1/-0
    • View Profile
Re: updating class diagram after sequence diagram
« Reply #1 on: September 08, 2008, 03:11:15 pm »
EA do creates operations and update the class diagram corresponding to your new messages in sequence diagram, provided you use the "Operations" button in Message's properties dialog to define it ( use existing operation / add new operation).

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: updating class diagram after sequence diagram
« Reply #2 on: September 09, 2008, 02:13:20 pm »
Nizam is effectively correct, but it isn't quite as straightforward as that. When you create a message on a Sequence diagram, if the target Class has operations you can list them by clicking on the drop-down arrow in the Message field of the Message Properties dialog. If you select one of these operations, the message takes the operation name and properties.

If the Class has operations but none of them are appropriate, you can click on the Operations button in the Message Properties dialog, which displays the Operations dialog. You can then add an operation to the Class, which reflects back to the message as above.

If the class has no operations, you close the Message Properties dialog, open the Class properties dialog and add the required operation, then go back and select the operation in the Message Properties dialog.

If you define a message without reference to the Class operations, it does not add to the Class properties.

It might appear that you are creating operations in a Sequence diagram that are automatically added to the Class diagram, but what you are actually doing is dropping into the original Class and creating the operations there.

Something along these lines is in the Help, but I have updated it to make it a bit clearer.
Best Regards, Roy