Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: isam on July 27, 2006, 06:36:12 am

Title: Class generation from Sequence diagrams
Post by: isam on July 27, 2006, 06:36:12 am
Hello All,

I have some sequence diagrams and was wondering if EA can create Class diagrams in the Class model from these sequences.

Can someone help me.

Thanks,
Sam
Title: Re: Class generation from Sequence diagrams
Post by: thomaskilian on July 27, 2006, 10:55:09 am
No. Search the forum to get the answer.
Title: Re: Class generation from Sequence diagrams
Post by: isam on July 28, 2006, 06:59:51 am
should have looked at the messages. A lot of discussion on that topic.

anyways, finally figured it out.

thanks

Title: Re: Class generation from Sequence diagrams
Post by: TrtnJohn on July 28, 2006, 01:37:39 pm
Do you mean "Code Generation" ????  

Because, Class Generation is very commonly done using sequence diagrams:

Sequencing a flow between domain classes is a great way to generate the operations and attributes of a class.  I do it all the time.   Everytime you add a new message between two classes, just click the Operations button and add the message as a new operation on the new class.  If you diagram your entire Use Case in this manner you will generate the classes you need.
Title: Re: Class generation from Sequence diagrams
Post by: sr on August 03, 2006, 02:23:52 pm
Hi.  I click on Operations for the message and do not get any options to make this a method.  My class on the sequence diagram also does not get generated to my class model.  Please advise.  It appears  that you have already doen this before.  Any tips would be helpful.
Title: Re: Class generation from Sequence diagrams
Post by: thomaskilian on August 04, 2006, 04:01:28 am
Quote
Hi.  I click on Operations for the message and do not get any options to make this a method.  My class on the sequence diagram also does not get generated to my class model.  Please advise.  It appears  that you have already doen this before.  Any tips would be helpful.

The operations must be created ahead. Once they are in the class you can select them from the drop down. There's also an enhancement request to allow creation of operations out of messages.
Title: Re: Class generation from Sequence diagrams
Post by: Ronald on August 04, 2006, 05:29:43 am
Quote
The operations must be created ahead. Once they are in the class you can select them from the drop down. There's also an enhancement request to allow creation of operations out of messages.


Go to to the Suggestions and request Forum and support "Convert message to operation" if you think it is a usefull enhancement.

Title: Re: Class generation from Sequence diagrams
Post by: TrtnJohn on August 04, 2006, 11:53:53 am
Quote
The operations must be created ahead. Once they are in the class you can select them from the drop down. There's also an enhancement request to allow creation of operations out of messages.



???  I do this all the time using build version 792?

When I define my domain classes they are usually blank.  When it is time to create a sequence diagram I just drag instances of my domain classes to the diagram.  I then add operations as I fill in my sequence diagrams.  All I do when adding a message is press the operations button on the message dailog which displays the dialog for the class that allows you to create a new operation or use one that already exists. The class has to exist and you need to be sending a message to an instance of it and then there is no need to have any operations predefined.
Title: Re: Class generation from Sequence diagrams
Post by: sr on August 04, 2006, 12:28:04 pm
Thank you.