Customize Xmi toolkit for Tau

Overview

In this tutorial, you will learn to customize the Xmi toolkit ruleset for Tau.

This tutorial shows:

Importing Rules

You can use the Import Wizard to import the Tau to UML Rules Set into your RulesComposer workspace:

  1. From the main menu bar, select File > Import          
    Then the Import wizard opens.
  2. Select General > Existing Project into Workspace and click Next.

  3. Choose Select archive file and click on the associated Browse button to locate the zip file:

    TAUToolkitRules.zip

    Available under folder:

    Tau_INSTAL_PATH\addins\UML21XMIImportExport\Src

  4. Under Projects select com.sodius.toolkit.tau.rules project.
  5. Click Finish to start the import.

Editing Rules

Help is available in the RulesComposer Help:
Select Help > Help Contents and book MDWorkbench Documentation ,
Then Tasks > Developing Rules > Editing rules.

Testing Rules

  1. Before executing rules, needs to configure application Tau to export model in a format supported by RulesComposer.
  2. First, close Tau if not done.
  3. Open folder Tau_INSTAL_PATH\addins\UML21XMIImportExport
  4. Launch script: ConfigureDEBUG.bat
  5. RE-open Tau and open your last project, then check in the menu bar that menu item Tools > TAU XMI appeared as in the following screenshot:



  6. Now, execute command TAU XMI > Export Model… and then choose a folder and filename to export your project, for example:
    C:\Export-Xmi\Tau C++ generation.xmi

    You will now work with this file in the next steps.
    Please note that this file has Xmi syntax and generated data format is Tau 4.3.0.

Run rules

Export data you have to use a Rule Set launch configuration:

  1. From the main menu bar, select Run > Run Configurations            
    Then the Run Configurations wizard opens.

  2. In the RulesComposer browser, two launch configurations imported with the Tau project appear: Tau2UML and UML2Tau.
  3. Choose the Tau2UML launch configuration:
    In Parameters you can specify the input Tau model, for example:

    C:\Export-Xmi\Tau C++ generation.xmi

    And the output UML one, for example:

    C:\Export-Xmi\C++ generation.xmi
  4. By default the output file has Xmi syntax and generated data format is UML 2.1 for Tau.
    You can customize output choosing value true for exportDiagram property or true for isRhpExport property, in that way you can export to data format is UML 2.1 for Rhapsody.
  5. Click Run to execute the main rule.

Import data

To import, do the same using UML2Tau launch configuration:



Note:   You can customize input choosing value true for importDiagram parameter.

For more details, select Help > Help Contents , and in book MDWorkbench Documentation , select Tasks > Developing Rules > Running and debugging.

Deploying Rules

To integrate your new rules to the Tau XMI Toolkit you have to deploy them. For that you can use the Export wizard from RulesComposer.

  1. In the projects browser, select the Rule Set project and deploy it as follow.
  2. From the main menu bar, select File > Export
    Then the Export wizard opens.
  3. Select Java > JAR File and click Next.


  4. In box Select the resources to export choose only src package,
    Check Export generated class files and resources ,
    Then save the jar file under folder:

    Tau_INSTAL_PATH\ addins\UML21XMIImportExport\Bin\rules
    With filename:

    TAUToolkitRules.jar

    (caution: replace the old jar with same name) and click
    Finish.

  5. Finally, when rules are operational, you can remove menu item: Tools > TAU XMI.
  6. To do that, first close Tau if not done.
  7. Open folder Tau_INSTAL_PATH\addins\UML21XMIImportExport
  8. Launch script: ConfigureRELEASE.bat
  9. RE-open Tau and open your last project, then check that menu item disappeared.