Book a Demo

Author Topic: Generics in MDA transformation  (Read 3740 times)

Richard Ciglanský

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Generics in MDA transformation
« on: November 21, 2014, 01:07:24 am »
I am having a problem to propagate Class/Properties/Templates/Template Parameter(s) and Bindindg(s) through MDA transformation from PIM into PSM. I cann't see how to access those Template Parameters and Bindings from withing a MDA tranformation template. Interesting enough is fact, that I have 2 projects : a test one and a real one, I have changed templates in the real project and I am able to propagate Template Parameters from PIM into PSM, but not Bindings, in test project I am using the default set of templates and it does not seem to copy even Template Parameters. Can somebody direct me, what to check, which templates or what macros to use to access these Templates-related properties of Classes and Connectots ? Thanks.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Generics in MDA transformation
« Reply #1 on: November 21, 2014, 02:00:23 am »
I dropped using that proprietary scripting source for transformations a long time ago. Instead I used scripting to programmatically transform whatever is needed. Of course you have a longer startup this way. But you likely don't end in a cul-de-sac this way.

q.

Richard Ciglanský

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Generics in MDA transformation
« Reply #2 on: November 21, 2014, 11:55:25 pm »
Thanks, I was thinking about using this "Automation and Scripting" for that purpose either way, however I tried the simplest approach at first and it seems, that the built-in template framework is really pretty bad, does not support me from the start and even more it is basically not documented.

Richard Ciglanský

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Generics in MDA transformation
« Reply #3 on: November 25, 2014, 01:14:59 am »
Hello Nabil,

sorry, your advice did not help at all.
I am pretty aware, how to create new templates, even "stereotyped" once. This is not the problem.
The problem is, how to access values, which are accessbile from the EA application through :
1.) select any class in Project Browser or in any diagram
2.) invoke pop-up menu
3.) Select Properties/Templates/Template Parameter(s) and Bindindg(s)
I would expect, that some classTemplateParameter or some classTemplateBinding macros will be available, but they are not and I have no clue, how to access these values from within the template programmatically.

BTW: You last advicing sentence should probably be :
Choose Connector template from the templates list to modify connector properties.

Regards

Richard