The IBM® Rational® Software Architect 8.0 solution offers performance enhancements when working with diagrams. To leverage this benefit, you must first migrate your models to the new format used by the Software Architect 8.0 design environment.
To migrate your models, you can open each model individually. Then, in the Model Editor, show the Details page. In the Model Operations section, click the Upgrade... button.
Figure 1. In the Model Editor, press the Upgrade... button to manually migrate your model
If you have numerous models you wish to migrate, you may find the above process time consuming. In order to work more efficiently, it's a good idea to batch migrate your models by migrating them before you begin working with them.
You can write a pluglet that uses public Application Programming Interface (API) from the Unified Modeling Language™ (UML) Modeler component of the Rational Software Architect development environment which will migrate your models automatically.
Enabling pluglet functionality
First, ensure you have pluglet functionality installed. Launch the IBM Installation Manager and choose the Modify option. Select the appropriate package group and click Next twice. You should see the screen below. From here, expand IBM Rational Software Architect and Extensibility and patterns-based engineering. Be sure the Pluglets checkbox is checked.
Figure 2. In the Installation Manager, ensure the Pluglets functionality is installed
Second, to actually enable the pluglet functionality in the product, show the Preferences dialog and choose General, Capabilities. Then, click the Advanced… button and expand Development in the Capabilities tree. Check the Pluglet Development checkbox.
Figure 3. Ensure the Pluglet Development capability is enabled
Third, download the pluglet attached to this article and import it into your workspace using File, Import..., Existing Project into Workspace.
Running the pluglet
You are now ready to run the pluglet.
To run the pluglet, right click on MigrateModel.java and choose Run As, Pluglet from the context menu.
Figure 4. Choose Run As, Pluglet
Note: If Run As, Pluglet does not appear, it is likely because you did not complete the first two steps from the previous section.
You will be prompted to either migrate open models only or everything in the workspace. Choose the appropriate option and wait for the migration to complete.
Migration status, including migration errors, will appear in the Console view. From there, you can see which models were migrated successfully and which encountered migration errors.
Figure 5. Migration status is shown in the Console view
By design, the migration will fail if you do not have all required profiles available in your workspace: pop up dialogs will also appear during migration if this is the case.
To remedy this situation, be certain you have those profiles in your workspace or unapply the profile from the affected models. To unapply the profile, open the model. From the Model Editor, show the Details page. Select the missing profile and press the Remove or Repair… button.
Figure 6. Unresolved profiles must be removed or repaired in order for migration to be successful
The pluglet may also fail when it encounters unmigrated models with numerous cross model references. You can follow the instructions in Technote 1443594 for a solution to this issue. Once the model has been successfully migrated, it is no longer to follow the steps described in the Technote.
Understanding the pluglet
The pluglet decides which models are to be migrated by prompting the user to migrate all models, or only the open models. If the user selects to migrate only the open models, the public API call UMLModeler.getOpenModelRoots() is used. Alternatively, if the user chooses to migrate all the models, we consult the workspace root for the projects and recursively go through to find .emx (model) files.
For each of the files to migrate, we run the public API UMLModeler.forceMigrate(String) inside an AbstractTransactionalCommand. It is necessary to run the migration inside an AbstractTransactionalCommand because model elements will be modified by the migration process.
Having followed the steps outlined above, you are now able to successfully migrate models into the Software Architect 8.0 environment. By leveraging features that help you quickly open models, your team is better able to work more productively.
The author wishes to thank Dusko Misic and Michael Hanner for reviewing this article.
|Puglet for this article||com.ibm.xtools.migration.zip||4KB|
- Rational Software Architect:
- Visit the Rational software area on developerWorks for technical resources and best practices for Rational Software Delivery Platform products.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Attend a free developerWorks Live! briefing to get up to speed quickly on IBM products and tools, as well as IT industry trends.
- Watch developerWorks on-demand demos, ranging from product installation and setup demos for beginners to advanced functionality for experienced developers.
- Explore Rational computer-based, Web-based, and instructor-led online courses. Hone your skills and learn more about Rational tools with these courses, which range from introductory to advanced. The courses on this catalog are available for purchase through computer-based training or Web-based training. Additionally, some "Getting Started" courses are available free of charge.
- Technote 1443594: Opening and upgrading pre-v8.0 models might run out of memory or take a long time
Get products and technologies
- Download a trial version of Rational Software Architect
- Evaluate IBM software in the way that suits you best: Download it for a trial, try it online, use it in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement service-oriented architecture efficiently.
- Follow developerWorks on Twitter.
- Join the discussion in the Rational Development Tools forum.
- Get involved in the My developerWorks community. Connect with other developerWorks users while exploring the developer-driven blogs, forums, groups such as the Rational Café, and wikis.
Dig deeper into Rational software on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Keep up with the best and latest technical info to help you tackle your development challenges.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.