Book a Demo

Author Topic: Create composite connector during transformation  (Read 2426 times)

mholyszko

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Create composite connector during transformation
« on: September 08, 2008, 12:03:28 pm »
Hi,

How can I create a composite connector during models transformation?
I've tried the following:
Code: [Select]
Composition
{
  %TRANSFORM_REFERENCE("FormClass", classGUID)%
  Source
  {
    %TRANSFORM_REFERENCE("FormClass", classGUID)%
  }
  Target
  {
    %TRANSFORM_REFERENCE("ControllerClass", classGUID)%
  }
}
but it resulted in showing an error that the 'Composition' element is invalid. Then I prepared a simple diagram with an aggregation and a composition between two elements and exported it to XMI file. There I saw that composite aggregation had the tag:
Code: [Select]
<UML:TaggedValue tag="subtype" value="Strong"/> and tried to apply that in the transformation template:
Code: [Select]
Aggregation
{
  Tag
  {
    name = "subtype"
    value = "Strong"
  }
  (...)
}
but still no luck. A standard aggregation was created between two classes.
I couldn't find any information about that in the manual or previous topics on this forum, so I created a new topic, kindly asking for help.

Regards,
mh
« Last Edit: September 08, 2008, 12:03:46 pm by mholyszko »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Create composite connector during transformati
« Reply #1 on: September 09, 2008, 08:28:59 am »
You can ignore the tagged value from the XMI.  That doesn't correspond to a tagged value in EA.

The actual way to create one can be found by transforming an existing composition connector.

Code: [Select]
Aggregation
{
  %TRANSFORM_REFERENCE("FormClass", classGUID)%
  Source
  {
    %TRANSFORM_REFERENCE("FormClass", classGUID)%
  }
  Target
  {
    %TRANSFORM_REFERENCE("ControllerClass", classGUID)%
    aggregation="2"
  }
}

mholyszko

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Create composite connector during transformati
« Reply #2 on: September 09, 2008, 09:02:33 am »
That worked. Thank you very much for your help. I definitely wouldn't solve this problem by myself.

Regards,
mh
« Last Edit: September 09, 2008, 09:03:35 am by mholyszko »