Book a Demo

Author Topic: Can these be done with Transformations?  (Read 4850 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Can these be done with Transformations?
« on: December 17, 2009, 01:57:34 pm »
So I'm getting into Transformations.  So far, not a joyous exploration (see Browser and t_xref inconsistent after Transforms)

However, I'm sure it will all get sorted out.  The sample transformation I used in the above bug report was very simple (almost simplistic).

However, following my previous (unhappy) experience years ago with Code Template scripting and not wishing to waste a lot of my customers time I thought I'd list some of the things I'd like to do with transforms and if one or more kinds souls could indicate if it is (or should be) possible then that would allow me to better plan.   8-)

If some code snippets could be provided to help the general community that would be even better!  :)

So here's the list:

1)  We will want to make copies of structures and items but mark the copies read only ie locked (or secure them with security).  Can this be done in a transform?

2)  In these copies, we may want to change the linked diagram to navigate to on double-click.  Is is possible to access the diagram links via the transform?

3)  I believe we can interrogate the tagged values of the source and generate tagged values in the target via transforms - is this correct?

That's all for now... I'm sure I'll think of some more.

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Can these be done with Transformations?
« Reply #1 on: December 17, 2009, 06:01:17 pm »
Paolo,

I hope I'm wrong, but I'm a little afraid you are one of the first users trying to really use the transformation for anything than a trivial case.

Anyway, I'm curious to the results of your experiments.

Geert

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Can these be done with Transformations?
« Reply #2 on: December 18, 2009, 10:59:29 am »
Quote
1)  We will want to make copies of structures and items but mark the copies read only ie locked (or secure them with security).  Can this be done in a transform?
No, transforms don't know anything about locking or security.  (Which is outside the model data itself.)

Quote
2)  In these copies, we may want to change the linked diagram to navigate to on double-click.  Is is possible to access the diagram links via the transform?
No, you don't have control over any aspect of the diagrams.

Quote
3)  I believe we can interrogate the tagged values of the source and generate tagged values in the target via transforms - is this correct?
You can interrogate the source tagged values, not the ones that are generated.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Can these be done with Transformations?
« Reply #3 on: December 18, 2009, 12:23:26 pm »
Quote
Quote
1)  We will want to make copies of structures and items but mark the copies read only ie locked (or secure them with security).  Can this be done in a transform?
No, transforms don't know anything about locking or security.  (Which is outside the model data itself.)
Yes, I expected this, but no harm in asking.
Quote
Quote
2)  In these copies, we may want to change the linked diagram to navigate to on double-click.  Is is possible to access the diagram links via the transform?
No, you don't have control over any aspect of the diagrams.
Yes, I noticed NO mention of diagrams at all - which is reasonable.  Again, no harm in checking.
Quote
Quote
3)  I believe we can interrogate the tagged values of the source and generate tagged values in the target via transforms - is this correct?
You can interrogate the source tagged values, not the ones that are generated.
That's all I need.


Thanks for answering - saves a lot of fruitless investigation.
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Can these be done with Transformations?
« Reply #4 on: December 18, 2009, 09:25:56 pm »
Quote
2)  In these copies, we may want to change the linked diagram to navigate to on double-click.  Is is possible to access the diagram links via the transform?

Just note that while such things are not accomplishable via means on-board EA they can be done by calling an add-in from the templates via the EXEC_ADDIN macro.
I wrote a whole lot of those addin methods lately to support MDA transformation.

Oliver

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Can these be done with Transformations?
« Reply #5 on: December 21, 2009, 09:00:36 am »
Quote
Just note that while such things are not accomplishable via means on-board EA they can be done by calling an add-in from the templates via the EXEC_ADDIN macro.
I wrote a whole lot of those addin methods lately to support MDA transformation.
Actually no.  At the time the templates are being executed the target model doesn't exist (at least the first time), so you can't manipulate it via an add-in.