Book a Demo

Author Topic: Transformation connector source/target tags  (Read 3050 times)

takacsm

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Transformation connector source/target tags
« on: February 09, 2022, 09:48:53 pm »
Hi,

I would like to transfer model class connector source and target tags to xsd schema model. position is a must for complex type sequences in an xsd.
I'm a beginer. Please give me a hint. Couldnt find any answer. If someone has other solution for keeping a specific order when generating xsdschema model I'm happy to learn.

Thanks, Mate

This is my code part (modified the original one):

%connectorType%
%PI="\n  "%
{
%TRANSFORM_CURRENT()%
%TRANSFORM_REFERENCE("Connector",connectorGUID)%

$COMMENT="Works, only transfers aggregation tags"
%TRANSFORM_TAGS()%

$COMMENT="Works fine, so I can read connectorSourceTag. Aggregation tags is added"
Tag {
   name = "outsideSourceTarget"
   value = "%connectorSourceTag:"position"%"
  }

Source
{
  %TRANSFORM_REFERENCE("XSDClass",connectorSourceElemGUID)%
  %TRANSFORM_CURRENT("Source")%
 
  $COMMENT="Works fine. Source alias is sourcealias"
  alias="sourcealias"
 
  $COMMENT="Doesnt work. Nothing in source tag"
  %TRANSFORM_TAGS("anything")%
 
  $COMMENT="Doesnt work. Nothing in source tag"
  Tag {
   name = "position"
   value = "%connectorSourceTag:"position"%"
  }
 
}
Target

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Transformation connector source/target tags
« Reply #1 on: February 09, 2022, 09:55:37 pm »
You haven't actually mentioned what the problem is you are having.

It might be helpful to mention the required result and the the result you are currently getting.

Geert

takacsm

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Transformation connector source/target tags
« Reply #2 on: February 11, 2022, 12:56:24 am »
Sorry for that. I have commented it in the code. So, I can't get the position tag from class model connector source and or target to be transfered during XSD schema transformation. This will result that the proper order of the complex types will be messt up.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Transformation connector source/target tags
« Reply #3 on: February 11, 2022, 01:54:47 am »
Sorry for that. I have commented it in the code. So, I can't get the position tag from class model connector source and or target to be transfered during XSD schema transformation. This will result that the proper order of the complex types will be messt up.
I understand. I'm afraid I can't help though.
I can guess you'll have to somehow create the sourceTag on the connector part, and not in the Source part, but I'm not sure.

You might want to ask Sparx support directly.

Geert

PS. I think you only need the position tag on the source End, not the target end.

takacsm

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Transformation connector source/target tags
« Reply #4 on: February 11, 2022, 04:08:34 am »
Thanks for the confirmation. I will go to Sparx support