Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Transform Connectors

There are two different types of Class that you can use as a connector end: one created by a transformation, and one for which you already know the GUID.

Topics

Topic

Detail

See also

Connect to a Class Created by a Transformation

The most common connection is to connect to a Class created by a transformation; to do this you must have three items of information:

The original Class GUID
The name of the transformation
The name of the transformed Class

 

This type of connector is created using the TRANSFORM_REFERENCE function macro; when the element is in the current transformation, it can be safely omitted from the transformation.

The simplest example of this is when you have created multiple Classes from a single Class in a transformation and want a connector between them; consider this example from the EJB Entity transformation:

Dependency

{

 %TRANSFORM_REFERENCE("EJBRealizeHome",classGUID)%

 stereotype="EJBRealizeHome"

 Source

 {

   %TRANSFORM_REFERENCE("EJBEntityBean",classGUID)%

 }

 Target

 {

   %TRANSFORM_REFERENCE("EJBHomeInterface",classGUID)%

 }

}

There are three uses of the TRANSFORM_REFERENCE macro: one to identify this connector for synchronization purposes and the other two to identify the ends; all three use the same source GUID, because they all come from the one original Class.

None of the three have to specify the transformation because the two references are referencing something in the current transformation - each of them then only has to identify the transform name.

Of course, it is also possible to create a connector from another connector.

You can create a connector template and list over all connectors connected to a Class from the Class level templates; you don't have to worry about only generating it once, because if you have created a TRANSFORM_REFERENCE for the connector then Enterprise Architect automatically synchronizes them.

The following copies the source connector:

 

%connectorType%

{

 %TRANSFORM_CURRENT()%

 %TRANSFORM_REFERENCE("Connector",connectorGUID)%

 

 Source

 {

   %TRANSFORM_REFERENCE("Class",connectorSourceGUID)%

   %TRANSFORM_CURRENT("Source")%

 }

 Target

 {

   %TRANSFORM_REFERENCE("Class",connectorDestGUID)%

   %TRANSFORM_CURRENT("Target")%

 }

}

 

 

 

 

 

 

 

Cross References

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copy Information

Connecting to a Class for which you know the GUID

The second type of Class that you can use as a connector end is one for which you know the current GUID.

To do this, specify the GUID of the target Class in either the source or target end; the following example creates a dependency from a Class created in a transformation, to the Class it was transformed from:

 

Dependency

{

 %TRANSFORM_REFERENCE("SourceDependency",classGUID)%

 stereotype="transformedFrom"

 Source

 {

   %TRANSFORM_REFERENCE("Class",classGUID)%

 }

 Target

 {

   GUID=%qt%%classGUID%%qt%

 }

}

 

 

 

Notes

Each connector is transformed at both end objects, therefore the connector might appear twice in the transformation; this is nothing to be concerned about, but you should check carefully that the connector is generated exactly the same way, regardless of which end is on the current Class

Learn more