Forward Engineering: Sequence Diagrams

General discussions about code engineering

Moderator: Moderators

Forward Engineering: Sequence Diagrams

Postby NitzerEbb » Thu Aug 12, 2010 10:20 am

Hello,

im currently evaluating uml tools for my bachelor thesis and trying to choose one of them for a model driven development software project. now my problem is that i have a class and a method within. i want to generate a sequence diagram for this method e.g. i want to add combined fragments. while doing the code engineering to java, the elements of the class are all well done but the engineering is disregarding my sequence diagram except for creating totally new methods. so afterwards i have written the source code manually in my method and reengineered it to a sequence diagram, hoping i can work and understand from this point on. the reengineering worked well and is also understanding combined fragments but unfortunately everything i try to alter in combined fragments within the sequence diagram is without any effect doing another forward engineering. the version im using is magic draw 16.8. is there something im missing or is it not possible to generate combined fragments in a sequence diagram and then generate java code?

example:
private void myMethod (int position)
{
if(this.a == 0)
System.Console.WriteLine("A=0");
else
System.Console.WriteLine("A<>0");
}

thats just a code example i want to generate within UML through a sequence diagram and then it should generate this code example.
NitzerEbb
Forum Newbie
Forum Newbie
 
Posts: 2
Posts Rating:0
Joined: Thu Aug 12, 2010 10:11 am

Re: Forward Engineering: Sequence Diagrams

Postby ruslanasv » Fri Aug 13, 2010 12:53 am

Hello,
MagicDraw supports generating Sequence diagram from Java code only. It does not generate code back from Sequence diagrams.
FYI: In a real projects, Sequence diagrams are rarely used for modeling method implementation code with details (average method implementation code is much complex than just one If else structure). Usually Sequence diagrams are used for representing interaction on higher level for system architecture design purpose.
Best Regards,
Ruslanas Vitiutinas
User avatar
ruslanasv
Customer Support
Customer Support
 
Posts: 39
Posts Rating:1
Joined: Fri Jan 08, 2010 1:26 am
Full name: Ruslanas Vitiutinas

Re: Forward Engineering: Sequence Diagrams

Postby NitzerEbb » Fri Aug 13, 2010 5:06 am

Thx for the quick answer. You are probably right about the efficiency of trying to use sequence diagrams in order to model complex method structures but thats one target of the bachelor thesis to strech out the maximum of a tool on the modelling level and then to evaluate this approach.
NitzerEbb
Forum Newbie
Forum Newbie
 
Posts: 2
Posts Rating:0
Joined: Thu Aug 12, 2010 10:11 am


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests

cron