Book a Demo

Author Topic: Updating of alias during transformation  (Read 3824 times)

novikovigor

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Updating of alias during transformation
« on: April 17, 2014, 07:39:23 pm »
Hello!
Code: [Select]
Table {  
%TRANSFORM_REFERENCE("Table")%
%TRANSFORM_CURRENT("language", "stereotype")%
%if condition%
alias = "alias1"
%else%
alias = "alias2"
%endIf%
When I transform model first time condition is true and transformed object has alias is "alias1".
When I transform model second time condition is false but alias in transformed object is not updated.
How to make alias updated when transformed object already exists?

novikovigor

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: Updating of alias during transformation
« Reply #1 on: April 17, 2014, 08:01:43 pm »
In other words...
When transformed object is not exists next code works properly and alias (in new transformed object) is set:
Code: [Select]
Table {  
%TRANSFORM_REFERENCE("Table")%
%TRANSFORM_CURRENT("language", "stereotype")%
alias = "alias1"

But after the first transformation (when I run the 2nd, 3rd etc transformation) I want to update my alias:
Code: [Select]
Table {  
%TRANSFORM_REFERENCE("Table")%
%TRANSFORM_CURRENT("language", "stereotype")%
alias = "alias2"
But my alias is not updated.

Nizam Mohamed

  • EA User
  • **
  • Posts: 193
  • Karma: +1/-0
    • View Profile
Re: Updating of alias during transformation
« Reply #2 on: April 17, 2014, 09:11:17 pm »
Syntax of TRANSFORM_CURRENT is
TRANSFORM_CURRENT(<listOfExcludedItems>)

you have to include Alias in the list of exclusions, something like
%TRANSFORM_CURRENT("language", "stereotype", "alias")%

You can also generate the intermediary file to check what value is set for alias for that particular element.

« Last Edit: April 17, 2014, 09:12:19 pm by nizammohamed »

novikovigor

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: Updating of alias during transformation
« Reply #3 on: April 17, 2014, 10:48:46 pm »
Thanks, but i'd already included "alias" in TRANSFORM_CURRENT before I posted previous message and it didn't help.
In the intermediary file I see alias="alias2", but transformed object has alias="alias1".