Transformations and Transformation Profiles (Profile)

A transformation defines a set of actions to be executed during generation or upon request. You define a transformation in the profile category of an extension on a metaclass or a stereotype or other criteria.

You define a transformation when you want to:

  • Modify objects for a special purpose. For example, you can create a transformation in an OOM that converts <<control>> classes into components.

  • Modify objects in a reversible way. This can be useful during round-trip engineering. For example, if you generate a PDM from an OOM in order to create O/R mappings, and the source OOM contains components, you can pre-transform components into classes for easy mapping to PDM tables. When you update the source OOM from the generated PDM, you can use a post-transformation to recreate the components from the classes.

Transformations can be used:

  • In a transformation profile (see Creating a Transformation Profile) during model generation, or on demand. For more information, see Core Features Guide > Linking and Synchronizing Models > Generating Models and Model Objects > Generating Models > Model Generation Options Window > Applying Model Transformations.

  • As a command in a user-defined menu (see Menus (Profile))

Transformations can be used to implement Model Driven Architecture (MDA), a process defined by the OMG, and which separates the business logic of an application from the technological means used to implement it. The goal is to improve the integration and interoperability of applications and as a result, reduce the time and effort spent in application development and maintenance.

MDA development uses UML modeling to describe an application at different levels of detail, starting with the construction of a Platform-independent model (PIM) which models the basic business logic and functionality, and ending in a Platform-Specific Model (PSM) which includes implementation technologies (like CORBA, .NET, or Java). Between the initial PIM and the final PSM, there may be other intermediate models.

PowerDesigner allows you to create an initial PIM and refine it progressively in different models containing increasing levels of implementation and technology-dependent information. You can define transformations that will generate a more refined version of a model, based on the desired target platform. When changes are made to the PIM, they can be cascaded down to the generated models.

Transformations can also be used to apply design patterns to your model objects.

  1. Right-click a metaclass or stereotype, and select New > Transformation from the contextual menu.
  2. Enter the appropriate properties including a transformation script.