Book a Demo

Author Topic: Transformation Templates  (Read 4090 times)

gledson

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Transformation Templates
« on: August 25, 2005, 10:06:37 am »
Hi,  :)

I need make a custom transformation template to automatically generate a plataform specific model from a plataform independent model.

I'm looked in the user guide about "intermediary language", but I don't found any deep documention about it or any documentaion about properties of elements like Class, Package, Dependency, Parent ,etc.

I made a simple test based in the transformations templates of EA (EJB Session, Entity Session, etc) but I don't can continue it because I don't find more samples or documentation.

There are any other sample or documentation about transformation templates?


Thanks a lot!


Gledson Rabelo

« Last Edit: August 25, 2005, 10:22:01 am by gledson »

olafk

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Transformation Templates
« Reply #1 on: August 29, 2005, 05:11:16 pm »
Well, I suspect you might be out of luck re. extensive doco :(

However, I must say that by enabling writing of a log during transformations you should be able to deduce how and what needs to be done --- as the intermediate format is really quite straightforward.

Enable writing of such a ("debugging") log file at the bottom of the 'Model Transformation' dialog box (specify the log file and chose 'Write always'). Experiment with a transformation that is similar to what you'd like to do --- and inspect the log that is produced. (Remember, you can also selectively transform individual classes - giving  you a log file reduced to a manageable size.)

Now, looking at the actual transformation templates, the documentation I find quite reasonable in the help pages; for instance, the control macros, etc. are documented reasonably well.

(Of course, you won't get around quite a number of loops of trial and error until you get things just right...)

I had no great trouble writing a "Java Design Model" transformation --- where I transformed a (bare) domain model to a Java-centric design model enhancing / modifying (or whatever) things in the process. This Design Model transformation was strongly based on the Java transformation template (different from, and not to be confused with, the Java code generation template).

See also a number of other posts re. import / export of model transformations so that you can move the complete transformation templates from your play-pen to the model(s) where it is actually required.

Hope this helps.

gledson

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Transformation Templates
« Reply #2 on: August 30, 2005, 10:33:10 am »
Thanks by help.

I made transformation templates  to generate class diagram.
It's possible to generate sequence diagrams? Anybody know s how make it?


Thanks,


Gledson Rabelo

olafk

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Transformation Templates
« Reply #3 on: August 30, 2005, 04:38:28 pm »
Hmmm... not sure what you mean.

Conceptually, that is. You want to generate sequence diagrams? Like, from what? What is the input to your transformation --- and what would you expect to come out of it (i.e. the output of your transformation)?

You have to be a bit more specific...

gledson

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Transformation Templates
« Reply #4 on: August 31, 2005, 04:34:09 am »
I have generated the class diagram that model basic CRUD use cases with classes as DAO, Business Object, Business Delegate, etc. Each class have a interface well defined with crud methods as insert, delete, update, etc.

I want generate the sequence diagram using the classes generated early in the class diagram. Ex. create() method  of business send a message to create() method of DAO, and so ...

A important thing is the necessity to reuse classes generated early and not create new Sequence elements.

Other big doubt mine is how create a second Diagram when creating a Package.  

sample ....


Package
{
 name="Custom"
 namespaceroot="true"

// It's not work :(

 Diagram {                                
   name="Sample Sequence Diagram"
   type="Sequence"
}
}


Thanks,


Gledson


thomaskilian

  • Guest
Re: Transformation Templates
« Reply #5 on: August 31, 2005, 04:49:35 am »
I don't have very much experience with model transformation. But I think that generating diagrams via transformation is not (yet?) possible. I could think of a simple approach where elements are placed arbitrarily in a diagram and autolayout is called at last. Maybe you could suggest this as an improvement.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Transformation Templates
« Reply #6 on: August 31, 2005, 03:51:40 pm »
Thomas is right, you can't create diagrams in the templates yet.  Although if you could it would probably look very much like that.

Simon