Author Topic: Team- Need clarification in generating java code from Activity diagram  (Read 3869 times)

harini

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Team- I am new to EA and exploring few concepts for my understanding, Need help in generating java code from Activity diagram. I have gone through the topic mentioned in EA Tutorial, but unable to follow. Can you share any material/Example which explains step by step procedure.

qwerty

  • EA Guru
  • *****
  • Posts: 9675
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
I'm not much in code generation. But AFAIK you can basically only generate class stubs and with some advanced edition also state machines. But what would you expect to be generated from an activity diagram? A diagram will never be any source of a code generator (if the coder is wise).

q.

harini

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
I have workflow and I represented those in activity diagram with condition loops can it not generate code( Just a skeleton structure)!?? for instance: forward engineering concept how Rational Rose does.. I am just analyzing EA can be used in place of rational rose.

qwerty

  • EA Guru
  • *****
  • Posts: 9675
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
Well, I used RR some 15 years ago. Their add-in model is better than EA's. But there's really nothing else which would make me go back (not just because of the ridiculous price of RR).

You could well make some advanced code gen either using the (crude) EA scripting language for the code gen or by using the (unique) API. I'd prefer the latter.

q.

harini

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
True...EA scripting language helps in generating code from activity diagram? as of now I am not getting option to generate the code for activity diagram, currently in EA 12 I am able to get the option to generate the code (just the skeleton structure of the class) from a class diagrams.

qwerty

  • EA Guru
  • *****
  • Posts: 9675
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
You can do that. But it's tedious and from my POV doubtful. A diagram is a means of communicating with humans, not to provide information to a code generator. You might use the model to produce something from activities. Again, I would suspect more hindrances than helps. This is a task which should be solved by humans. What is it that you are trying to generate?

q.

harini

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Similar to this I expect link :http://www.sparxsystems.com/enterprise_architect_user_guide/8.0/software_development/code_generation___activity_dia.html

qwerty

  • EA Guru
  • *****
  • Posts: 9675
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
I'd take this with a (large) grain of salt. See my comments above. Else you will probably need some advanced EA license to use this feature. There is a page somewhere on Sparx' site which listst the features of the different editions.

q.

harini

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Agreed. http://www.sparxsystems.com/products/ea/compare-editions.html- Executable Code Generation from Behavioral Models==> this is the url I refer for edition, right now I am trying with EA Trial there selected software engineering still I didn't get.. I just need to analyze more to have better understanding.

qwerty

  • EA Guru
  • *****
  • Posts: 9675
  • Karma: +176/-150
  • I'm no guru at all
    • View Profile
You should then contact sales support via mail. They are quite responsive when it comes to things like that.

q.