Skip to main content

Compare and merge fragmented models by using IBM Rational Software Architect, Rational ClearCase Remote Client, and UCM

Parallel development tools and tips

Hongyan Huo (Hongyan_Huo@ca.ibm.com), Rational Software Architect Integration SVT, IBM
author photo
Hongyan is a Software Quality Developer with IBM Rational System Verification Test (SVT) team. With years of software development background in IBM, she has been doing end-to-end cross-product and integration tests.
Magda Bologa (mbologa@ca.ibm.com), Software Test Specialist, IBM
author photo
Magda is an Advisory Software Verification Developer with IBM Cognos Group. She has years of experience and extensive knowledge in Rational products. As part of the IBM Rational SVT team for eight years, she focuses on cross-product integration testing. Magda has strong expertise in Rational Modeling products integration with configuration management tools (IBM Rational ClearCase, ClearCase Remote Client, CVS). She has written for developWorks previously and contributed to a hands-on workshop at the IBM Rational Software Development Conference in 2008 and the Industry Models Management Proof of Technology.

Summary:  This article provides parallel development tools and tips using IBM Rational Software Architect, Rational ClearCase Remote Client, and UCM.

Date:  05 May 2009
Level:  Intermediate
Activity:  677 views

About model fragments

A logical model is a model that has multiple subunits. In other words, it is a collection of UML elements that are logically related but physically separated. The physical resources associated with the logical UML elements are called fragments. A logical model in IBM® Rational® Software Architect consists of the Rational Software Architect model file (which has an .emx extension) and one or more fragments (files with .efx extensions).

Configuration management systems, such as IBM® Rational® ClearCase®, enable parallel development, in which multiple team members work on a model at the same time. During parallel development, uncoordinated changes can affect a file, as well as the logical model or model subset that the file represents. You must merge any conflicts before you can save the merged model file in the configuration management system. A trivial merge occurs when changes do not conflict; therefore, the model merge tool merges the changes automatically. A nontrivial merge occurs when multiple people deliver conflicting changes and the person processing the merge must determine which changes to accept.

Make sure that you consider the following principles of decomposition for your UML models:

  • Group any items that must remain together and then isolate those groupings.

  • If your decomposition contains too many granular items, group those items into UML packages.

  • Group items that are shared by many units into a common package, and focus on stabilizing common items.

Also consider partitioning a model into multiple files in these situations:

  • The size or packaging structure of the model becomes unmanageable.

  • More than two users regularly deliver changes to a modeling file that cause nontrivial merges.

  • Decompose your model into fragments only after its abstraction level.

  • When the top-level subsystems of your model are mature and stable, you can separate them to enable parallel development and to improve the speed with which the model opens. When the contents of an individual subsystem stabilize, you can then divide the subsystem.

If your decomposed model still contains a high number of dependencies, you have two options:

  • Assign the project to a small team that shares a physical space, one with members who communicate when they make changes that affect the artifacts of other team members.

  • Plan to regularly perform nontrivial merges.

Assignment of work and partitions for models

After you establish an effective architecture, you can assign ownership of different architectural components by individuals or small teams. When only one person or a small team that shares a physical space works on a logical package or branch in a model, you minimize nontrivial merges with that model, regardless of whether you store the model in a single modeling file or in multiple modeling files. You cannot avoid nontrivial merging by partitioning models into multiple files, because architectural interdependencies are logical, not physical.

Do not move, rename, or modify the model and fragments files outside of the Rational Software Architect or Rational Software Modeler environment, because the software cannot track these changes if you do, and your model will get corrupted. To avoid data corruption when you work with model fragments, always work in a synchronized workspace that contains all of the fragments at the same revision level.

For a detailed discussion of model structure and partitioning guidelines, see the IBM® developerWorks® articles titled Model structure guidelines for Rational Software Modeler and Rational Software Architect, by William T. Smith of IBM, and Comparing and merging UML models in IBM Rational Software Architect: Part 3. A deeper understanding of model merging by Kim Letkeman.

Starting with ClearCase Remote Client Version 7.1, Rational Software Architect provides an option to ignore logical resources on checkout and to check out only the physical files that you select on the Preference page. This gives flexibility and control back to you so that you can manage your models.

Purpose of the ClearCase Remote Client

The ClearCase Remote Client is a great alternative to the ClearCase native client when you want to work in the same ClearCase view at home or while traveling as you were using at the office. It is also useful to people who work in small satellite offices.

Starting from ClearCase Remote Client V7.0 paired with ClearCase Web server V7.0, it supports logical merging so that model files and their fragments can be logically merged, rather than file-base merge. (ClearCase Remote Client V6 and the related Web server version do not support logical merges; therefore, model files and fragments are merged as files.) File-based merges can result in models with unresolved fragments and elements, because .emx and .efx files are merged one by one during check-in, deliver, or rebase actions.

For more information on ClearCase Remote Client and setup in Rational Software Architect, see the Scenarios of working in a team development environment: Using Rational Software Architect and ClearCase Remote Client by Magda Bologa.


Prerequisites

The following software must be installed on the client workstations:

There is no need to have a native ClearCase client installed and enabled on the client side. The ClearCase Remote Client for Eclipse requires the support of a ClearCase Web server, which provides the client with access to remote ClearCase repositories and support for local ClearCase views. The ClearCase Remote Client works over the HTTP protocol.

Install and update the ClearCase Remote Client for Eclipse

When you are using and Eclipse 3.3-based IDE (or and IDE based on an earlier version), see http://www-01.ibm.com/support/docview.wss?uid=swg21215611 for ClearCase Remote Client installation instructions.

For installation instructions for the ClearCase Remote Client into Eclipse 3.4-based application, see "Guidelines to install ClearCase Remote Client for Eclipse in Eclipse 3.4 with Equinox Update and Installer (P2)" at

http://www-01.ibm.com/support/docview.wss?rs=984&uid=swg21327758.

Install and configure the ClearCase server component

  1. Set up a shared server where your team stores the source code control repositories. If you choose to use ClearCase Remote Client V7.0.1, ClearCase Web Server V7.0.1 must be installed and configured with ClearCase Remote Client Components; if you choose ClearCase Remote Client V7.1, ClearCase CM Server for Rational ClearCase Remote Client V7.1 must be installed. For the details about ClearCase Remote Client and Web Server compatibility, please refer to ClearCase Information Center https://publib.boulder.ibm.com/infocenter/cchelp/v7r1m0/index.jsp?topic=/com.ibm.rational.clearcase.cc_ms_install.doc/topics/c_inst_upgr_ccrc.htm.

About the ClearCase Web server

The ClearCase Web server is a computer where ClearCase has been installed, which has access to one or more ClearCase repositories (versioned object bases, or VOBs). Every ClearCase Web server supports two client interfaces -- the ClearCase Remote Client and the ClearCase Web interface -- usually at the same URL.

  1. Create a unified change management (UCM) setup on the ClearCase Web server. See Scenarios of working in a team development environment: Using IBM Rational Software Architect and UCM by Dejan Custic, which explains how to create the initial project VOB and UCM project.


Set up the ClearCase Remote Client and model to integrate fragments

The following example simulates two users editing the same source-controlled model file in Rational Software Architect by using the ClearCase Remote Client for Eclipse. When two contributors make changes to the same UML model, the graphical merge session allows partial acceptance of either side of the UML model elements, as well as elements from UML diagrams.

During this scenario, User1 will create a new Web view and load the UCM ClearCase VOB located on the ClearCase Web server. User1 will share a modeling project so that other team members can also work on it. Both User1 and User2 work on the same model. The two users make conflicting changes to the same model elements and diagrams. When the second user tries to check in files, that user must perform a merge to resolve the differences. The Rational Software Architect Compare/Merge capability enables you to compare and track different model elements and diagram views, identify the differences between them, and merge models.

Versioned object bases, or VOBs

Resources controlled by ClearCase are stored on a ClearCase server in repositories called versioned object bases, or VOBs. To access a VOB, you must connect to a ClearCase Web server and work in a ClearCase view.

To create a VOB, you must have access to ClearCase administrative tools that run on the ClearCase Web server. You cannot use the ClearCase Remote Client to create a VOB.

Start Rational Software Architect on the client machine

In this section, User1 will launch Rational Software Architect, import a modeling project, and share the project for other team members to use (by using the ClearCase Remote Client for Eclipse).

To start Rational Software Architect and create an initial workspace, follow these steps (on the Microsoft® Windows® platform):

  1. Click Start > Programs > IBM Software Development Platform > IBM Rational Software Architect > Rational Software Architect.

  2. In the Workspace Launcher window, in the Workspace field, select a workspace and click OK.

  3. If you are prompted to change the auto launch configuration to your workspace path, click Yes.

Your ClearCase view location and your workspace location should always be separate.

Note:
It is a good practice to maintain a separate Rational Software Architect workspace for each Rational ClearCase or ClearCase Remote Client view. To associate a Rational Software Architect workspace with a ClearCase (or ClearCase Remote Client) view, create a new workspace storage directory that corresponds to the ClearCase or ClearCase Remote Client view.

Enable the ClearCase Remote Client within Rational Software Architect

Follow these steps to enable the ClearCase Remote Client capabilities in Rational Software Architect Client:

  1. Select Window > Preferences.

  2. In the Preferences view, expand General > Capabilities.

  3. In the right pane, select Advanced.

  4. In the Advanced view, expand Team and select ClearCase Remote Client (shown in Figure 1), and then click OK.

Tip:
Disable the software configuration management (SCM) Adapter when it is not in use, so that you will not mistake the SCM Adapter (ClearCase) menus for ClearCase Remote Client menus. Make sure that the ClearCase Remote Client option is enabled and the SCM Adapter option is disabled (as in Figure 1) and click OK. Please note that not all of the SCM operations are available in the remote client


Figure 1. Select the ClearCase Remote Client in the Advanced view
Check box options listed for Capabilities


  1. In the Preferences view, click OK.

Open the ClearCase perspective

Follow these steps to open the ClearCase perspective on the Rational Software Architect client machine:

  1. Select Window > Open Perspective.

  2. In the Select Perspective view, click the Show All check box.

  3. Select ClearCase.

  4. Click OK in the Open Perspective view shown in Figure 2.


Figure 2. Open Perspective view
 ClearCase selected as described


Set ClearCase Remote Client preferences

To set the ClearCase Remote Client preferences on the Rational Software Architect client machine, follow these steps:

  1. Click Window > Preferences.

  2. In the Preferences view, expand Team and then ClearCase Remote Client.

  3. Click Editors Preference (or Editors/Workspace Preference in V7.0.1)

  4. Select the Decorate workspace project names with viewtags check box (see Figure 3).

Note:
By setting this preference in the Rational Software Architect Project Explorer, if a project is associated with a ClearCase Web view, it will be shown next to the project name. This will help prevent making changes to files in the wrong view.

  1. Click OK in the Preferences view.


Figure 3. Selections for workspace preferences
Preferences view


Note:

The Compare/Merge capabilities are available in Rational Software Architect V7.0.0.7 and later, Rational Software Modeler V7.0.5.2, and Rational Software Architect V7.5 and later.

  1. The two highlighted options (Figure 4) work with ClearCase Remote Client 7.1, CVS, and IBM® Rational® Team Concert Version 1.0.

  2. Go to the Preferences page (Figure 4) and select General > Compare/Patch > Modeling Compare/Merge.

  3. Make sure that the Logical Model Settings ("Disable Logical Model Synchronization" and "Enable Sparse Logical Model Merge") are not selected (the default setting is not selected).


Figure 4. Logical model settings in the Preferences view
Check boxes for both settings are not selected


You can change this default setting in these situations:

  • Use Disable Logical Model Synchronization when you want to individually update, commit or synchronize .emx and .efx file artifacts.

  • Enable the Sparse Logical Model Merge preference when you are working with large models that use logical models. This significantly speeds the merge session, because only those fragments that are changed are loaded (along with their parent containers of the logical model). All unchanged files are ignored.

Join a UCM project and create a ClearCase development stream and Web view

The ClearCase Remote Client includes two view-creation wizards:

ClearCase Web server tips

The ClearCase Remote Client accesses the ClearCase Web server through a URL.

For example, when use ClearCase 7.0.1 Web server (and ClearCase Remote Client V7.0.1 client), the URL location is: http://<ClearCaseRemoteClientServer IP address>:<port#>/ccrc, where the port number (#) is optional, depending on your server.

When use ClearCase 7.1 web server (with ClearCase Remote Client7.1), the URL location is: http://<ClearCaseRemoteClientServer_name>:<port#>/TeamWeb/services/Team

To connect to a ClearCase Web server, authenticate your identify with a user name and password that are valid on that server. If the ClearCase Web server is running Windows, the user name must include the Windows domain in which the account was created. For example: DOMAIN\user.

If you are already connected to a ClearCase Web server and want that server to support the view that you create, you can reuse that server connection. You can also choose a different ClearCase Web server to support the view.

  • One that creates a base ClearCase view

  • One that enables you to join a UCM project and then create one or more UCM ClearCase views in which to work on activities in that project.

In this scenario, you will work with UCM ClearCase view.

The ClearCase Remote Client accesses the ClearCase Web server through a URL. To connect to a ClearCase Web server, you must authenticate your identity with a user name and password that are valid on that server.

  1. In Rational Software Architect Client machine, from the ClearCase perspective, select ClearCase > Join a UCM Project from the menu

  2. Enter the required user information, type the password that is valid for the user name that you supplied, and click Next

  1. Select the Rational project associated with your UCM VOB and then click Next (Figure 5).


Figure 5. Select a UCM project
Join UCM Project view


  1. Add the development stream name and click Next (see Figure 6).


Figure 6. Add the ClearCase development stream name
Specify UCM streams view


  1. Add the development view name (comment is optional) and click Next (Figure 7).


Figure 7. Add the ClearCase development view name
Create a ClearCase UCM development view screen


  1. Add the integration view name (comment is optional) and click Finish (Figure 8).


Figure 8. Add the integration view name
Create a ClearCase UCM integration view screen


  1. Click Yes in the "Join UCM Project) confirmation dialog in response to "Show the tool now?"


Figure 9. "Join UCM Project" dialog
Pop-up dialog screen


  1. In the ClearCase configuration window (Figure 10), select Show All VOBs, navigate to and select the UCM project, and then click OK.


Figure 10. ClearCase View Configuration screen
Check box checked, UCM project selected


The ClearCase perspective should show the ClearCase View Configuration screen with the UCM VOB artifacts loaded in your Web view (see Figure 11).


Figure 11. UCM VOB artifacts are now loaded
Tab and details


Import an existing modeling project

In this section, User1 will import an existing modeling project called Piggy Bank.

The Piggy Bank sample is divided into three UML models. Each describes a different aspect of the system, such as the use-case model, the analysis model, and the design model.

To import the Piggy Bank modeling project, follow these steps:

  1. Select Help > Samples Gallery.

  2. In the Contents pane, navigate to Application samples > Piggy Bank Application > Piggy Bank Models (Figure 12).

  3. In the right pane, click Import the sample.

  4. In the Sample Banking Models wizard on the Piggy Bank Models page, accept the default project name and click Finish.

  5. Switch to Modeling Perspective when asked.

  6. Close the Samples Gallery.

The following figure illustrates how the Piggy Bank modeling project is displayed in the Model Explorer view.


Figure 12. Piggy Bank modeling project structure
Project Explorer view, partial


  1. You can expend these Piggy Bank models to better understand this sample project.

Use the ClearCase Remote Client to share the project

User1 will share the project to give other team members access.

  1. In the Project Explorer view, right-click on PiggyBank Models project and then select Team > Share Project.

  2. In the Share Project wizard, on the Share Project page (Figure 13), select ClearCase Remote Client and then click Next.


Figure 13. Select ClearCase Remote Client so you can share the project
Share Project view


  1. In the Move Project to ClearCase view (Figure 14), select the ClearCase UCM Component VOB, user5_ucm_stream3_webview3, and click Next.


Figure 14. Select the ClearCase view.
The CCRC view is selected.


  1. Under "Select a folder," select the UCM Component VOB folder to hold the root of your project, and click Next (see Figure 15).


Figure 15. Select the folder for the root of your project
Folder selected


  1. Click Finish to add the project to the source control.

You should then get the ClearCase "Add Resources to Source Control" dialog, where all modeling project artifacts are selected by default (see Figure 16.)


Figure 16. Add Resources to Source Control dialog screen
Screen capture that shows all check boxes checked


  1. [User1] Create a new ClearCase activity in Add To Source Control Dialog, and click the Apply button on Add To Source Control modeling artifacts.

  2. Model artifacts should be checked out. If they are not, check out your models.

  3. [User1] In the Modeling perspective, open all UML models and create fragments for all UML package elements in these three UML models (including nested packages) by right -clicking on each UML package element and choosing Create Fragment (starting with v7.5 of Rational Software Architect: Refactor > Create Fragment,). Leave default locations but keep Element Name in sync with Fragment Name (for example: Account Operations.efx fragment for the Account Operations UML Package element). [User1] At the prompt, add to Source Control Model fragments artifacts; reuse the same Activity name when prompted.

  4. [User1] Now create fragments for all classifier elements (classes, use cases, and so forth) and UML diagrams (if diagram fragments will be supported) in these three UML models (including nested elements) by right-clicking each UML classifier element and choosing Create Fragment. Leave the default fragment name and location. User1 should then be prompted to add to these to the Source Control Model fragments artifacts.

  5. [User1] Add the elements to the Source Control Model fragments artifacts.

  6. [User1] Save Piggy Bank Models.

  7. [User1] Simultaneously select the model files and fragments and check in all Piggy Bank Models files by selecting Team> Check in from the drop-down menu. (Make sure to check files in even if identical files are selected in the Check-in dialog, as the example in Figure 17 shows).

  8. Click Apply.


Figure 17. "Check in even if identical to previous version" option selected
Check in view


User1 checks in all files from the ClearCase perspective

Complete these steps to make sure that all of your files are checked in before delivering your work:

  1. On your ClearCase Remote Client client machine, in Rational Software Architect, switch to ClearCase Perspective.

  2. In the ClearCase navigation view, right-click your UCM component VOB and choose Tools > ClearCase Search as Figure 18 shows).


Figure 18. ClearCase directory and drop-down menus
Shows selections described


  1. Select the Check-out files option to find all of your checked-out files from the selected view.

Note:
It is best to select all three of the options so that ClearCase also searches for all "View private files" and "Hijacked" files, rather than only the checked-out files. You can select Add to Source Control (in the Undo Hijack file) and view private files (respective hijacked files), similarly to how you can with the full ClearCase options.

  1. Simultaneously select all files in the ClearCase Search Results view, right-click to invoke the drop-down menu, select Basic > Check-in for all of the files that are checked out (make sure that you select the Check-in even if identical option in the Check-in dialog), and then click Apply.

User1 delivers changes to the integration stream

  1. Switch to ClearCase Perspective on your ClearCase Remote Client machine in Rational Software Architect.

  2. In the ClearCase Navigator view, right-click on your UCM component VOB, and choose UCM > Deliver.

  3. You might get the re-authenticate dialog if the connection was timed out. If you do, just enter your password and click OK.

  4. Click OK in the :Delivering from stream: screen (Figure 19).

  5. You should get the conformation message if the delivery was successful.

  6. Click OK. Your merged project and models should be as expected in the ClearCase Integration view ( make sure that everything is OK).

  7. When you are satisfied, you can check in your files in the Integration view by clicking the Complete Delivery button (see Figure 19).


Figure 19. Icon for"complete the deliver operation"
Screen fragment


  1. When you get the confirmation screen that says “Deliver[y] Competed," click OK.

All of your work should now be merged and checked in, which you can verify in the Integration view.

Create and recommend a new baseline

You need ClearCase Admin privileges to create and recommend a baseline.

  1. Launch the ClearCase Project Explorer.

  • On a Linux® operating system, go to /usr/atria/bin and launch clearprojexp.

  • On a Windows platform, select Start > Programs > Rational ClearCase > ClearCase Home Base > Projects Tab > Project Explorer.

  1. In the Project Explorer, select your integration stream, and right-click to select Make Baseline.


Figure 20. Select which integration stream to use for the baseline
ClearCase Project Explorer view


  1. Name the baseline B1 and, in the Activity tab, make sure that the activities are included.

  2. Click OK in Make Baseline dialog and then click OK in the confirmation dialog when the new baseline has been created.

  3. In the Project Explorer, select your integration stream again, right-click, and select Recommend Baseline.

  4. Add your latest baseline (B1) and click OK in the Recommend Baseline dialog

Tip:
Alternatively, in ClearCase Remote Client Version 7.1 or later, you can use the Navigator tab in the ClearCase Explorer view in Rational Software Architect to create and recommend baselines in the integration stream (see Figure 21 for an example).


Figure 21. ClearCase Explorer view in Rational Software Architect
Make and recommend baselines from ClearCase Navigator view.



Set up the environment for parallel development

In this section, User2 will set up individual work areas by creating a Web view and importing the Piggy Bank UML project into the workspace

Set up a remote client so that User2 can work on the project, too

To create a view and import the shared Piggy Bank modeling project, follow these steps:

  1. [User2] Launch Rational Software Architect on your ClearCase Remote Client client machine.

  2. When prompted, select your workspace or create a new one.

  3. Enable the ClearCase Remote Client in Rational Software Architect. For more information, see the previous section headed Enable the ClearCase Remote Client (performed by User1).

  4. Join the UCM project in Rational Software Architect (by following the steps in the Join UCM Project section performed previously).

  5. On the remote client Client 2 machine, right-click on your ClearCase Web View 2 in ClearCase Explorer in Rational Software Architect (ClearCase Perspective) and select UCM > Rebase.

  6. Select Complete Rebase button complete rebase button in Rebase view's menu bar.

  7. When you get the Rebase Complete confirmation message, click OK

  8. Update your ClearCase Web View2 by right-clicking on the Web view and selecting Tools > Update Resources from ClearCase Navigator View in Rational Software Architect

  9. Click Apply in Update Resources Dialog.

The UML project artifacts should get loaded in User2 Web View2 location, and they will show in the ClearCase View Configuration view in the ClearCase perspective.

Import the Piggy Bank project from User's workspace

  1. Click File > Import.

  2. In the Import wizard, select General > Existing Project into Workspace and click Next.

  3. On the Import Project From File System page, in the Project contents field, specify the location of the Piggy Bank model in User2 ClearCase Web view (for example C:\CCRC\ccrcviews\ccrc_view2\ucmvob_ccrctest1\Piggy Bank Models).

  4. Click Finish in the Import dialog.

The UML models and models fragments will show in the Project Explorer in User2's workspace.

Alternative:

You can import this project within the ClearCase Navigator view instead by right-clicking the modeling project and selecting Import > Import Project into Workspace, as Figure 22 shows.


Figure 22. Alternative way to import the project
Selections in the file directory and drop-down menus


Compare and merge models and fragments during the delivery operation

When people work on the same packages and diagrams, model element conflicts are inevitable. When conflicts at the element level occur, the SCM system can no longer merge automatically. Instead, a visual merge is launched and user intervention is required.

In this section, you do parallel development. A merge typically starts when you push a new version of the model to a repository (check in when using Base ClearCase or deliver in UCM case) and a newer version of the same model already exists in the repository. If there are only nonconflicting differences, the merge is trivial, so you get a silent merge (differences are automatically resolved and merged). But if there are conflicting changes, you must manually resolve the remaining conflicts by selecting a version of a model from which to accept changes. After you resolve the remaining conflicts, you can save the merged model and close the merge editor.

The following steps describe the work to do in this section:

  • User1 checks out the modeling files (.emx and .efx files) and makes changes. All of the files are then checked in and delivered into the stream.

  • User2 checks out the same modeling files (.emx and .efx files) , makes conflicting and nonconflicting changes to some of the files, and then checks-in all of the files and tries to deliver the development stream changes to the integration stream. User2 needs to merge the modified files during the deliver operation.

Changes made by User2 in Rational Software Architect Workspace2:

  1. [User2] switches to the Modeling perspective, right-clicks on a model fragment in the UML model, and selects Check –out. (User2 should be prompted to check out all related files (model fragments and the UML model.)

  2. [User2] checks out fragments and the UML model.

  3. [User2] adds a new UML element (for example, a UML class to checked-out UML fragments) and modifies an existing UML element in the model file as well as the fragment file. Be sure to keep track of changes.

Best practice for multiple people working on models

To combine or make fragments or perform refactoring operations with models or model fragments it should be done only by model managers in integration streams. For this example, we showed it differently, it is better if you can experiment with a few non-conflicting merges (for example, adding a new UML class into a model fragment and another new class into the UML model), and a few non-conflicting changes, such as both [User1] and [User2] modifying the same UML model elements and the same property in the individual development streams. (A good example of such conflicting changes is to switch the color for the same element in the same diagram or to alter the same property of the same UML element.

  1. [User2] checks out the other two models and makes changes to model and fragments (for example: refactor rename/move UML elements, but not the model fragments), diagrams (examples: change the color for some of the shapes in the diagram and move some of the shapes or delete UML elements from the model but not the model fragment).

  2. Keep track of all changes. User2 should be prompted to check out all referenced fragments in UML models. Note: When using a logical model, by default, all fragments are checked out with the model (or related fragment).

  3. [User2] checks out all of the referenced fragments in UML models and makes the changes.

  4. [User2] saves all changes and checks in all of the checked-out files but does not deliver the development stream to integration stream.

Changes made by User1 in Rational Software Architect Workspace1:

  1. [User1] rebases the stream if that hasn’t been done yet and then checks out the UML models and fragments in the ClearCase Web view1.

  2. User1 makes a few modifications to the UML models and fragments, which causes some conflicting and some nonconflicting changes. For example, UML elements, or changes in diagrams (for instance, to make a conflicting change, you may change the shape color to a different color than the one chosen by User2 for same shapes in diagram). User1 should be prompted to check out all referenced fragments in UML models.

  3. [User1] checks out all of the unreserved referenced fragments in UML models and makes the changes.

  4. Keep track of all changes.

  5. [User1] saves all changes.

  6. [User1] checks in all of the UML model files (.emx files) and fragments files (.efx files) by simultaneously selecting those files in the Rational Software Architect Project Explorer and selected Team > Check-in.

(Optional) You can select a single file and check in all related model files. Fragments and .emx files will be included in check-in dialog.

  1. [User1] delivers the changed stream to the integration stream by the following the steps in the previous Deliver Stream section. The model and fragments will be merged silently in integration stream because the changes are trivial, given that User1 is the first to deliver changes to the stream.

  2. [User2] tries to deliver a changed stream to the integration stream by following the same steps, but

Compare and Merge Graphical Merge will launch for models (.emx) and fragments (.efx) files that have conflicting changes,

Note:

  • For ClearCase Remote Client V7.0 and later, a logical model merge should be supported, so you should be able to merge use Compare and Merge with your UML model files.

  • For ClearCase Remote Client V6, we will still have file-based merging, as with the native ClearCase view, so you will have merge sessions for both model and fragment files.

  • For ClearCase Remote Client V7.1, you have the option to ignore logical resources on checkout through your Preferences settings.

  1. [User2] resolves conflicts in models and fragments in Compare-and-Merge sessions, and then commits the merge session for each UML model (respective fragment).

Note:
If you have conflicting changes, you will not be able to finish the deliver session unless you resolve conflicts in the Compare Merge dialog. To do that, select the Conflicts tab in the Compare Merge dialog (Figure 23), review them, and resolve the conflicts (see Figure 24).


Figure 23. Select the Conflicts tab in the Structural Changes view
Shows the Conflicts tab



Figure 24. Accept or reject the resolution
Accept the resolution


  1. [User2] complete the delivery after all models and fragments are merged

Create and recommend a new baseline and rebase the stream

  1. Follow the steps from the Create Baseline section to create and recommend a new baseline named B2

  2. Follow the steps from Rebase Stream section to rebase your streams for User1 and User2.

Alternative:

If you select Merge Elements Graphically in Rebase Dialog, the three-way compare-merge sections will be opened for you to manually merge changes during the rebase process. You can review and select Accept all Non-Conflicting Changes and then Commit Merge Session by clicking on the toolbar icons (see Figure 25). You can then reload the model when one merge session is finished.


Figure 25. Alternative: use icons to merge elements, instead
Icons mentioned are circled on the toolbar


  1. Follow the steps from Update View section, previously, to update your ClearCase Web views, so that you can see the latest changes that User1 and User2 delivered and merged

  2. After the ClearCase Web View is updated, open the Modeling perspective in both workspaces (User1: ClearCase Web View1 and User2: ClearCase Web View2) to see the changes in your models and fragments (select Windows > Open Perspective > Modeling).

  3. In the Project Explorer, double-click on your models or fragments to open the models.

Changes from both contributors (User1 and User2) should show as expected in merged models and fragments


Resources

Learn

Get products and technologies

Discuss

  • Check out developerWorks blogs and get involved in the developerWorks community.

  • Participate in the Rational ClearCase forum on developerWorks. Post your ClearCase questions and comments, and share your thoughts, ideas, and solutions with other users. To participate by email rather than on the Web, subscribe by sending a note to cciug-subscribe@lists.ca.ibm.com.

About the authors

author photo

Hongyan is a Software Quality Developer with IBM Rational System Verification Test (SVT) team. With years of software development background in IBM, she has been doing end-to-end cross-product and integration tests.

author photo

Magda is an Advisory Software Verification Developer with IBM Cognos Group. She has years of experience and extensive knowledge in Rational products. As part of the IBM Rational SVT team for eight years, she focuses on cross-product integration testing. Magda has strong expertise in Rational Modeling products integration with configuration management tools (IBM Rational ClearCase, ClearCase Remote Client, CVS). She has written for developWorks previously and contributed to a hands-on workshop at the IBM Rational Software Development Conference in 2008 and the Industry Models Management Proof of Technology.

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=386361
ArticleTitle=Compare and merge fragmented models by using IBM Rational Software Architect, Rational ClearCase Remote Client, and UCM
publish-date=05052009
author1-email=Hongyan_Huo@ca.ibm.com
author1-email-cc=
author2-email=mbologa@ca.ibm.com
author2-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Special offers