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

Write Transformations

In Enterprise Architect, you have the facility to write your own transformations. Transformations are based on the Code Generation Template Framework, therefore it is suggested that you read and understand the topics covering Code Generation Templates prior to using the Transformation Template language.

Access    Package | Model Transformation (MDA) | MDA Transformation Templates (Ctrl+Alt+H)

Factors concerning Transformation Templates

Factor

Detail

See also

Default Transformation Templates

Enterprise Architect provides a set of default transformation templates that you can use 'as is' or customize to your requirements.

 

Default Transformation Templates

General Syntax for the Intermediary Language

Transformations in Enterprise Architect generate an intermediary code form of the model being created in the transformation. You can review and edit this code.

 

Intermediary Language

Intermediary Language Debugging

You can also debug transformation scripts by checking the intermediary code generated from the Transform script.

 

Intermediary Language Debugging

Editing transformation templates and code

When writing transformations, you use the facilities of the common Code Editor.

 

Editing Source Code

Code Template Framework

You use the Code Template Framework to perform forward engineering of UML models. The Transformation Template Framework is derived from this.

 

Code Template Framework Tool (Using)

Code Template Framework (Modifying)

Syntax for Creating Objects

 

To generate objects or elements in a transformation, you apply a specific syntax in the template script.

Objects

Syntax for Creating Connectors

To generate connectors (relationships) in a transformation, you also apply a specific syntax in the template script.

Connectors

Transform Connectors

 

Transforming Duplicate Information

In many transformations there is a substantial amount of information to be copied. Rather than place this information in the template, you can use macros to read it from its source.

 

Copy Information

Transforming Template Parameter Substitutions

In a transformation template, if you are transforming Template Binding connector binding parameter substitutions, you can use the Template Parameter substitution macros.

 

Transform Template Parameter Substitution

Converting Types

You can apply various methods for converting data types to different target platform types.

 

Convert Types

Converting Names

You can apply various methods for converting names of elements to different target platform naming conventions.

 

Convert Names

Cross References

During a transformation, you can perform cross verification of transformed elements.

 

Cross References

Notes

·Further hints and tips can be gleaned from a close study of the Transformation Templates provided with Enterprise Architect
·The Transformation Template editor applies the facilities of the common Code Editor
 

Learn more

Learning Center topics

·(Alt+F1) | Enterprise Architect | Model Transformations | Transform | Write Transforms
?>