IBM Support

IBM Rational Rose sequence and communication diagram objects are imported into IBM Rational Software Modeler without a label

Question & Answer


Question

After importing an IBM® Rational® Rose model into IBM Rational Software Modeler or IBM Rational Software Architect, the sequence and communication diagrams may not display the label of the lifelines as it was shown in Rose. This technotes explains: 1. the reason why this may happen 2. how the modeling preferences can be set up to make sure that the display will be as it was in Rose 3. how the display can be changed programmatically if a model has already been imported.

Cause

In Rational Software Modeler or Rational Software Architect, the Modeling Preferences under Window > Preferences > Modeling > Diagrams > Sequence and Communication Diagrams is set to: Show Lifeline Represents Name only during the import of the Rose model:

Answer



Given a Rational Rose sequence diagram that looks as follows:



the same diagram may appear as shown below after the import into Rational Software Architect or Rational Software Modeler:


You can see that the two first lifelines do not show any label while the third one does. The reason is that the first two objects in Rose are unnamed, while the third one has a name.

To make sure that diagrams in Rational Software Modeler are shown as they were in Rose, you need to set the modeling preference under: Window > Preferences > Modeling > Diagrams > Sequence and Communication Diagrams to be Show Lifeline Represents Name and Type Name before the model is imported.

If you have already imported your Rose models, you can use the attached pluglet to change the display programmatically:

Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.



To use this pluglet, follow these instructions:
1. Import the attached zip file in your current workspace.
2. Create the pluglet configuration by:
    right clicking on the file LifelineLabelCorrectorUI.java,
    selecting Run As...
    choosing Pluglet
3. Now that the configuration is created, select a UML element (model or package) in the Project Explorer and launch LifelineLabelCorrectorUI pluglet from the menu Run > Internal tools.
4. The output of the pluglet will be written in the Console view. If the pluglet finds lifelines that are shown with only the Name of the Represents as shown below, it will modify the lifeline:

RoseSampleTest::Logical View::NewClass is not shown
--> LifeLine view changed to option: Represents Name and Type Name
RoseSampleTest::Logical View::NewClass2 is not shown
--> LifeLine view changed to option: Represents Name and Type Name
RoseSampleTest::Logical View::NewClass3 is not shown
--> LifeLine view changed to option: Represents Name and Type Name
Operation has modified:
Sequence diagram: NewDiagram
**Done***


FixLifelineLabelAfterImport.zip

[{"Product":{"code":"SSCLKU","label":"Rational Software Modeler"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Modeling","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF016","label":"Linux"}],"Version":"7.0;7.0.0.1;7.0.0.2;7.0.0.3;7.0.0.4;7.0.5;7.0.5.1;7.0.5.2;7.0.5.3;7.5;7.5.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SS4JCV","label":"Rational Software Architect for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.5;7.5.1","Edition":"","Line of Business":{"code":"LOB15","label":"Integration"}},{"Product":{"code":"SS4JE2","label":"Rational Software Architect Standard Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.5;7.5.1","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}},{"Product":{"code":"SSJP3D","label":"Rational Systems Developer"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"7.0;7.0.0.1;7.0.0.2;7.0.0.3;7.0.0.4;7.0.5;7.0.5.1;7.0.5.2;7.0.5.3","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21329337