Transforming models

By using transformations, you can convert a set of source elements to a new set of target elements. You can transform UML models into text or code, transform text or code into UML models, and transform models into models at a different level of abstraction.

About this task

You can use model-to-text transformations to complete the following tasks:
  • Generate application code or artifacts from a source model.
  • Detect and resolve differences between the design of a model and its implementation. The transformation generates a new set of files and, in most cases, the source model remains unchanged.
You can use text-to-model transformations to complete the following tasks:
  • Generate conceptual models from code or artifacts.
  • Detect and resolve differences between the application code or artifacts and the model. You can select the updates to apply to the model. In most cases, the application code or artifacts remain unchanged.

You can use model-to-model transformations to transform a source model into a target model at a different level of abstraction. For example, in versions of IBM DevOps Model Architect that contain features for modeling service-oriented architecture (SOA) solutions, you can transform business analysis models that were created in WebSphere® Business Modeler into UML service models.

Transformations and reconciled modeling

Two reconciled modeling scenarios are common:
  • Transform a UML model into code, change the code, and then transform the changed code into UML
  • Transform existing code into a UML model, change the model, and then transform the changed model into code

By default, DevOps Model Architect supports reconciled modeling scenarios that transform UML to code, and then transform code into a UML model.

To determine how to use a transformation in a reconciled modeling scenario that starts from code, see the overview topic for that transformation. Depending on the transformation that you run, you might have to complete specific tasks before you run the code-to-UML transformation.

Installed transformations

To view the list of transformations that are installed in the product, complete one of the following steps:
  • View the list of installed transformations in the product help. See the Related information section at the end of this topic.
    Note: Some information, such as links to Eclipse documentation or to developer guides, is available only from the help topics that are installed with the product.
  • Click File > New > Other > Transformations > Transformation Configuration, click Next, and select the Show all transformations check box. In the New Transformation Configuration wizard, on the Specify a Configuration Name and Transformation page, the list of installed transformations is displayed.

Transformation preferences

To set preferences for transformations, click Window > Preferences > Modeling > Transformations. For example, you can specify the location of debug logs, set prompt and warning preferences, and set visualization preferences for the design contract management protocol (DCMP) named mixed modeling. Explore the subcategories in this section for preferences that relate to transformation authoring, domain-specific transformations, and displaying warnings when replacing source UML model elements with pointers to the generated elements.