Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: mholyszko on September 08, 2008, 12:03:28 pm

Title: Create composite connector during transformation
Post by: mholyszko 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
Title: Re: Create composite connector during transformati
Post by: Eve 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"
  }
}
Title: Re: Create composite connector during transformati
Post by: mholyszko 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