Configuring XSD-to-UML transformations

To specify the information that the transformation uses to generate the output that you expect, you use the New Transformation Configuration wizard and the transformation configuration editor, which guide you through the configuration.

About this task

A transformation configuration has .tc as a file name extension, and contains the information that the transformation uses to generate the output that you expect. A transformation configuration also contains information that is specific to a particular type of transformation. To edit an existing transformation configuration, in a view that shows the workspace resources, double-click a transformation configuration file, which opens the transformation configuration editor.

To simplify working with the transformation configuration file, save the configuration file in the project that contains the elements to transform.

Procedure

  1. Depending on the view that you are working in, complete one of the following steps:
    • In the Pattern Explorer view, right-click a transformation; then click New Configuration.
    • In other views, click File > New > Transformation Configuration. If Transformation Configuration is not a menu item, click File > New > Other > Transformations > Transformation Configuration.
  2. Specify the details of the configuration. In the New Transformation Configuration wizard, on the Specify a Configuration Name and Transformation page, complete the following steps:
    1. In the Name field, specify a name for the configuration.
    2. In the Configuration file destination field, specify the destination for the transformation configuration file. The destination is a relative path in your current workspace. You can specify a fully qualified project name or folder name. If you specify a folder in a project, you must prefix the folder name with a forward slash (/).
    3. From the Transformation list, expand Service Oriented Architecture Transformations, and select XSD to UML.
      Note: To display the transformations that are installed, but not enabled, click Show all transformations. A transformation must be bound to a capability to appear in this list.
  3. In the Protocol section, specify the modeling protocol, which is also called the design contract management protocol (DCMP). The value that you select determines whether to synchronize the source and target of the transformation.
    • If the source model is the primary engineering artifact, select Conceptual. Any changes to the source model are propagated to the target model.
    • If the target model is the primary engineering artifact, click Mixed. The transformation converts the source artifacts to visual representations that are directly connected to the target artifact. Select this option to work in the target domain instead of with the source model, or to retain the artifacts for analysis. The transformation output becomes the primary engineering artifact.
    • If the architecture that the source artifacts represent evolves independently from the target, select Reconciled. Selecting this option enables the reverse transformation, which you can use to compare the source and target, and to reconcile changes. You might also select this option if different teams implement, develop, or maintain the architecture.
      Note: When you select this option, additional properties become available in the "Reverse transformation" section of the Main page. For some transformations, additional pages become available in the transformation configuration editor. For information about configuring the reverse transformation, see the related link below.
  4. Click Next.
  5. Specify the source and target elements for the transformation. For a list of valid source and target elements, see the related concept topic for this transformation. On the Source and Target page, complete the following steps:
    1. In the Selected source pane, select the source element for the transformation to transform.
    2. In the Selected target pane, select the destination of the transformation output. To create a new destination for the output, click Create Target Container.
  6. Click Finish. The transformation configuration editor opens, and the contents of the configuration are displayed.
  7. To specify whether the output that a transformation generates replaces or merges with an existing model, on the Main page, select from the following merge options:
    Option Description
    Overwrite Select from the list to overwrite all conflicting files automatically.
    Silent Select from the list to suppress prompts and dialog boxes when models merge.
    Visual Select from the list to display user prompts and warning dialog boxes when models merge.
    Automatic Select from the list to add new elements without prompting you for confirmation.
    Merge Warning Select this check box to prompt you for confirmation before conflicting files are overwritten.
  8. Optional: To generate a separate UML model for each source XSD file when you run an XSD-to-UML transformation, clear the Transform multiple source XSD files to the same target UML model check box.
  9. Optional: To generate debugging information, on the Main page, select the Generate a debug log check box. The next time that you run the transformation, the log file is generated as an XML file in the folder that you specify in the transformation preferences. If you do not specify a location for the log files, the transformation generates the log file in the .metadata folder in your workspace.
    Tip: To set preferences for transformations, click Window > Preferences; then expand Modeling and click Transformations.

    The log file provides information about the source elements, the target elements, and the rules that the transformation applies to transform the source elements. If the transformation transforms many elements, you might experience decreased performance while the transformation generates the log file; therefore, you should only generate a log file for debugging purposes.

  10. Optional: To prevent new dialog boxes from opening while a transformation runs, on the Main page, select the Run the forward transformation silently check box.

    Running a transformation in silent mode suppresses all dialog boxes that the transformation generates. The transformation applies default rules and behavior, which might generate unexpected or incorrect transformation output. You should only run a transformation in silent mode to validate that the transformation runs, instead of validating the transformation output. For example, you might run a transformation in silent mode as part of an automated task or automated test suite.

    Setting the transformation to run in silent mode overrides the file-overwrite options that you specify, and overwrites files if necessary.

  11. Optional: To display the errors that occurred when the transformation ran, on the Main page, select the Open the Report dialog box when the transformation is complete check box. Selecting this check box displays only the generated errors. The same information is also written to the error log, which you can view by clicking Window > Show View > Error log.

    To display the warnings that occurred when the transformation ran, select the Show warnings in the Report dialog box check box.

  12. Optional: Specify documentation about the transformation configuration. This field is useful for communicating information about a configuration that multiple users share. On the Main page, in the Documentation field, specify additional information about the transformation configuration.
  13. Optional: To specify auxiliary source and target files, click the Auxiliary Sources and Targets tab, and complete the following steps:
    1. Click Add.
    2. In the Source file field, type the source file URI.
    3. In the Target file field, type the target file URI.
    4. Optional: To automatically add all imported, included, and redefined schemas to the list of auxiliary sources, click the Discover Auxiliary Sources button.
    5. Optional: To set multiple resources in the Auxiliary source and target files list to the same target model file, select the resources; then click the Same Target button.
  14. Click File > Save.

Results

The options are applied the next time that you run the transformation.

Feedback