Sparx Systems Forum
Enterprise Architect => General Board => Topic started 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:
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: <UML:TaggedValue tag="subtype" value="Strong"/> and tried to apply that in the transformation template:
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
-
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.
Aggregation
{
%TRANSFORM_REFERENCE("FormClass", classGUID)%
Source
{
%TRANSFORM_REFERENCE("FormClass", classGUID)%
}
Target
{
%TRANSFORM_REFERENCE("ControllerClass", classGUID)%
aggregation="2"
}
}
-
That worked. Thank you very much for your help. I definitely wouldn't solve this problem by myself.
Regards,
mh