Book a Demo

Author Topic: Impressions - State, Activity and Sequence Codegen  (Read 11073 times)

Nizam Mohamed

  • EA User
  • **
  • Posts: 193
  • Karma: +1/-0
    • View Profile
Re: Impressions - State, Activity and Sequence Cod
« Reply #15 on: February 06, 2009, 01:10:40 pm »
Quote
Hey Nizam

Does the EA Rev Eng recognise the 'Generated Source Pattern'... that would be very cool; we could hope that it make a good stab at recognising the other constructs ( Seq and Activity )

Kevin

I'm sorry if i sounded profound.
    The Code generation capability shall optimize the behavioral model and generate code from it. The code gen templates shall be tweaked to achieve a different result if desired.
     Reverse engineering the generated code will only impart its class model(Sequences and Activities of the original model will appear as operations in the imported class), but wouldn't recognize the underlying behavioral pattern.



bartvanb

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Impressions - State, Activity and Sequence Cod
« Reply #16 on: February 07, 2009, 02:04:30 am »
Hi all,

Could someone please explain (once more) how to generate code from an Activity diagram using EA 7.5 beta ?
I have created a class (Customer) with 1 attribute (CustomerName) and 1 operation (GetCustomer). I have created an activity diagram below the class with the actions/activities involved in the Class.operation "GetCustomer".
When I generate the code from the class I only get the class code (i.e Class Attributes and Methods), but the steps modelled in the activity diagram are not generated (I thought this would be added automatically to the class method "GetCustomer" ?
We have the corporate edition,I use the "ultimate" edition of EA 7.5, I followed the 3 steps explained in this forumtopic earlier, but still no code from the Activity diagram.
Somebody has an answer here ?
Many thanks, EA is a great product !

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: Impressions - State, Activity and Sequence Cod
« Reply #17 on: February 09, 2009, 07:56:27 am »
Hi'ya Nizam.... sorry, my flight of fancy getting the better of me there; but then EA 7.5 is a mind application for me at mo.

Would I be right in thinking that an 'addin' for transforming an operation body into a set of UML elements would be required as a first step towards acheiving such a recognition.

I see that Altovia UModel 2009, enables the automatic generation of a sequence diagram from any operation... I haven't seen this yet; just got an email from them highlighting this capablity.

Kevin  [smiley=2vrolijk_08.gif]

Nizam Mohamed

  • EA User
  • **
  • Posts: 193
  • Karma: +1/-0
    • View Profile
Re: Impressions - State, Activity and Sequence Cod
« Reply #18 on: February 09, 2009, 09:48:25 am »
Hi Kevin,
EA do generate sequence diagrams.., not only for a method , but also for debug sessions. Please refer to "Generate Sequence Diagrams" section in EA's help.

softwaredeveloper

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Impressions - State, Activity and Sequence Cod
« Reply #19 on: March 06, 2009, 05:49:54 am »
Is there a chance to see not only the debugged branch but all possible?

E.g. for

if ( a == 1)
    DoWork1();
else
    DoWorks2();

I would like to see a combined fragmend showing both possibilities (recursively)

TIA!

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: Impressions - State, Activity and Sequence Cod
« Reply #20 on: March 06, 2009, 03:38:04 pm »
Hi'ya. . .

From what I have gathered EA is constructing Sequence Diagrams from executing code by using some fancy debug following... as a result only calls that are made are drawn... write your test script right and you might be able to see all the paths (not sure if you can copy and paste fragments if so one route.)        

what you really want I think, you'll have to wait for Visual Studio 2010... it constructs an SD from source (point to a method (Select a block of code) and click Gen SD). Altovia UModeL was claiming the same ability.

I'm not actually convinced that a SD is the most appropriate diagram tho, an activity diagram shows a pathway much better than a set of embedded choice\ ALT fragments.  These "all pathways SD's" look and feel like source

Perhaps I should spend the summer writing up a Source Parser for operation bodies after all. ;D
kevin [smiley=2vrolijk_08.gif] [smiley=bath.gif]