Rational XDE
Guide to Team Development
VERSION: 2003.06.00
WINDOWS
support@rational.com
http://www.rational.com
Legal Notices
Copyright ©2003, Rational Software Corporation. All rights reserved.
Part Number: 800-026181-000
Version Number: 2003.06.00
This manual (the "Work") is protected under the copyright laws of the United States and/or
other jurisdictions, as well as various international treaties. Any reproduction or distribution of
the Work is expressly prohibited without the prior written consent of Rational Software
Corporation.
The Work is furnished under a license and may be used or copied only in accordance with the
terms of that license. Unless specifically allowed under the license, the Work or copies of it may
not be provided or otherwise made available to any other person. No title to or ownership of
the manual is transferred. Read the license agreement for complete terms.
Rational Software Corporation, Rational, Rational Suite, Rational Suite ContentStudio, Rational
Apex, Rational Process Workbench, Rational Rose, Rational Summit, Rational Unified process,
Rational Visual Test, AnalystStudio, ClearCase, ClearCase Attache, ClearCase MultiSite,
ClearDDTS, ClearGuide, ClearQuest, PerformanceStudio, PureCoverage, Purify, Quantify,
Requisite, RequisitePro, RUP, SiteCheck, SiteLoad, SoDa, TestFactory, TestFoundation, TestMate
and TestStudio are registered trademarks of Rational Software Corporation in the United States
and are trademarks or registered trademarks in other countries. The Rational logo, Connexis,
ObjecTime, Rational Developer Network, RDN, ScriptAssure, and XDE, among others, are
trademarks of Rational Software Corporation in the United States and/or in other countries.
All other names are used for identification purposes only and are trademarks or registered
trademarks of their respective companies.
Portions covered by U.S. Patent Nos. 5,193,180 and 5,335,344 and 5,535,329 and 5,574,898 and
5,649,200 and 5,675,802 and 5,754,760 and 5,835,701 and 6,049,666 and 6,126,329 and 6,167,534
and 6,206,584. Additional U.S. Patents and International Patents pending.
Warranty Disclaimer
This document and its associated software may be used as stated in the underlying license
agreement. Except as explicitly stated otherwise in such license agreement, and except to the
extent prohibited or limited by law from jurisdiction to jurisdiction, Rational Software
Corporation expressly disclaims all other warranties, express or implied, with respect to the
media and software product and its documentation, including without limitation, the
warranties of merchantability , non-infringement, title or fitness for a particular purpose or
arising from a course of dealing, usage or trade practice, and any warranty against interference
with Licensee's quiet enjoyment of the product.
Third Party Notices, Code, Licenses, and Acknowledgements
Portions Copyright ©1992-1999, Summit Software Company. All rights reserved.
Microsoft, the Microsoft logo, Active Accessibility, Active Client, Active Desktop, Active
Directory, ActiveMovie, Active Platform, ActiveStore, ActiveSync, ActiveX, Ask Maxwell,
Authenticode, AutoSum, BackOffice, the BackOffice logo, bCentral, BizTalk, Bookshelf,
ClearType, CodeView, DataTips, Developer Studio, Direct3D, DirectAnimation, DirectDraw,
DirectInput, DirectX, DirectXJ, DoubleSpace, DriveSpace, FrontPage, Funstone, Genuine
Microsoft Products logo, IntelliEye, the IntelliEye logo, IntelliMirror, IntelliSense, J/Direct,
JScript, LineShare, Liquid Motion, Mapbase, MapManager, MapPoint, MapVision, Microsoft
Agent logo, the Microsoft eMbedded Visual Tools logo, the Microsoft Internet Explorer logo, the
Microsoft Office Compatible logo, Microsoft Press, the Microsoft Press logo, Microsoft
QuickBasic, MS-DOS, MSDN, NetMeeting, NetShow, the Office logo, Outlook, PhotoDraw,
PivotChart, PivotTable, PowerPoint, QuickAssembler, QuickShelf, RelayOne, Rushmore,
SharePoint, SourceSafe, TipWizard, V-Chat, VideoFlash, Visual Basic, the Visual Basic logo,
Visual C++, Visual C#, Visual FoxPro, Visual InterDev, Visual J++, Visual SourceSafe, Visual
Studio, the Visual Studio logo, Vizact, WebBot, WebPIP, Win32, Win32s, Win64, Windows, the
Windows CE logo, the Windows logo, Windows NT, the Windows Start logo, and XENIX, are
either trademarks or registered trademarks of Microsoft Corporation in the United States
and/or in other countries.
Sun, Sun Microsystems, the Sun Logo, Ultra, AnswerBook 2, medialib, OpenBoot, Solaris, Java,
Java 3D, ShowMe TV, SunForum, SunVTS, SunFDDI, StarOffice, and SunPCi, among others, are
trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Purify is licensed under Sun Microsystems, Inc., U.S. Patent No. 5,404,499.
Licensee shall not incorporate any GLOBEtrotter software (FLEXlm libraries and utilities) into
any product or application the primary purpose of which is software license management.
BasicScript is a registered trademark of Summit Software, Inc.
Design Patterns: Elements of Reusable Object-Oriented Software, by Erich Gamma, Richard
Helm, Ralph Johnson and John Vlissides. Copyright © 1995 by Addison-Wesley Publishing
Company, Inc. All rights reserved.
Additional legal notices are described in the legal_information.html file that is included in your
Rational software installation.
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Other Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
XDE Integrations With Other Rational Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Contacting Rational Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
v
3 Working Without Configuration Management. . . . . . . . . . . . . . . . . . . 39
The Analyst Role. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Sharing Files by E-Mail or in Common Directories . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Sharing Models Without a Configuration Management System . . . . . . . . . . . . . . . . 40
Recognizing That You Need to Use Configuration Management . . . . . . . . . . . . . . . 41
Contents vii
Navigating Through Differences and Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Auto-Advance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Merge Phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Manually Resolving Differences and Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Resolving Differences and Conflicts Individually . . . . . . . . . . . . . . . . . . . . . 76
Resolving Several Differences and Conflicts At Once . . . . . . . . . . . . . . . . . 77
Example Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Model Merging Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Updating Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Resolving Conflicts Consistently . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Merge Granularity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Optimizing XDE Compare/Merge Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Optimizing Performance: Key Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Factors That Affect XDE Compare/Merge Performance . . . . . . . . . . . . . . . . . . . 82
Checkin Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Modifying Versus Adding To a Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Other Factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Evaluating Risk Factors Early In the Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Example Scenarios. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Working With a Single Branch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Working With a Main Branch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Working With UCM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Working Without Configuration Management . . . . . . . . . . . . . . . . . . . . . . . 85
Working In Parallel Development: Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Merging Into the Common Model Separately. . . . . . . . . . . . . . . . . . . . . . . . 86
Example: Working In Parallel Development . . . . . . . . . . . . . . . . . . . . . . . . . 86
Contents ix
System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Team Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Release Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Example: Multiple Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Situation 1: Simple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Situation 2: More Complex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Example: Multiple GUIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Refining the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Administrative Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Storing Multiple Components in a Single VOB. . . . . . . . . . . . . . . . . . . . . . 120
Managing Complexity: Read-only or Unavailable Components . . . . . . . . . 121
Designing Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Other Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Adding a Component to an Existing Environment . . . . . . . . . . . . . . . . . . . . . . 122
Relating Component Design to Release Planning . . . . . . . . . . . . . . . . . . . . . . . . . 122
Composite Baselines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Promotion Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
10 Scenario: Rational XDE and Base ClearCase With IBM WSAD . . . . 125
Before You Begin: Installing and Configuring Software. . . . . . . . . . . . . . . . . . . . . . 125
Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Setting Up the ClearCase LT 2003 Environment . . . . . . . . . . . . . . . . . . . . 125
Using ClearCase 2003 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Setting Up the User Community . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Configuring ClearCase Groups and Environment Variables . . . . . . . . . . . 126
Setting Up the ClearCase Environment . . . . . . . . . ...... ....... ...... ..... 127
Planning VOBs . . . . . . . . . . . . . . . . . . . . . . . . . ...... ....... ...... ..... 128
Creating VOBs . . . . . . . . . . . . . . . . . . . . . . . . . ...... ....... ...... ..... 128
Creating a View . . . . . . . . . . . . . . . . . . . . . . . . ...... ....... ...... ..... 128
Starting XDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Creating a Java Modeling Project and XDE Models . . . . . . . . . . . . . . . . . . . . . . . . 129
Creating a Java Modeling Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Validating Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Creating XDE Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Dividing a Model to Allow Concurrent Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Composite Object Versioning Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Navigator Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Dividing a Model Into Subunits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Adding Java Classes to the Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Contents xi
Creating XDE Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Dividing a Model to Allow Concurrent Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Composite Object Versioning Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Navigator Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Dividing a Model Into Subunits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Adding Java Classes to the Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Generating Code for the Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Saving, Validating, and Checking In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Creating a Project Set File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Adding the Project Set File to Source Control . . . . . . . . . . . . . . . . . . . . . . 162
Delivering to the Integration Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Viewing the ClearCase Branch Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Loading the Project Set in a New View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Testing the Delivery in the Integration View . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Completing the Delivery to the Integration Stream . . . . . . . . . . . . . . . . . . . . . . 165
Creating and Recommending a Baseline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Creating a Baseline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Recommending a Baseline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Developing as Part of a Team . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Setting Up the Developers’ Work Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Joining the UCM Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Starting to Work in XDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Adding to the XDE Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Creating Cross-Model References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Delivering to the Integration Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Creating and Recommending a Baseline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Rebasing as dev2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Importing the Project Set File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Tips for Working with ClearCase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Starting Parallel Development: Comparing and Merging Models . . . . . . . . . . . 171
Introducing Conflicts into the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Resolving the Conflict . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Refactoring: Adding, Moving, and Deleting Files . . . . . . . . . . . . . . . . . . . . . . . 174
Resolving Broken Cross-Model References . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Contents xiii
Resolving Broken Cross-Model References . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Contents xv
xvi Rational XDE Guide to Team Development
Tables
xvii
xviii Rational XDE Guide to Team Development
Preface
This manual provides information on planning, setting up, and working in a Rational
XDE team development environment. This manual also includes sample workflows
that describe how to integrate XDE with Rational ClearCase.
Audience
This manual is intended for administrators, project managers, and all members of the
software development team, including configuration managers, software architects,
and developers.
Other Resources
■
All manuals are available online, either in HTML or PDF format. The online
manuals are on the Rational Solutions for Windows Online Documentation CD.
■
To send feedback about documentation for Rational products, please send e-mail
to techpubs@rational.com.
■
For more information about Rational Software technical publications, see:
http://www.rational.com/documentation.
■
For more information on training opportunities, see the Rational University Web
site: http://www.rational.com/university.
■
For articles, discussion forums, and Web-based training courses on developing
software with Rational Suite products, join the Rational Developer Network by
selecting Start > Programs > Rational Suite > Logon to the Rational Developer
Network.
xix
XDE Integrations With Other Rational Products
Note: When you contact Rational Technical Support, please be prepared to supply the
following information:
■
Your name, company name, telephone number, and e-mail address
■
Your operating system, version number, and any service packs or patches you
have applied
■
Product name and release number
■
Your case ID number (if you are following up on a previously reported problem)
Understanding Roles
This manual refers to roles that perform team development tasks. The following table
describes these roles.
Role Description
Architect Designs initial model steps, model packages, and system model parts.
Developer Adds classes; establishes and maintains file directories; manages personal
ClearCase environment.
23
The correspondence of these roles to the people on your project varies depending on
the size of your project:
■
On a small project, one person might play many roles. For example, the person
you think of as the team leader might take on all leader, administrator, and
manager roles, while another two people might act both as architect and
developer.
■
On a medium project, you might work with an IT department that handles
installation and configuration of all tools, while other team members fill the other
roles.
■
On a large project, each role might be filled by multiple people. In this case, you
may want to designate one person on each role-team who serves as an interface to
the other teams.
10 Scenario: Rational XDE and Base ClearCase With IBM WSAD (1) Architect
11 Scenario: Rational XDE and UCM With IBM WSAD(1) Configuration Manager
Developer
12 Scenario: Rational XDE and Base ClearCase With Microsoft
VS.NET(1)
(1) These chapters describe sample team development scenarios that may be of interest to all roles.
27
Table 3 describes common software development problems and ways that CM can
contribute to the solution.
Problem CM Recommendation
Increasing software system Regularly evaluate and tune your CM processes and use CM
complexity tools that are easily customized and highly scalable. For more
information, see Increasing Software System Complexity on
page 28.
Increasing project Use scalable CM tools and processes. For more information,
environment complexity see Increasing Project Environment Complexity on page 28.
Identifying and meeting team Use CM tools and processes that meet the needs of your team.
needs For more information, see Identifying Configuration
Management Needs on page 29.
Major 1 to 10 cooperating teams of [All of the above] plus some or all of the following:
2 to 30 members each, with ■ Component-based development
fewer than 150 total
members, working toward
■ Activity-based configuration management
a common release of one or ■ Geographically distributed development. For
more products in a product more information, see Planning for
family Geographically Distributed Development on
page 35.
Parallel Development
Parallel development allows users to work on multiple software releases at the same
time. Multiple users can also work on the same files at the same time. Parallel
development frees users from the constraints of serial development, where one user
completes one task before the next user can begin another. Because users do not own
separate software system components, they do not need to request permission to
change each other’s files.
Parallel development is essential for large teams and teams that share high-traffic
files. Other development environments that can benefit from parallel development
include those in which:
■ Users check out files for long periods of time.
■ Users make changes to interfaces and also update the code that uses those
interfaces.
■ Teams require continuous or frequent builds; to improve reliability, users can test
and build software before they submit the software for a build.
■ Major software interfaces change, which affects the files of multiple users. Users
must carefully coordinate changes to shared files; if they do not, the software
cannot be built.
If you incorporate parallel development into your environment, ensure that the CM
tool you use has good file merging capabilities. When multiple users work on the
same files at the same time, they will eventually make conflicting changes that must
be resolved by a good file merging tool. For more information, see How Parallel
Development Can Help Your Team on page 32.
Component-Based Development
Component-based development is the development of a software system by
decomposing it into smaller pieces called components, either during design or while
rearchitecting an existing system.
Components have well-defined interfaces and can have build-time or run-time
dependencies on other components. For CM purposes, you need to be able to do the
following:
■ Identify component versions.
■ Assemble a consistent set of component versions so that you can always create a
version of the system as a whole.
❑ Identify who is responsible for the managerial issues the project encounters.
Planning Communication
To communicate effectively in a geographically distributed environment, teams must
have a common vision of how the system will work, expressed in an agreed-upon
system architecture. Teams must carefully plan how they divide and assign features
for development.
To develop a good communication environment, you must:
You need strong communication channels during architectural definition and system
integration; however, during the development of each individual component, the only
time the team must communicate is when the component interfaces require
clarification or modification.
Infrastructure Technologies
Infrastructure technologies establish an effective distributed software development
environment. These technologies include the CM tool and process, compiler, and
integrated development environment (IDE). When planning which infrastructure
technologies to use on a project, consider the following:
❑ There must be a clear distinction between which site currently owns which
parts of the shared data.
❑ Ensure that the CM tools and processes you use are flexible and can
accommodate any possible rapid team growth.
39
Sharing Files by E-Mail or in Common Directories
If you share files by e-mail, you have probably developed a simple, informal process
in which you have agreed on topics such as:
■ Who owns which file. (It’s important to be clear about this so that, at most, only
one person works on any given file.)
■ How often or at what point you will e-mail the file. (When using these informal
systems, it reduces confusion to exchange files as infrequently as possible.)
■ How you will create occasional snapshots of the shared files that everyone can use
as a basis for further work.
If e-mailing shared sets of files becomes too complex, you can use a shared folder to
distribute these files. As the owner of the folder, your responsibilities include:
■
Determining and communicating how often updated files need to be placed in the
shared folder
■
Verifying that sets of files work together
■
Maintaining security and access privileges
■
Developing a model versioning strategy, if required
43
Deciding Whether to Partition Models
This section discusses the benefits and the drawbacks of partitioning an XDE model
into subunits.
Faster Loading
When XDE loads a model, it loads only the minimal set of subunits required;
therefore, when you partition a large model into many subunits, the model loads
more quickly than the same model stored in a single file.
Out-of-Context Merging
When Rational ClearCase initiates merges, it performs them one file at a time, which
causes XDE to merge a single model storage unit at a time. For example, when you
deliver an activity, a new XDE compare/merge session begins for each individual
conflicting storage unit included in the activity’s change set. Because these merge
sessions are done without the context of the other storage units, the validation
capabilities of the tool are limited during the merge to the one storage unit. You
cannot validate files that are out-of-context.
Model Ownership
At the simplest level, you can assign a single owner for each model. Only one person
makes changes to that model, so no merges are necessary. The XDE multiple model
capability lets you work with a large system that contains many smaller models.
Typically, there is one master model with a diagram referencing others. The master
model serves as the root for someone who wants to explore a system.
To practice model ownership, establish the size and scope of each model so that a
single person can work on it.
Package Ownership
If model ownership is not practical, you can practice package ownership. With this
policy, each individual is responsible for the contents of a package. Adding a new
package directly under the model results in a change to the root of the model (because
it has a new child) but most other changes within the separate packages do not affect
the root model file (the .mdx file). Individuals can work on their own packages
without needing to perform many merges. Occasionally, you will be required to
perform merges that involve the root unit of the model, but these merges should be
infrequent and, in many cases, are silent merges that do not require user intervention.
Subunit Ownership
If package ownership is not practical, you can create subunits to avoid more than one
person working in the same area at the same time. This lets you implement a storage
unit ownership policy.
Consider the following example:
■ Several people may need to work at the same time on individual classes in a
particular package. If you’re working with a language such as Java, the language
structure might dictate that the classes all reside in the same package.
❑ You can separate the classes into their own subunits, so that the developers can
work on each class in parallel without triggering complex merges.
❑ If, instead, the classes are combined with their package, then each person
changes the same file, which requires merges. Even though many of these
merges are silent merges not requiring user intervention, silent merges take
time. On the other hand, using separate units results in trivial merges, where
the latest version is added to the repository with no merge needed.
When ownership is assigned to the different parts of a model, only owners of a
particular storage unit can modify it. Because ClearCase and XDE currently do not
provide easy ways to enforce such a policy, you must set up a process to
accommodate this practice. Some teams prefer to relax these rules by letting other
team members modify a storage unit, with the approval of the owner.
51
5 ClearCase detects that the latest version in the repository is not the version you
checked out and modified.
6 ClearCase detects that your version cannot replace the version in the repository
without deleting your colleague’s changes.
7 ClearCase attempts to merge your changes into the latest version in the repository.
Merging Silently
In the example above, ClearCase prompts you to merge. If you do not select the
graphical merge option, ClearCase attempts to merge the model silently (that is,
without presenting a user interface to you). If you and your colleague made changes
to independent areas of the model, the silent merge succeeds and no XDE merge
session is required. For example, if you rename one class and your colleague adds an
operation to some other class, then these two changes are independent of one another
and there are no conflicts.
The example above refers to a Base ClearCase environment. In a Unified Change
Management (UCM) environment, you have the option to merge graphically when
you initiate a deliver operation (on the Deliver from Stream Preview dialog box).
Merging Conflicts
If a change that you make conflicts with a change your colleague makes, then the
silent merge cannot complete. For example, if both of you rename the same class, then
the silent merge fails and a graphical XDE merge session starts so that you can resolve
the conflict.
Of course, if you select the graphical merge option during a merge, a graphical XDE
merge session starts even if XDE only encounters differences (no conflicts) during the
merge.
Setting Preferences
You can set a preference to automatically make all subsystems and packages subunits
when they are created. You can also set a preference to warn against the creation or
deletion of subunits.
If you are working in an XDE merge session, then you can end the session by
performing either of the following steps:
■
Commit the current merge result to ClearCase (File > Compare/Merge > Save and
Commit ClearCase Session).
■
Cancel the merge session (File > Compare/Merge > Cancel Session). The ClearCase
command that initiated the session interprets this action as a failure.
Once you have selected your contributors and base model, you begin an XDE
compare or merge session by clicking either the Compare or Merge button on the
Select Contributors dialog box.
Example
To understand the importance of selecting a base model, consider the following
scenario:
You compare two models, where one contributor has class A and the other does not.
Did one contributor add Class A or did the other delete Class A? If there is a common
ancestor, you can view it to determine whether Class A was present originally.
If the base model does not have Class A, then the first contributor added Class A.
If the base model has Class A, then the second contributor deleted Class A.
Selecting Subunits
After you choose the participants in your compare or merge session, you proceed to
the next step. If any models have subunits, you can choose the subunits to participate
in the session. You can compare or merge a single subunit or some subset of the
model.
Icon Description
XDE detects Add differences when an element within a contributor model is not
matched within the base model.
XDE detects Delete differences when an element within a base model is not
matched within a contributor model.
XDE detects a Move difference when an element is not in the same location within
a contributor model as it is within the base model.
Two icons represent a Move difference: the top icon in the left column (similar to a
Delete icon) indicates that an element was moved from a location; the other icon
(similar to an Add icon) indicates that an element was moved to a location.
A Reorder difference is a Move difference to another relative location under the
same parent element. The same icons are used for Reorder and Move differences.
Note: When there is more than one contributor, the contributor models are never
directly compared. Contributor models are only compared with the base model. XDE
analyzes and compares separate lists of differences and identifies conflicts.
Identifying Conflicts
A conflict is flagged whenever more than one contributor has a difference in a model
element or property relative to the base contributor.
The notation for a conflict is difference-difference; for example, a Change-Change conflict
means that a contributor and the base contributor have each changed the same model
element or property. For more information, see Identifying Differences on page 65.
The following table describes the types of conflicts that XDE identifies. For more
information, see Conflict Icons on page 94.
Icon Description
A Change-Change conflict is created when two contributors modify the same property
of an element. However, if the new value for the property is the same, the default
resolution is to accept the change.
Icon Description
A Delete-Delete conflict is created when two contributors delete the same element.
The default resolution is to delete the element, but you can review this decision.
If one contributor deletes an element and the other element deletes a descendant of
that element, a conflict is created. The default resolution of the conflict is to delete the
parent element, but you can review this decision.
A Move-Move conflict is created when two contributors move the same element.
However, if the destination is the same in both cases, the default resolution is to
accept the move.
Note: If two contributors conflict for more than one reason, the conflicts are
combined. For example, if one contributor deletes a package and another contributor
adds and moves items into that package, the resulting Add-Delete conflict and
Delete-Move conflict are combined, and are typically resolved simultaneously by the
same decision.
10 30 15 10 + 15 = 25
Note: Conflicts are the result of two (or more) differences, which are, or may be,
incompatible or mutually exclusive. For more information, see Identifying Conflicts on
page 66.
Understanding Auto-Resolve
The XDE compare/merge Auto-Resolve functionality helps to reduce the unresolved
count before the XDE merge session becomes interactive. The Auto-Resolve
functionality runs before the initial unresolved count is calculated and displayed. For
more information, see Understanding the Unresolved Count on page 68.
When XDE first begins a merge session, it applies the Auto-Resolve procedure to the
entire set of contributors with differences and conflicts that it can automatically
resolve, including:
■
Nonconflicting differences
■
Delete-Delete conflicts
■
Move-Move (same location) conflicts
■
Change-Change (same change) conflicts
For more information, see Identifying Conflicts on page 66.
If a contributor model that is not the base model includes a change (adds, modifies,
moves, or deletes an object), that change is applied to the merged (output) model.
XDE can select properties from different contributor models and merge them.
However, if two or more users change the same property, XDE cannot decide which
contributor to choose, and it generates a conflict which the user must then resolve.
Note: You can only manually perform the auto-resolve action (Merge > Auto-Resolve)
on an element that has been reverted to its unresolved state (Merge > Unresolve). If
you want to review the differences again, and possibly choose another resolution, you
can unresolve the element again. The differences become unresolved.
Contributor 1
Auto-Resolve State Contributor 2 Contributor 3 Result
(Base Model)
No change A A A A
Added -- A -- A
Changed A A B B
Moved A A B B
Deleted A A -- --
Change-Change A B C !
Conflict
Change-Delete A B -- !
Conflict
Add-Add Conflict -- B C !
Contributor 1
Auto-Resolve State Contributor 2 Contributor 3 Result
(Base Model)
No change A A A A
Added -- A -- A
Changed A A B ! (1)(2)
Moved A A B ! (1)(2)
Change-Change A B C ! (1)
Conflict
Change-Delete A B -- ! (1)
Conflict
Add-Add Conflict -- B C !
(1) These cases are rare if the base model is an empty model.
(2) These results differ from the results in Table 7 on page 71. These results occur to reduce the risk of
accidental data loss.
“-” means the contributor is not available.
“!” means there is no automatic resolution.
Note: Only the role of the base model is fixed in the Auto-Resolve procedure. The
order of the other contributors is not important. For example, you can switch the
positions of Contributor 2 and Contributor 3 without affecting the results of the
procedure.
In Table 8, there is no common ancestor. However, you must designate a base
contributor, but you should not expect to see the same GUIDs in the various
contributors. Where there is a common ancestor, on the other hand, it is common for
the same model element to appear in all contributors with the same GUID in all cases.
Without a common ancestor, there are cases where Table 8 differs from the common
ancestor table (Table 7). For example, the Changed or Moved case now results in a
conflict. Ultimately, without a common ancestor to establish history, you are less
certain that the merge result is the result you want.
Auto-Advance
You can move through the merged model and make changes manually, or you can use
the Auto-Advance functionality to allow XDE to automatically move to the next
unresolved difference or conflict after you resolve a difference or conflict. By default,
the Auto-Advance functionality is set to Next Unresolved Difference when you load the
model files.
You can specify whether to advance to the Next Unresolved Difference, which includes a
difference involved in a conflict, or the Next Difference. After you accept a change in
the model, XDE automatically moves the current selection in either the Comparative
Model Explorer or the Comparative Property Browser to the next unresolved
difference (or difference).
Figure 1 illustrates the three Auto-Advance toolbar buttons. From left to right, the
buttons are: Do Not Auto-Advance, Next Unresolved Difference, and Next Difference.
You can disable the Auto-Advance functionality by selecting the Do Not Auto-Advance
toolbar button.
Merge Phases
Each merge session consists of two separate phases:
■
The semantic phase, in which you resolve any conflicts that involve the model
elements of your model other than those on diagrams.
■
The diagram phase, which begins automatically after you complete the semantic
phase, so that you can resolve any conflicts on diagrams.
Resolve Using
The Resolve Using action changes the resolution of a difference (or conflict) to match
the specified contributor. If a contributor did not participate in a difference or conflict,
that contributor is not available as a choice for the Resolve Using action. The Resolve
Using Contributor 1 action is always an option for any difference because you can
always revert a difference to its state in the base model.
The Resolve Using action is typically the most common action performed during an
XDE merge session. The Resolve Using action is also available from the toolbar (one
button for each contributor).
Auto-Resolve
You can also perform the Auto-Resolve action for a selected difference. When XDE first
begins a merge session, it applies the Auto-Resolve action to the entire set of
contributors with differences and conflicts that it can automatically resolve. For more
information, see Understanding Auto-Resolve on page 70.
Reapplying the Auto-Resolve action is useful if a difference was originally unresolved
because of its dependency on an unresolved conflict, and that conflict has now been
resolved. The Auto-Resolve action is also useful if you have been experimenting with a
difference’s resolution, and you want to restore it to the auto-resolved value.
Note: You can only perform the Auto-Resolve action on differences that are
unresolved. If a difference is resolved, you must first unresolve that difference, as
described in the following section.
Unresolve
You can use the Unresolve action to undo a difference’s resolution, and add it to your
unresolved count. The Unresolve action is necessary if you want to reapply the Auto
Resolve action on a difference.
Note: You do not need to unresolve a resolved difference before manually resolving it
in favor of a different contributor; you can always manually change a resolution.
Subtree Mode
Subtree mode allows you to simultaneously change the resolution of all differences on
elements that are contained under a selected element. For example, when you select a
package in Subtree mode, the Resolve Using action propagates to all differences on all
elements nested within that package, resolving the entire package to use the specified
contributor. In Subtree mode, the selected element does not need to have a difference
to enable all possible Resolve Using contributors.
You can perform the following merge actions in Subtree mode:
■ Resolve Using
■ Unresolve
■ Auto-Resolve
You can switch Subtree mode on and off. Switch Subtree mode off to resolve an
individual element without affecting its sub-elements.
Subtree mode can be viewed and switched on and off from the toolbar.
Example Scenarios
Consider the following example:
1 You have a base model, Contributor 1, with classes C1, C2, and C3.
2 Contributor 2 renames C1 to Class1 and C2 to Class2.
3 Contributor 3 renames C2 to MyClass2 and C3 to MyClass3.
The following table describes the changes each contributor makes and the merge
result (with auto-resolved differences):
C1 Class1 C1 Class1
C2 Class2 MyClass2 !
C3 C3 MyClass3 MyClass3
At the start of the merge session (with auto-resolved differences) the class names are
Class1, C2, and MyClass3.
■ Class1 is applied automatically because only one user, Contributor 2, changed it
relative to the base.
■ ! is in the merge result because both Contributors 2 and Contributor 3 changed the
name of that class and the two differences (Class2 and MyClass2) are not the same
values. Therefore, there is no automatic resolution.
C1 Class1 C1 Class1
C3 C3 MyClass3 MyClass3
If you apply the Resolve All Using Contributor 2 command and revert non-conflicting
changes, the merge result accepts all of Contributor 2’s changes, as described in
Table 11.
Note: To revert non-conflicting changes, on the Resolve-Using Options dialog box,
select the Revert non-conflicting changes check box. For more information, see
Reverting Changes From Other Contributors on page 77.
C1 Class1 C1 Class1
C3 C3 MyClass3 C3
Updating Diagrams
Some semantic changes that occur during an XDE compare/merge session can cause
pending side-effects on diagrams, particularly when auto-resize is enabled. For
example, a user may increase the required size of a class by giving an attribute a
longer name, or adding or deleting an operation. If that class appears on your
diagram and it is not updated, XDE compare/merge functionality may not detect that
a change is required. XDE performs the auto-resize calculation on your diagram the
next time you open it.
While many types of pending diagram changes are minor, to accept these changes in a
CM environment, you have to check out your diagram the next time you open it after
a successful merge and save the changes. You can prevent these pending side-effects
by opening your diagrams during or after an XDE compare/merge session but before
committing the merged model. After all subunits are merged, perform the following
steps:
1 Open your model.
2 Open and review all of your diagrams.
3 Save any changed diagrams.
4 Check in all of your checked-out files.
The diagrams you check in will contain the updated auto-resize calculations.
Other Factors
Other general factors that can affect XDE compare/merge performance include the
following:
■
Workstation and network performance.
■ How complex the structure and organization of your models are.
■ The number of differences that result from the types of changes you make.
89
The Comparative Model Explorers
When an XDE compare/merge session starts, you see several key windows. The
window on top has two tabs, the Semantic Comparative Model Explorer (SCME) and
the Diagram Comparative Model Explorer (DCME). Initially, the SCME is in front, so
that you can resolve the semantic conflicts first. For more information, see Merge
Phases on page 74.
When you resolve a model element semantic conflict in favor of a deletion, that
conflict resolution decision automatically resolves related conflicts on diagrams, so
that views of the deleted element are automatically deleted. Therefore, it’s more
efficient to resolve conflicts in the SCME first. However, you can switch to the DCME
at any time by clicking the tab.
The Comparative Model Explorers (CME) let you:
■
Move from one selected difference or conflict to another.
■
Skip intervening elements that are not changing.
■
Use the Auto-Advance command to automatically move a selected element to the
next operation (specified in the Auto-Advance settings) after you accept a change
in the model.
The Comparative Model Explorer windows both show several major columns. If this
is a merge session, the first column holds the current merge result model. This column
is not present for compare sessions. The next major column holds the base contributor.
The other major columns hold the remaining contributors.
Each row in the Comparative Model Explorer corresponds to a single model element
across all contributors and the merge result. If a contributor does not have that model
element, then that row is blank in that contributor’s column.
Table 12 describes columns in the Comparative Model Explorer.
Column Description
Column Description
Note: Although the DCME describes information related to diagrams, it does not
show actual diagrams. Instead, it shows a tree list of each element associated with the
diagram.
Unnamed Elements
Some object names that appear in the Model Explorer are derived from
supplementary information that is not stored as a name. This supplementary
information is not always derived from the Comparative Model Explorer. For
example, an Association may appear as (:Class1)(:Class2) in the Model Explorer but as
an unnamed Association in the Semantic CME. The information from which the name is
derived typically appears in the Comparative Property Browser for the element or one
of the element's children.
Examples of items that may appear in the Comparative Model Explorer without their
derived names are as follows:
■
an unnamed AssociatedClass
■
an unnamed Association
■
an unnamed Dependency
■
an unnamed Extend
■
an unnamed Generalization
Icon Description
Added element
Deleted element
Element moved (in the location from which the element was moved)
Note: A reorder is a subcase of a move in which the source and
destination parent of the moved object are the same. The same icon is
used for moves and reorders.
Element moved (in the location to which the element was moved)
Icon Description
Add-add conflict
Resolution Icons
When you resolve a difference or conflict in your model, XDE displays a resolution
icon. A resolution icon represents the contributor selected to resolve the difference or
conflict. XDE accepts up to seven contributor models for merging (including a base or
root model).
Table 15 identifies a few sample resolution icons that appear beside each resolved
element in the Resolution (R) status column in the Comparative Model Explorer and
in the Comparative Property Browser.
Icon Description
Column Description
Column Description
Property Identifies, for each row, the name of the property being displayed in
that row.
D Displays icons for each difference between the contributor to the
immediate right of this column and the base contributor. Because
the contributor to the immediate right of this column is the base
contributor, this column only shows the green check mark or the
revert icon.
[1] Base Displays the model elements of the base contributor.
D Displays icons for each difference between the contributor to the
immediate right of this column and the base contributor.a
Below the Comparative Property Browser is an area that contains two tabbed
windows: the Comparative Property Explorer (CPE) and the Differences Explorer
(DE).
Profiles
XDE uses Profiles to store additional feature-specific information that a user rarely
changes. A Profile is a collection of tagged value sets that belong to a model and can
be applied to elements within that model. Examples include Profiles for Java language
support and for Patterns. Profiles appear as direct children of the root model element.
Tagged value sets in Profiles are a collection of feature-specific default data that can be
applied to various types of model elements in the model. Tagged value sets can
contain tagged values and/or tag definitions. For more information, see Tagged Values
on page 98.
Profiles are typically hidden from the Model Explorer but can be viewed through the
Comparative Model Explorer because there can be differences with Profiles among
contributors in an XDE compare/merge session.
Note: Profiles change rarely and only by indirect user actions.
Tagged Values
XDE annotates model elements with UML tagged values that associate information
with those elements. A tagged value has a tag definition that defines its default value.
There are different types of tagged values for different types of data.
Tagged values are stored within tagged value sets in model Profiles and within styles
on diagrams. Tagged values can be owned by any model element. You can override
the feature-specific default values stored in a tagged value set that a model element
references.
Note: Tagged values change rarely and only by indirect user actions.
103
Figure 3 Local and Cross-Model References
Source-Relative References
A source-relative reference is a cross-model reference that XDE automatically
generates when you drag a model element from one model to another. Source-relative
references are the default cross-model reference type in XDE.
Note: We recommend using source-relative references in most modeling
environments, especially environments that use source control. For more information,
see Working With Source-Relative References on page 105.
XDE resolves source-relative references through a relative path from the unit that
contains the reference. With relative path resolution, you can copy, e-mail, or move file
sets from one file location to another and retain the source-relative references.
To Create a Source-Relative
IDE Project Project Contents
Reference:
proj1 ■
Code model with a main diagram Drag class1 onto the code model
■ Model element called class1 main diagram in proj2
proj2 ■ Code model with a main diagram Drag class2 onto the code model
■
Model element called class2 main diagram in proj1
What Is UCM?
UCM is Rational Software’s approach to managing change in software system
development from requirements to release. UCM spans the development lifecycle and
defines how to manage change to requirements, visual models, documentation,
components, test cases, and source code.
109
Why Use UCM?
Rational customers and employees have successfully used ClearCase for years.
During that time, common patterns have emerged regarding how users set up and
use the tools. Based on our experience and observations, we have created UCM, a
process that helps you get started with ClearCase quickly and easily.
UCM raises the level of abstraction of working with configuration management (CM)
and change management tools. For example, in a typical CM environment, you need
to track the individual files to change. By contrast, with UCM, you work on activities,
letting the tools keep track of the details for you (for example, which files have
changed).
Rebase
work area
Deliver Work on
activities activities
Integrate Promote
work Development cycle baselines
UCM Basics
UCM provides a complete, out-of-the-box, activity-based change management
process.
Project
UCM organizes development work into projects. The UCM project includes policies
that govern how developers access and update the artifacts (typically, the files and
directories) used in their development effort.
Component
Each project has one or more UCM components, which are groupings of related sets of
files. For example, you might have one UCM component for each of the following
parts of your project: the GUI, the data definitions, and the business logic.
Activity
A UCM activity is a piece of work to accomplish in order to advance the state of your
project. In UCM, an activity is an object that tracks the work required to complete a
development task.
Stream
A stream helps define your workspace. A project has one integration stream, which is
part of the public workspace, and multiple development streams, each of which is
part of a developer’s private workspace. To complete each workspace, you need a
view, described on page 115.
You typically work in a development stream and then deliver your work to the
integration stream. The development stream tracks the activities assigned to you and
lets you work in isolation from the rest of the project team.
Baseline
A baseline is a collection of some or all of the activities delivered to date. A baseline
provides a common starting point for all developers on your project: you can rebase
your development stream so that it contains the changes in the most recent
recommended baseline.
In Figure 7, the branch structures demonstrate how ClearCase lets your team work in
parallel on the same element. Some groups use this branching feature to work on
more than one release of software at a time. UCM uses branches to provide private
work areas (development streams and views) and the public work area (the
integration stream and view).
The arrows from one branch to another represent the merge actions, which lets you
reconcile differences between versions of the same element on different branches.
These merges happen when you deliver work. ClearCase automates most merges,
making it easy to share information developed on separate branches.
Using ClearCase
Typically, you work with version-controlled files in a ClearCase view just as you work
with other files on a networked disk drive. You can open them, print them, and so on.
If you want to change a version-controlled file, however, you must check out the file
from the VOB. You can then edit the file and possibly unit test it. When you reach a
milestone (even if you have not completely finished working on the file), you check in
the file. The section, What Is UCM? on page 109, describes how this check-out, change,
check-in process fits into the general process of using UCM – working on activities
and delivering work to the integration stream.
Question Answer
How long does the design For a simple project, you can probably accomplish the design
process take? work quickly, perhaps over the course of one or two hours.
For a larger, more complex project, plan to allocate more time.
It is much easier to design and set up an environment right
the first time than to redo a poorly thought out design.
Who should participate in the The team of people who design your ClearCase UCM
design? environment should be fairly small. At least include a
development project leader and a software architect because
your design will be based, in part, on the architecture of your
software project.
What should result from the We recommend that as part of the design process, you create a
design process? plan outlining the decisions you make. This plan will be
important to the people who are implementing and
maintaining your environment, especially if those people do
not participate in the design process.
117
Designing UCM Components
UCM components let you manage the complexity of working with the many
directories and files associated with a software project. When you organize your
project into components, you can view the entire project as a smaller set of
components rather than as a larger set of files and directories. You can use the
components as building blocks for either configuring a product or for releasing it.
When you plan a UCM environment, you designate the components that your team
will work on. These components are separable, reusable parts of the larger project.
Often, you can implement, maintain, and build a UCM component separately from
other components. Roughly, a UCM component might correlate to a code subsystem.
At first glance, you may be tempted to create one UCM component for each
integrated development environment (IDE) project, for example, isolating the
implementation of an interface, or a subsystem, or a DLL. In some cases, this solution
may be right for your team. In this section, we discuss some of the considerations for
designing the component structure for your project.
System Architecture
Design your components to reflect your system architecture. So, for example:
■
If you’re using the traditional three-tier architecture – GUI (or presentation layer),
business rules, and data layer – start by designating three components.
■
If your product communicates with different databases, is the communication
code small, compact, and similar?
❑
If so, you might need just one component for that part of the project.
❑
If not – that is, if the communication code requires many lines of code or each
database has different requirements – it will be easier to designate one
component per database that you communicate with.
■
Do you have many IDE projects? If so, you probably do not want the same number
of UCM components because it will be hard to manage that amount of complexity.
Instead, focus on the team structure and the release strategy, as described in the
remainder of this section.
Release Strategy
It is important to think about your release strategy during component design. For
example:
■
Say your system communicates with different vendor databases. Do you plan to
build, test, and release your entire product on your own schedule? Or will you
release different versions as the database vendors release new versions of their
databases? If you need to release based on an external schedule, we recommend
that you create several components, where each component represents one
database.
■
Do you develop in parallel? Do you need to support your subteams as they
independently develop and deliver parts of the software to each other? If so, your
team structure, system architecture, and component design should all work
together.
Situation 1: Simple
In one instance, two developers who sit next to each other implement five database
drivers. You release your work based on your company’s schedule, rather than on an
externally-imposed schedule.
In this situation, we recommend that you use one VOB and that you develop the
drivers either in one component or in five sub-VOB components. You might choose to
use five sub-VOB components to build in flexibility in case you need to create
baselines and release each database driver separately.
You have simple development needs; with two co-located developers,
communications are simple and direct. You are implementing, building, and releasing
all five drivers on the same schedule; you never need to treat them separately. One
VOB should be sufficient for this work.
Administrative Considerations
When you create, work with, and maintain a VOB, you add a small amount of
administrative overhead. Each VOB you create requires administrative and computer
resources (for example, process slots, and backup and restore services). The
requirements for each VOB are not necessarily significant, but they are cumulative, so
that the requirements for many VOBs can be significant.
Other Topics
For more information about working with multiple projects, engaging in parallel
development, and workspace management (working with projects and streams), see
Rational ClearCase Managing Software Projects.
3 Select the component and the baseline of the component to add to the project.
Selecting a baseline in effect specifies which version of the component to add to the
project.
4 To make the component modifiable, go to the Components tab of the project policy
property sheet and follow the instructions there.
Composite Baselines
Each component has its own baseline. However, if you are working with multiple
components, you can create a composite baseline. A composite baseline can select other
baselines, including composite baselines.
Promotion Levels
Baselines have attributes, called promotion levels, which you can use to indicate the
quality or stability of a baseline. The default ClearCase promotion levels are:
■
Rejected
■
Initial
■
Built
■
Tested
■
Released
Prerequisites
In this scenario, we assume that the following software is installed on client
workstations:
■
WSAD 5.0
■
Rational XDE Developer - Java Platform Edition 2003
■
ClearCase LT Client
125
■
The ClearCase Getting Started Wizard has been run on the ClearCase LT Server to
establish VOB storage locations.
Note: When you run the Getting Started Wizard, do not perform the Import Source
Files optional task. This task imports source files into a VOB named sources. In this
exercise, you create your own VOBs to store all source files.
■
All ClearCase LT Clients are configured to point to the ClearCase LT Server.
2 Click New.
3 In the New User Variable dialog box, set Variable name to
CLEARCASE_PRIMARY_GROUP. Set Variable value to development. Click OK.
The Environment Variables dialog box should include the highlighted line as follows:
Chapter 10 - Scenario: Rational XDE and Base ClearCase With IBM WSAD 127
Planning VOBs
As the number of files and directories in your system increases, you need a way to
reduce the complexity of managing them. VOBs are the ClearCase mechanism for
simplifying the organization of your files and directories. The elements that you
group into a VOB typically implement a reusable piece of your system architecture.
By organizing related files and directories into components, you can view your
system as a small number of identifiable components, rather than as one large set of
directories and files.
Creating VOBs
ClearCase stores file elements, directory elements, derived objects, and metadata in a
repository called a VOB.
Create three VOBs, one for each major IDE project:
1 Start the VOB Creation Wizard: click Start > Programs > Rational Software >
Rational ClearCase > Administration > Create VOB.
Creating a View
While logged in as vob_admin, create the administrator’s view so that you can create
and populate the initial framework projects and file artifacts:
1 Start the View Creation Wizard: click Start > Programs > Rational Software >
Rational ClearCase > Create View.
2 On the Choose a Project page, click No to the question about working on a project
in the ClearCase project tree.
Starting XDE
1 Start XDE: click Start > Programs > Rational Software > Rational XDE in ClearCase
View.
2 XDE prompts you to select the ClearCase view to use. Select vob_admin_view to
begin your work.
Your IDE starts.
Chapter 10 - Scenario: Rational XDE and Base ClearCase With IBM WSAD 129
❑
Assign the project name data_layer_project_1.
❑
Clear the Use default location check box.
❑
Specify the location by navigating to your view. Ensure that the project name is
specified in the path; for example:
C:\temp\views\vob_admin_view\atlas_data_layer\data_layer_project_1
❑ Click Finish.
A dialog box appears, prompting you to add the XDE Java code model to source
control.
4 On the Add Element(s) to Source Control dialog box, clear the Keep checked out
check box. Click OK.
A second dialog box appears, prompting you to add to source control. You see the
second dialog box as a side-effect of the integration: one is for the XDE models and
the second is for all other files.
5 Clear the Keep checked out check box. Click OK.
6 Follow Step 1 through Step 5 to create two more projects:
❑
Name: midd_tier_project_1
Example location: C:\temp\views\vob_admin_view\atlas_services\midd_tier_project_1
❑
Name: gui_project_1
Example location: C:\temp\views\vob_admin_view\atlas_gui\gui_project_1
Validating Models
We recommend that you validate your models frequently.
To validate a code model:
1 In the IDE, click the Navigator tab.
Note: You can also go to the Navigator by clicking Window > Show View >
Navigator.
Chapter 10 - Scenario: Rational XDE and Base ClearCase With IBM WSAD 131
The general purpose of COV is that operations performed on a single or subset of
subunits expand to include the entire file closure of the model. For example, if you
have a model with two classes, class1 and class2, which are both stored as separate
subunit files (class1.clx and class2.clx), and both class files are checked out, and you
attempt to check in just class1, the checkin automatically expands to include both
class1 and class2.
Note: COV applies within a single model only. Operations do not expand across
cross-model references to include all the referenced models.
For more information, see the XDE Help.
General Behavior
The usual CM dialog boxes are presented at the expected times. Users will observe
that there can be more files listed than were asked for. Users can override the COV
expanding behavior and deselect the additional files. Users can also cancel the entire
operation. It is recommended that users follow the suggestions and perform all the
operations on the entire set of units presented to ensure that a consistent and
complete baseline of model subunits is committed to the VOB at the same time. Users
in other views will then be able to update their models and see a consistent and
complete set of model elements.
Navigator Limitations
We recommend that you initiate CM operations from the Model Explorer because the
implementation of COV is more comprehensive from that window. In the Navigator,
the COV is only enabled if the selected unit is the root model file.
2 Under (gui_project_1) System Model, right-click Deployment and then click Make a
Separate Unit.
3 When you are prompted to check out the System Model file, click OK.
4 Repeat Step 2 to place the following model elements in separate files:
❑
Design
❑
Implementation View
❑
Use Cases
3 From the Toolbox in the left pane, navigate to Java > Java Class. Drag Java Class
to the Main diagram of Java Code Model.mdx.
The Create Java Class dialog box appears.
4 In the Name box, type FirstClass and click OK.
5 At the prompt to check out, click OK.
6 Repeat Step 2 to Step 5 to add a class called FirstClass to Java Code Model.mdx
under midd_tier_project_1.
Chapter 10 - Scenario: Rational XDE and Base ClearCase With IBM WSAD 133
1 Click Window > Preferences.
The Preferences dialog box appears.
2 Expand Rational XDE and then click Code-Model Synchronization.
If the AutoSync preference is cleared, generate code manually for the new classes
you created.
3 Click OK to close the Preferences dialog box.
To generate code manually for the classes:
1 In the IDE, click the Model Explorer tab.
2 In the Model Explorer, right-click (data_layer_project_1) Java Code Model and then
click Synchronize.
3 On the Add Element(s) to Source Control dialog box, clear the Keep checked out
check box and click OK.
4 Repeat Step 2 to Step 3 to generate code for the class in (midd_tier_project_1) Java
Code Model.
The File name box should show that atlas_projects.psf is located in your view,
under the gui_project_1 project directory. For example:
C:\temp\views\vob_admin_view\atlas_gui\gui_project_1\atlas_projects.psf
Note: Always save your Project Set File in a project directory that is within the
view that is associated with your workspace.
11 Click Finish.
Chapter 10 - Scenario: Rational XDE and Base ClearCase With IBM WSAD 135
4 Exit the IDE: click File > Exit.
5 Log out as vob_admin.
3 XDE prompts you to select the ClearCase view to use. Select dev1_view and click
OK.
Chapter 10 - Scenario: Rational XDE and Base ClearCase With IBM WSAD 137
❑
Under data_layer_project_1 [dev1_view], open data_model.mdx and create a
UML Use Case Package called data use cases.
7 Click File > Save All.
3 XDE prompts you to select the ClearCase view to use. Select dev2_view to begin
your work.
Your IDE starts.
4 Import the project set file to load the set of models into your environment: Click
File > Import.
5 On the Import page, select Team Project Set and click Next.
6 On the Team Project Set page, click Browse and navigate to the location of your
atlas_projects.psf file. The file is located in dev2_view (your development view),
under the gui_project_1 project directory. For example:
C:\temp\views\dev2_view\atlas_gui\gui_project_1\atlas_projects.psf
7 Select atlas_projects.psf and click Open.
8 Click Finish.
The three projects load into your IDE.
9 Update dev2_view: from the ClearCase toolbar, click Update View.
10 The ClearCase Snapshot View Update dialog box appears and shows what has
changed since the last update. Exit the dialog box: click File > Exit.
Chapter 10 - Scenario: Rational XDE and Base ClearCase With IBM WSAD 139
These actions synchronize the file system state on disk with the in-memory state of
the Navigator and the source control status.
Note: Certain ClearCase operations that trigger merges can be initiated from outside
the IDE for performance reasons. For more information, see Starting a Session In an
Existing XDE Instance on page 57.
4 Checks in file
(Next section) tries to check in, but needs
to merge first.
Suppose that two users make a conflicting change when they both change the same
element and check in their changes. This generates a merge conflict when the second
user starts to check in.
XDE’s compare/merge functionality allows you to compare and track different model
elements, identify the differences between them, and merge models.
2 In the Main diagram, click on the services use cases package and rename to dev2
middle tier.
6 Now repeat Step 1 to Step 5, this time logging in as dev1. Note the following:
❑ Rename the services use cases package to dev1 middle tier.
❑ When you are ready to check out the file, ClearCase prompts you to check the
file out unreserved because only one checkout per branch can be reserved and
dev2 holds the reservation.
7 Log in as dev2 again and check in your work as follows:
a Start XDE and, when prompted, select your view.
b In the Navigator, open services model.mdx.
c In the Model Explorer, right-click (midd_tier_project_1) services model and then
click Team > Check In.
d Click OK to complete the check in.
8 Quit the IDE. Click File > Exit.
Chapter 10 - Scenario: Rational XDE and Base ClearCase With IBM WSAD 141
5 Click OK.
A message appears saying that there are later versions of the file on this branch,
and asking whether you want to merge now.
6 Select the Merge the file graphically check box and click Yes.
Merging Changes
XDE automatically resolves each difference. The Comparative Model Explorer and
the Comparative Property Browser show the Conflict (C), Resolution (R), and
Difference (D) status columns for the merged model and the selected contributors.
A Merged column shows the resolutions applied to the individual model elements.
7 In the Semantic Comparative Model Explorer, select the model element showing
the conflict.
8 On the Merge menu, click Resolve Using > Resolve Using Contributor 3 to resolve
the conflict associated with the selected model element in the merged model with
the specified contributor 3.
9 Click File > Compare/Merge > Save and Commit ClearCase Session.
10 Before XDE closes, it prompts you to check in files. Click Yes.
The merge is now complete and the results are under ClearCase control.
6 Click Apply.
7 If you are prompted to check out, click OK.
You have now resolved the broken references in the data model.mdx file.
8 Check in all files.
Note: You can avoid resolving broken references this way by validating your models
before every check in.
This concludes the initial setup of a team development infrastructure.
Chapter 10 - Scenario: Rational XDE and Base ClearCase With IBM WSAD 143
144 Rational XDE Guide to Team Development
Scenario: Rational XDE
and UCM With IBM WSAD 11
This chapter helps you set up and work in an environment that demonstrates how
Rational XDE supports team development. You start a new project from Java project
templates and practice model-driven, team-oriented development.
The scenario in this chapter specifically involves two roles: configuration manager
and developer. The configuration manager’s user ID is ucm_admin. There are two
developers, whose user IDs are dev1 and dev2.
Note: The scenario in this chapter may also be of interest to other roles. For more
information, see Understanding Roles on page 23.
Prerequisites
In this scenario, we assume that the following software is installed on client
workstations:
■
WSAD 5.0
■
Rational XDE Developer - Java Platform Edition 2003
■
ClearCase LT Client
145
Using ClearCase 2003
You can also use ClearCase 2003 for this exercise. Some initial steps are different, but
the ClearCase setup environment (VOBs, views, and so on) is the same.
2 Click New.
3 In the New User Variable dialog box, set Variable name to
CLEARCASE_PRIMARY_GROUP. Set Variable value to development. Click OK.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 147
a Creating a development stream.
b Creating an integration stream.
c Creating a development view.
d Creating an integration view.
e Loading the new VOBs into your work area.
5 Register your UCM components as modifiable by:
a Adding foundation baselines to your UCM project.
b Changing UCM project policies for the UCM components.
6 Synchronize the integration stream.
7 Recommend a new baseline.
8 Rebase your development stream.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 149
Planning UCM Components
As the number of files and directories in your system increases, you need a way to
reduce the complexity of managing them. Components are the UCM mechanism for
simplifying the organization of your files and directories. The elements that you
group into a component typically implement a reusable piece of your system
architecture. By organizing related files and directories into components, you can
view your system as a small number of identifiable components, rather than as one
large set of directories and files.
Within a component, you organize directory and file elements into a directory tree.
You can convert existing VOBs or directory trees within VOBs into components, or
you can create a component from scratch.
Note: The directory and file elements of a component reside physically in a VOB. The
component object resides in a PVOB.
Creating VOBs
ClearCase stores file elements, directory elements, derived objects, and metadata in a
repository called a VOB. In ClearCase, a UCM component can be stored as the only
component in a VOB or as one of several components in a VOB. In this exercise we set
up the VOBs so that they can each contain one component only.
Create three VOBs, one for each major IDE project:
1 Start the VOB Creation Wizard: click Start > Programs > Rational Software >
Rational ClearCase > Administration > Create VOB.
Create work areas to populate the initial project framework and file artifacts.
To create a work area:
1 While logged in as ucm_admin, in the ClearCase Project Explorer, right-click
InitialProject and then click Join Project.
5 In the Where would you like the root of this view? box, specify the integration view
location (for example: C:\temp\views\ucm_admin_InitialProject_int) and click Next.
The Choose Components pages appears.
6 Select the Start component browser after creating view check box.
7 Clear the InitialComponent check box. Later, you create new components and add
them to the UCM project.
8 Click Finish.
The Confirm dialog box appears.
9 Click OK.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 151
10 When the Choose Elements to Load dialog box appears:
11 Click OK.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 153
5 Click OK.
The ClearCase Snapshot View Update window appears.
6 Click File > Exit.
Recommending a Baseline
You organize delivered activities into baselines. A baseline identifies one version of
every element visible in a component. Usually baselines go through a cycle of testing
and defect fixing until they reach a satisfactory level of stability. When a baseline
reaches this level, you designate it as a recommended baseline.
When developers join the UCM project, they populate their work areas with the
versions of directory and file elements represented by the UCM project’s
recommended baseline. Alternatively, developers can join the UCM project at a
feature-specific development stream level, in which case they populate their work
areas with the development stream’s recommended baseline. This practice ensures
that all members of the UCM project team start with the same set of files.
Recommend a new baseline to make the changes to your UCM project available to
developers.
To recommend baselines:
1 In the Project Explorer, right-click IntegrationStream and then click Recommend
Baselines.
Starting XDE
1 Start XDE: click Start > Programs > Rational Software > Rational XDE in ClearCase
View.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 155
3 On the XDE Java Project page:
❑
Assign the project name data_layer_project_1.
❑
Clear the Use default location check box.
❑
Specify the location by navigating to your view. Ensure that the project name is
specified in the path; for example:
C:\temp\views\ucm_admin_InitialProject\atlas_data_layer\data_layer_project_1
❑ Click Finish.
A dialog box appears, prompting you to add the XDE Java code model to source
control.
4 On the Add Element(s) to Source Control dialog box, clear the Keep checked out
check box. Click OK.
5 You may need to create a UCM activity to record the versions being created. If you
are prompted, create an activity with name initial add to source control.
A second dialog box appears, prompting you to add to source control. You see the
second dialog box as a side-effect of the integration: one is for the XDE models and
the second is for all other files.
6 Clear the Keep checked out check box. Click OK.
7 When you are prompted for an activity, reuse the existing activity. Click OK.
8 Follow Step 1 through Step 7 to create two more projects:
❑
Name: midd_tier_project_1
Example location:
C:\temp\views\ucm_admin_InitialProject\atlas_services\midd_tier_project_1
❑
Name: gui_project_1
Example location: C:\temp\views\ucm_admin_InitialProject\atlas_gui\gui_project_1
Validating Models
We recommend that you validate your models frequently.
To validate a code model:
1 In the IDE, click the Navigator tab.
Note: You can also go to the Navigator by clicking Window > Show View >
Navigator.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 157
Composite Object Versioning Support
Because modifications in one part of a model can result in modifications in other parts
of the model, it is important that all related modified units be synchronized and
managed as a single logical unit for configuration management purposes at key
delivery points into configuration management (CM).
Prior to Rational XDE version 2002.05.20, Release 2.1, Service Release, there was no
automated support for treating models as a composite object. The Service Release
introduced composite object versioning (COV) operations that facilitate the
management of a model and all subunits in it linked to user gestures that perform
various CM operations.
The general purpose of COV is that operations performed on a single or subset of
subunits expand to include the entire file closure of the model. For example, if you
have a model with two classes, class1 and class2, which are both stored as separate
subunit files (class1.clx and class2.clx), and both class files are checked out, and you
attempt to check in just class1, the checkin automatically expands to include both
class1 and class2.
Note: COV applies within a single model only. Operations do not expand across
cross-model references to include all the referenced models.
For more information, see the XDE Help.
General Behavior
The usual CM dialog boxes are presented at the expected times. Users will observe
that there can be more files listed than were asked for. Users can override the COV
expanding behavior and deselect the additional files. Users can also cancel the entire
operation. It is recommended that users follow the suggestions and perform all the
operations on the entire set of units presented to ensure that a consistent and
complete baseline of model subunits is committed to the VOB at the same time. Users
in other views will then be able to update their models and see a consistent and
complete set of model elements.
Navigator Limitations
We recommend that you initiate CM operations from the Model Explorer because the
implementation of COV is more comprehensive from that window. In the Navigator,
the COV is only enabled if the selected unit is the root model file.
2 Under (gui_project_1) System Model, right-click Deployment and then click Make a
Separate Unit.
3 When you are prompted to check out the System Model file, click OK.
4 When you are prompted for an activity, create a new activity called check out. Click
OK.
You have now stored the model elements in separate physical files, enabling team
members from separate disciplines to work on these files independently.
The initial framework design for the project is now complete.
6 Save your work: Click File > Save All.
7 On the Add Element(s) to Source Control dialog box, clear the Keep checked out
check box and click OK.
8 When you are prompted for an activity, reuse an existing activity or create a new
one. Click OK.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 159
Adding Java Classes to the Framework
In this section, you complete the initial framework by adding a Java class to the data
layer project:
1 In the IDE, click the Navigator tab.
2 In the Navigator, under data_layer_project_1 [ucm_admin_InitialProject], open Java
Code Model.mdx.
3 From the Toolbox in the left pane, navigate to Java > Java Class. Drag Java Class
to the Main diagram of Java Code Model.mdx.
The Create Java Class dialog box appears.
4 In the Name box, type FirstClass and click OK.
5 At the prompt to check out, click OK.
6 When you are prompted for an activity, reuse an existing activity or create a new
one. Click OK.
7 Repeat Step 2 to Step 6 to add a class called FirstClass to Java Code Model.mdx
under midd_tier_project_1.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 161
5 On the Export page, select Team Project Set and click Next.
6 On the Team Project Set page, ensure that all three projects are selected.
7 Click Browse.
The Save As dialog box appears.
8 Navigate to the gui_project_1 project directory in your current view. For example:
C:\temp\views\ucm_admin_InitialProject\atlas_gui\gui_project_1
The File name box should show that atlas_projects.psf is located in your view,
under the gui_project_1 project directory. For example:
C:\temp\views\ucm_admin_InitialProject\atlas_gui\gui_project_1\atlas_projects.psf
Note: Always save your Project Set File in a project directory that is within the
view that is associated with your workspace.
11 Click Finish.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 163
You can view the underlying ClearCase branch structure associated with the streams
by looking at the version tree:
To view the ClearCase branch structure:
1 In the IDE Navigator, select a file.
2 From the ClearCase toolbar in the IDE, click Show Version Tree.
The ClearCase Version Tree Browser appears and displays the version tree for the
selected project.
3 Exit the ClearCase Version Tree Browser: click File > Exit.
4 Exit the IDE: Click File > Exit.
Creating a Baseline
In the integration stream, create a baseline for all three UCM components.
Note: You can also separately create a baseline for each UCM component.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 165
Recommending a Baseline
Recommend the baseline that users will access when they rebase their development
streams.
To recommend a baseline:
1 In the ClearCase Project Explorer, right-click IntegrationStream and then click
Recommend Baselines.
3 XDE prompts you to select the ClearCase view to use. Select dev1_InitialProject
and click OK.
Your IDE starts.
4 In the IDE, click File > Import.
5 On the Import page, select Team Project Set and click Next.
6 On the Team Project Set page, click Browse and navigate to the location of your
atlas_projects.psf file. The file is located in dev1_InitialProject (your development
view), under the gui_project_1 project directory. For example:
C:\temp\views\dev1_InitialProject\atlas_gui\gui_project_1\atlas_projects.psf
7 Select atlas_projects.psf and click Open.
8 Click Finish.
The three projects load into your IDE.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 167
Adding to the XDE Model
Create a subsystem use case package on each of the main diagrams:
1 In the IDE, click in the Navigator.
2 Under midd_tier_project_1 [dev1_InitialProject], open services model.mdx.
3 From the Toolbox in the left pane, drag a UML Use Case Package to the Main
diagram of services model.mdx.
4 At the prompt to check out files, click OK .
5 When prompted, create an activity called check out. Click OK.
6 Rename the package services use cases.
7 Repeat Step 1 to Step 6 for the other two model files as follows:
❑ Under gui_project_1 [dev1_InitialProject], open gui_model.mdx and create a
UML Use Case Package called gui use cases.
❑ Under data_layer_project_1 [dev1_InitialProject], open data_model.mdx and
create a UML Use Case Package called data use cases.
8 Click File > Save All.
Rebasing as dev2
As dev2, rebase your development stream to the recommended baseline on the
integration stream to update your work area with the changes that dev1 delivered
(new model elements and cross-model references).
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 169
To rebase to the recommended baseline:
1 Log in as dev2.
2 Start XDE: click Start > Programs > Rational Software > Rational XDE in ClearCase
View.
3 XDE prompts you to select the ClearCase view to use. Select dev2_InitialProject to
begin your work.
Your IDE starts.
4 From the ClearCase toolbar in the IDE, click Rebase Stream.
The Rebase Stream dialog box appears.
5 Ensure that dev2_InitialProject is selected and click OK.
The Rebase Stream Preview dialog box appears.
6 To view the baselines for this rebase, click Advanced .
The Change Rebase Configuration dialog box appears with a list of baselines you
will rebase to.
7 Click OK to return to the Rebase Stream Preview dialog box.
8 Click OK to begin the rebase.
The Merges Complete dialog box appears.
9 Click OK.
The Rebasing in View dialog box appears.
10 Click Complete.
11 Click Close.
Note: We recommend that you always rebase your view with models closed. If you
rebase your view when models are open, you are not prompted to reload and you can
erase all changes from the previous version.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 171
Step dev1 activities dev2 activities
3 Checks in file
Delivers files
4 Checks in file
Delivers files, but needs to merge first.
Suppose that two users make a conflicting change when they both change the same
element and deliver before a rebase. This generates a merge conflict when the second
user starts to deliver.
XDE’s compare/merge functionality allows you to compare and track different model
elements, identify the differences between them, and merge models.
2 In the Main diagram, click on the services use cases package and rename to dev2
middle tier.
7 Now repeat Step 1 to Step 6, this time logging in as dev1. Note the following:
❑
Rename the services use cases package to dev1 middle tier.
8 Log in as dev2 again and check in and deliver your work as follows:
a Start XDE and, when prompted, select your view.
b In the Navigator, open services model.mdx.
c In the Model Explorer, right-click (midd_tier_project_1) services model and then
click Team > Check In.
d Click OK to complete the check in.
e From the IDE, complete the delivery of your files to the integration stream.
Merging Changes
XDE automatically resolves each difference. The Comparative Model Explorer and
the Comparative Property Browser show the Conflict (C), Resolution (R), and
Difference (D) status columns for the merged model and the selected contributors.
A Merged column shows the resolutions applied to the individual model elements.
8 In the Semantic Comparative Model Explorer, select the model element showing
the conflict.
9 On the Merge menu, click Resolve Using > Resolve Using Contributor 2 to resolve
the conflict associated with the selected model element in the merged model with
the specified contributor 2.
10 Click File > Compare/Merge > Save and Commit ClearCase Session.
11 Select the Deliver from Stream - Merges Complete dialog box and click OK.
The merge is now complete and the results are under ClearCase control.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 173
Refactoring: Adding, Moving, and Deleting Files
In this section, you learn how to change the files on your project, keeping the XDE and
ClearCase file spaces consistent.
Consider the following scenario: You learn that your application will support many
data sources, not just one. You decide to create models for each so that you do not
clutter the name space in the project directory. You create a models subdirectory to
store all the XDE models. This section shows you how to move the model file
data model.mdx from its location in the project directory to the models subdirectory.
6 Click Apply.
7 If you are prompted to check out, click OK.
You have now resolved the broken references in the data model.mdx file.
8 Check in all files.
Note: You can avoid resolving broken references this way by validating your models
before every check in.
This concludes the initial setup of a team development infrastructure.
Chapter 11 - Scenario: Rational XDE and UCM With IBM WSAD 175
176 Rational XDE Guide to Team Development
Scenario: Rational XDE
and Base ClearCase With
Microsoft VS.NET
12
This chapter helps you set up and work in an environment that demonstrates how
Rational XDE supports team development. You start a new project from Microsoft
Visual Studio .NET project templates and practice model-driven, team-oriented
development.
The scenario in this chapter specifically involves two roles: configuration manager
and developer. The configuration manager’s user ID is vob_admin. There are two
developers, whose user IDs are dev1 and dev2.
Note: The scenario in this chapter may also be of interest to other roles. For more
information, see Understanding Roles on page 23.
Prerequisites
In this scenario, we assume that the following software is installed on client
workstations:
■
Microsoft VS.NET 7.1 with Microsoft .NET Framework
■
Rational XDE Developer .NET Edition 2003
■ ClearCase LT Client
■
Microsoft Internet Information Services (IIS) 5.1
This exercise follows a standardized Web project model with http://localhost IIS
references and file share access mode to Web projects.
177
■
The ClearCase Getting Started Wizard has been run on the ClearCase LT Server to
establish VOB storage locations.
Note: When you run the Getting Started Wizard, do not perform the Import Source
Files optional task. This task imports source files into a VOB named sources. In this
exercise, you create your own VOBs to store all source files.
■
All ClearCase LT Clients are configured to point to the ClearCase LT Server.
2 Click New.
3 In the New User Variable dialog box, set Variable name to
CLEARCASE_PRIMARY_GROUP. Set Variable value to development. Click OK.
The Environment Variables dialog box should include the highlighted line as follows:
Chapter 12 - Scenario: Rational XDE and Base ClearCase With Microsoft VS.NET 179
Planning VOBs
As the number of files and directories in your system increases, you need a way to
reduce the complexity of managing them. VOBs are the ClearCase mechanism for
simplifying the organization of your files and directories. The elements that you
group into a VOB typically implement a reusable piece of your system architecture.
By organizing related files and directories into components, you can view your
system as a small number of identifiable components, rather than as one large set of
directories and files.
Creating VOBs
ClearCase stores file elements, directory elements, derived objects, and metadata in a
repository called a VOB.
Create three VOBs, one for each major IDE project:
1 Start the VOB Creation Wizard: click Start > Programs > Rational Software >
Rational ClearCase > Administration > Create VOB.
Creating a View
While logged in as vob_admin, create the administrator’s view so that you can create
and populate the initial solution framework projects and file artifacts:
1 Start the View Creation Wizard: click Start > Programs > Rational Software >
Rational ClearCase > Create View.
2 On the Choose a Project page, click No to the question about working on a project
in the ClearCase project tree.
3 Click Next.
4 On the Choose Location for a Snapshot View page, accept the default path or type
another path that is on your computer.
The last part of the path is the name of the view. To follow this scenario, make sure
it is vob_admin_view, so that the full path you include here is, for example:
C:\temp\views\vob_admin_view
Chapter 12 - Scenario: Rational XDE and Base ClearCase With Microsoft VS.NET 181
Creating a VS.NET Solution With XDE Models
A VS.NET solution stores project and user-specific information. You typically create a
VS.NET solution and then add projects to the solution to maintain a logical hierarchy
with the projects in your Web application.
Chapter 12 - Scenario: Rational XDE and Base ClearCase With Microsoft VS.NET 183
■
In Internet Information Services, under Default Web Site, right-click vob_admin_view
and then click Properties.
The path in the Local Path box maps to the location of your development view.
Validating Models
You should validate models early and often. Validate the three new code models.
To validate a code model:
■
In the Model Explorer, right-click each model root and then click Validate.
Because the code models are new, there are no validation errors.
2 In the Categories pane of the Add New Item dialog box, select Rational XDE.
3 In the Templates pane, select Getting Started.
4 In the Name box, change the name to System Model and click Open.
The model appears in the Solution Explorer and the Model Explorer.
2 In the Categories pane of the Add New Item dialog box, select Rational XDE.
3 In the Templates pane, select Blank Model.
4 In the Name box, rename the model to gui model and click Open.
The model appears in the Solution Explorer and the Model Explorer.
5 Repeat steps 1 to 4 to add a blank model named services model to
midd_tier_project_1.
Chapter 12 - Scenario: Rational XDE and Base ClearCase With Microsoft VS.NET 185
Composite Object Versioning Support
Because modifications in one part of a model can result in modifications in other parts
of the model, it is important that all related modified units be synchronized and
managed as a single logical unit for configuration management (CM) purposes at key
delivery points into CM.
Prior to Rational XDE version 2002.05.20, Release 2.1, Service Release, there was no
automated support for treating models as a composite object. The Service Release
introduced composite object versioning (COV) operations that facilitate the
management of a model and all subunits in it linked to user gestures that perform
various CM operations.
The general purpose of COV is that operations performed on a single or subset of
subunits expand to include the entire file closure of the model. For example, if you
have a model with two classes, class1 and class2, which are both stored as separate
subunit files (class1.clx and class2.clx), and both class files are checked out, and you
attempt to check in just class1, the checkin automatically expands to include both
class1 and class2.
Note: COV applies within a single model only. Operations do not expand across
cross-model references to include all the referenced models.
For more information, see the XDE Help.
General Behavior
The usual CM dialog boxes are presented at the expected times. Users will observe
that there can be more files listed than were asked for. Users can override the COV
expanding behavior and deselect the additional files. Users can also cancel the entire
operation. It is recommended that users follow the suggestions and perform all the
operations on the entire set of units presented to ensure that a consistent and
complete baseline of model subunits is committed to the VOB at the same time. Users
in other views can then update their models and see a consistent and complete set of
model elements.
Chapter 12 - Scenario: Rational XDE and Base ClearCase With Microsoft VS.NET 187
Testing in the Development View
Again, build, debug, and test your application.
1 In VS.NET, click File > Save All to save changes.
2 In the Solution Explorer, right-click atlas_project, and then click Build Solution.
3 If you have any build errors, resolve them and rebuild the solution.
4 Right-click atlas_project, and then click Debug > Start.
You should see your new controls on the page.
You have built, debugged, and tested your solution.
Chapter 12 - Scenario: Rational XDE and Base ClearCase With Microsoft VS.NET 189
To open a solution under source control for the first time in a new view:
1 As dev1 in VS.NET, click ClearCase > Front Desk.
2 In the Front Desk Window, click Views.
3 From the Display menu, select <Add Views...> and browse to the location of your
snapshot view. For example:
C:\temp\views\dev2_view\atlas_gui
4 Click OK.
5 Click dev1_view (your development view).
6 Click the Open button, then click Open from Source Control.
7 When the Browse for Folder dialog box appears, select the atlas_gui folder in your
development view. For example:
C:\temp\views\dev1_view\atlas_gui
8 Click OK.
The Set Project Location - atlas project dialog box appears.
9 Edit the Enter Working Copy Location box to specify the correct IIS virtual directory
for your development view. For example:
http://localhost/dev1_view/atlas_gui/gui_project_1
10 Click OK.
User dev1 now has a solution framework open and ready to begin work.
2 From the Toolbox in the left pane, drag a UML Use Case Package to the Main
diagram of services model.mdx.
The Check Out For Edit dialog box appears.
3 Click Check Out.
4 Rename the package services use cases.
5 Repeat Step 1 to Step 4 for the other two model files as follows:
❑ Under gui_project_1, open gui model.mdx and create a UML Use Case Package
called gui use cases.
Chapter 12 - Scenario: Rational XDE and Base ClearCase With Microsoft VS.NET 191
Updating Views
Earlier in this scenario, you set up the work environment for dev2 and created a view.
When you loaded the view, you loaded the files corresponding to the \main\LATEST
version at the time the view was created. This version consisted of the basic
framework before dev1 started to work. Before you start to change the models, you
need to update your view. Work as follows:
1 Log in as dev2 and start VS.NET.
2 Click ClearCase > Front Desk.
3 In the Front Desk Window, click Views.
4 From the Display menu, select <Add Views...> and browse to the location of your
snapshot view. For example:
C:\temp\views\dev2_view\atlas_gui
5 Click OK.
6 In the left pane, click dev2_view (your development view).
7 Click the Open button, then click Open from Source Control.
8 When the Browse for Folder dialog box appears, select the atlas_gui folder in your
development view. For example:
C:\temp\views\dev2_view\atlas_gui
9 Click OK.
The Set Project Location - atlas project dialog box appears.
10 Edit the Enter Working Copy Location box to specify the correct IIS virtual directory
for your development view. For example:
http://localhost/dev2_view/atlas_gui/gui_project_1
11 Click OK.
User dev2 now has a solution framework open and ready to begin work.
12 Update dev2_view: in the Front Desk Window, click Tools.
15 The ClearCase Snapshot View Update dialog box appears and shows what has
changed since the last update. Exit the dialog box: click File > Exit.
4 Checks in file
(Next section) tries to check in, but needs
to merge first.
Suppose that two users make a conflicting change when they both change the same
element and check in their changes. This generates a merge conflict when the second
user starts to check in.
XDE’s compare/merge functionality allows you to compare and track different model
elements, identify the differences between them, and merge models.
Chapter 12 - Scenario: Rational XDE and Base ClearCase With Microsoft VS.NET 193
5 Quit XDE: Click File > Exit. Leave services model.mdx checked out.
6 Now repeat Step 1 to Step 5, this time logging in as dev1. Note the following:
❑
Rename the services use cases package to dev1 middle tier.
❑
To open the solution as dev1, in the bottom pane of the Front Desk Window,
click atlas_project, then click the Open button.
❑
When you are ready to check out the file, ClearCase prompts you to check the
file out unreserved because only one checkout per branch can be reserved and
dev2 holds the reservation.
7 Log in as dev2 again and check in your work as follows:
a Start the IDE.
b Click ClearCase > Front Desk.
c In the bottom pane of the Front Desk Window, click atlas_project, then click the
Open button.
Chapter 12 - Scenario: Rational XDE and Base ClearCase With Microsoft VS.NET 195
Resolving Broken Cross-Model References
The cross-model references in the model you moved are now broken. Resolve these
broken references as follows:
1 In the Model Explorer, close System Model if it is open.
2 In the IDE Solution Explorer, under gui_project_1, open System Model.mdx.
A Missing models dialog box appears. This message is normal because you moved
the file. However, the cross-model references to the model element (data use cases
package for the data_layer_project_1 of the application) are not updated. You must
resolve these broken references.
3 Click Resolve.
The Unresolved External References dialog box appears.
Note: If you choose Ignore and open the system use cases diagram, an icon
(crossed-out stop sign) appears on the model element that has the broken
reference(s). If you see this icon, you need to resolve broken references.
4 In the left pane, select the data model.mdx file.
5 In the Full box, browse to the new location of the data model.mdx file (in the new
Models folder).
6 Click Apply.
7 If you are prompted to check out, click Check Out.
You have now resolved the broken references in the data model.mdx file.
8 Check in all files.
Note: You can avoid resolving broken references this way by validating your models
before every check in.
This concludes the initial setup of a team development infrastructure.
Prerequisites
In this scenario, we assume that the following software is installed on client
workstations:
■
Microsoft VS.NET 7.1 with Microsoft .NET Framework
■
Rational XDE Developer .NET Edition 2003
■ ClearCase LT Client
■
Microsoft Internet Information Services (IIS) 5.1
This exercise follows a standardized Web project model with http://localhost IIS
references and file share access mode to Web projects.
197
■
The ClearCase Getting Started Wizard has not been run on the ClearCase LT
Server.
■
All ClearCase LT Clients are configured to point to the ClearCase LT Server.
2 Click New.
3 In the New User Variable dialog box, set Variable name to
CLEARCASE_PRIMARY_GROUP. Set Variable value to development. Click OK.
The Environment Variables dialog box should include the highlighted line as follows:
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 199
1 Set up your initial project by performing the following:
a Create a project VOB.
b Create a UCM project.
2 Plan how your UCM components map to your IDE project components.
3 Create UCM component VOBs.
4 Create ClearCase work areas by:
a Creating a development stream.
b Creating an integration stream.
c Creating a development view.
d Creating an integration view.
e Loading the new VOBs into your work area.
5 Register your UCM components as modifiable by:
a Adding foundation baselines to your UCM project.
b Changing UCM project policies for the UCM components.
6 Synchronize the integration stream.
7 Recommend a new baseline.
8 Rebase your development stream.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 201
You should see the following:
Creating VOBs
ClearCase stores file elements, directory elements, derived objects, and metadata in a
repository called a VOB. In ClearCase, a UCM component can be stored as the only
component in a VOB or as one of several components in a VOB. In this exercise we set
up the VOBs so that they can each contain one component only.
Create three VOBs, one for each major IDE project:
1 Start the VOB Creation Wizard: click Start > Programs > Rational Software >
Rational ClearCase > Administration > Create VOB.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 203
7 Repeat Step 1 to Step 6 twice to create the following VOBs:
❑
atlas_services
❑ atlas_data_layer
Create work areas to populate the initial solution framework and file artifacts.
To create a work area:
1 While logged in as ucm_admin, in the ClearCase Project Explorer, right-click
InitialProject and then click Join Project.
5 In the Where would you like the root of this view? box, specify the integration view
location (for example: C:\temp\views\ucm_admin_InitialProject_int) and click Next.
The Choose Components pages appears.
6 Select the Start component browser after creating view check box.
11 Click OK.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 205
4 Click the Change button and select All Streams.
5 From the Component list, select atlas_data_layer.
6 In the bottom pane, select the atlas_data_layer_INITIAL baseline.
7 Click OK.
8 Repeat steps 4 to 7 twice to add the atlas_gui and atlas_services foundation
baselines.
9 Click OK.
10 The Rebase Stream Preview dialog box appears. Click OK to start the integration
stream rebase.
11 Complete the rebase by accepting all defaults.
Recommending a Baseline
You organize delivered activities into baselines. A baseline identifies one version of
every element visible in a component. Usually baselines go through a cycle of testing
and defect fixing until they reach a satisfactory level of stability. When a baseline
reaches this level, you designate it as a recommended baseline.
When developers join the UCM project, they populate their work areas with the
versions of directory and file elements represented by the UCM project’s
recommended baseline. Alternatively, developers can join the UCM project at a
feature-specific development stream level, in which case they populate their work
areas with the development stream’s recommended baseline. This practice ensures
that all members of the UCM project team start with the same set of files.
Recommend a new baseline to make the changes to your UCM project available to
developers.
To recommend baselines:
1 In the Project Explorer, right-click IntegrationStream and then click Recommend
Baselines.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 207
7 Repeat steps 3 to 6 twice to recommend the atlas_gui and atlas_services baselines.
8 Click OK.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 209
Creating an IIS Alias
Before you create the ASP.NET project that will reside with the solution in the
atlas_gui VOB, you must set up URL access to the Web project.
Because ClearCase manages all of the projects in subdirectories (VOBs), you must
create an IIS alias called ucm_admin_InitialProject that points to your development
view and specify the location of the Web projects through that alias.
To create an IIS alias for your development view on Windows XP:
1 On the Control Panel, go to Administrative Tools > Internet Information Services.
2 Under Web Sites, right-click Default Web Site and then click New > Virtual Directory.
3 The Virtual Directory Creation Wizard appears. Click Next.
4 In the Alias box, type ucm_admin_InitialProject and click Next.
5 In the Directory box, browse to the location of your development view. For
example:
C:\temp\views\ucm_admin_InitialProject
6 Click Next.
7 Accept all defaults and complete the Wizard.
Note: The alias and directory name must match; otherwise, you will eventually
encounter a problem in VS.NET.
If you view the properties of this virtual directory, you can see that it is mapped to
your development view location.
To view the properties of the virtual directory mapped to your development view:
■
In Internet Information Services, under Default Web Site, right-click
ucm_admin_InitialProject and then click Properties.
The path in the Local Path box maps to the location of your development view.
Validating Models
You should validate models early and often. Validate the three new code models.
To validate a code model:
■ In the Model Explorer, right-click each model root and then click Validate.
Because the code models are new, there are no validation errors.
2 In the Categories pane of the Add New Item dialog box, select Rational XDE.
3 In the Templates pane, select Getting Started.
4 In the Name box, change the name to System Model and click Open.
The model appears in the Solution Explorer and the Model Explorer.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 211
Adding a Blank Model to Each Project
Add a subsystem model to each VS.NET project by using the XDE Blank Model
template.
To add a blank model to a project:
1 In the Solution Explorer, right-click gui_project_1 and then click Add > Add New
Item.
2 In the Categories pane of the Add New Item dialog box, select Rational XDE.
3 In the Templates pane, select Blank Model.
4 In the Name box, rename the model to gui model and click Open.
The model appears in the Solution Explorer and the Model Explorer.
5 Repeat steps 1 to 4 to add a blank model named services model to
midd_tier_project_1.
General Behavior
The usual CM dialog boxes are presented at the expected times. Users will observe
that there can be more files listed than were asked for. Users can override the COV
expanding behavior and deselect the additional files. Users can also cancel the entire
operation. It is recommended that users follow the suggestions and perform all the
operations on the entire set of units presented to ensure that a consistent and
complete baseline of model subunits is committed to the VOB at the same time. Users
in other views can then update their models and see a consistent and complete set of
model elements.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 213
Setting Up the Solution in the ClearCase Environment
Set up the solution in the ClearCase environment.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 215
Delivering to the Integration Stream
The ClearCase deliver operation makes work done in one stream available to another
stream.
Work is delivered in the form of activities or baselines. Differences between versions
already part of the target stream of the deliver operation and versions being delivered
are resolved through merging.
Versions associated with an activity or baseline must be checked in to be delivered.
Only activities that have been modified since the last deliver operation from the
development stream are considered for delivery.
Deliver your files to the integration stream so that other users can work with the
application. Until you deliver to the integration stream, users who join the UCM
project will see empty work areas.
Note: In the Solution Explorer, a lock icon indicates that the file is under source
control. All project files should currently be under source control.
To deliver the solution to the integration stream:
1 Click ClearCase > Front Desk.
2 In the Front Desk Window, click the Deliver button.
The Deliver from Stream Preview dialog box appears.
3 To view which file versions are associated with a UCM activity:
a Select an activity and click Properties.
The Properties dialog box appears for that activity.
b Click the Change Set tab to view all files associated with that activity.
c Click OK to return to the Deliver from Stream Preview dialog box.
4 Ensure that all activities are selected and click OK to begin the delivery.
Once all files are successfully merged, the Deliver from Stream - Merges Complete
dialog box appears.
5 Click OK.
A ClearCase dialog box appears.
6 Click OK.
Note: Do not complete the delivery now. Leave the Delivering to View dialog box
open for now. You will complete the delivery later after you have tested files in the
integration view.
You have merged and checked out all of the files onto the integration stream and left
these files checked out in the integration view.
The ClearCase Version Tree Browser appears and displays the version tree for the
selected project.
4 Exit the ClearCase Version Tree Browser: click File > Exit.
6 Click Next.
7 Accept all defaults and complete the Wizard.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 217
Testing in the Integration View
In the integration stream, all files have been merged successfully and are currently
checked out. In your integration view, all files are also currently checked out.
Before you open your solution in your integration view, you should close your
solution that is currently open in your development view.
To close the solution in your development view:
■
In VS.NET, click File > Close Solution .
In the integration view, you will open your solution, then rebuild, debug, and test it to
ensure that all changes from the delivery have been integrated properly.
8 Click OK.
All files are checked out to the integration view.
Note: From now on, you can open the solution through the Open Solution menu
item. The Open from Source Control menu item only performs special processing
the first time you open the solution in a new view.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 219
You should see the following:
Note: In the above window, you can see that gui_project_1 in your development
view has an ASP.NET application icon, while gui_project_1 in your integration
view does not.
3 Go to ucm_admin_InitialProject_int/atlas_gui. Right-click gui_project_1 and then click
Properties.
5 Click OK.
In the IIS administrative tool, the ASP.NET application icon appears beside
gui_project_1 (under ucm_admin_InitialProject_int).
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 221
1 Select the Delivering to View dialog box (still open from the incomplete deliver)
and click Complete.
2 Click Close.
3 Exit the IDE. Click File > Exit.
Creating a Baseline
In the integration stream, create a baseline for all three UCM components.
Note: You can also separately create a baseline for each UCM component.
Recommending a Baseline
Recommend the baseline that users will access when they rebase their development
streams.
To recommend a baseline:
1 On the ClearCase - UCM toolbar, click Recommend Baseline.
The Recommended Baselines dialog box appears.
2 Click Seed List.
When you seed the list for the new baselines at the INITIAL promotion level, you
will see the new baselines that you just created.
3 Click OK.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 223
10 Click Finish. When the Confirm dialog box appears, click OK.
2 From the Toolbox in the left pane, drag a UML Use Case Package to the Main
diagram of services model.mdx.
The Check Out For Edit dialog box appears.
3 Click Check Out.
The ClearCase - New Activity dialog box appears.
4 When the ClearCase - Select Activity dialog box appears, create a new activity
called create initial use-case packages and select the newly-created activity.
5 Click OK.
6 Rename the package services use cases.
7 Repeat Step 1 to Step 6 for the other two model files as follows:
❑ Under gui_project_1, open gui model.mdx and create a UML Use Case Package
called gui use cases.
❑ Under data_layer_project_1, open data model.mdx and create a UML Use Case
Package called data use cases.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 225
4 When you are prompted for an activity, reuse an existing activity or create a new
one. Click OK.
5 Name the new diagram Atlas System Use Cases.
Note: Diagrams provide a means of visualizing and manipulating the model
elements in a model. Different diagrams represent different views of the system
that you are developing.
6 From the Model Explorer, drag the nodes for the following three use-case
packages onto the new diagram:
❑
gui use cases
❑ services use cases
❑ data use cases
On the new diagram, each package should have an arrow indicator in the top left
corner which identifies that the packages are cross-model references.
7 Save all your work. Click File > Save All.
8 Check in all files: in the Pending Checkins window, click Check In.
2 When the Browse for Folder dialog box appears, select the atlas_gui folder in your
development view. For example:
C:\temp\views\dev2_InitialProject\atlas_gui
3 When the ClearCase - Select Activity dialog box appears, create a new activity
called dev2 initial changes and select the newly-created activity.
The Set Project Location - atlas project dialog box appears.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 227
4 Edit the Enter Working Copy Location box to specify the correct IIS virtual directory
for your development view. For example:
http://localhost/dev2_InitialProject/atlas_gui/gui_project_1
5 Click OK.
User dev2 now has a solution framework open and ready to begin work.
3 Checks in file
Delivers files
4 Checks in file
Delivers files, but needs to merge first.
Suppose that two users make a conflicting change when they both change the same
element and deliver before a rebase. This generates a merge conflict when the second
user starts to deliver.
XDE’s compare/merge functionality allows you to compare and track different model
elements, identify the differences between them, and merge models.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 229
3 In the Model Explorer, right-click (midd_tier_project_1) services model and then
click Check In.
4 Complete the check in.
5 From the IDE, deliver your files to the integration stream.
A message appears saying that the element cannot be merged automatically.
6 Select the Start the Diff Merge tool for this element option and click OK to launch an
XDE compare/merge session.
Merging Changes
XDE automatically resolves each difference. The Comparative Model Explorer and
the Comparative Property Browser show the Conflict (C), Resolution (R), and
Difference (D) status columns for the merged model and the selected contributors.
A Merged column shows the resolutions applied to the individual model elements.
7 In the Semantic Comparative Model Explorer, select the model element showing
the conflict.
8 On the Merge menu, click Resolve Using > Resolve Using Contributor 2 to resolve
the conflict associated with the selected model element in the merged model with
the specified contributor 2.
9 Click File > Compare/Merge > Save and Commit ClearCase Session.
10 Select the Deliver from Stream - Merges Complete dialog box and click OK.
The merge is now complete and the results are under ClearCase control.
6 Click Apply.
7 If you are prompted to check out, click Check Out.
Chapter 13 - Scenario: Rational XDE and UCM With Microsoft VS.NET 231
You have now resolved the broken references in the data model.mdx file.
8 Check in all files.
Note: You can avoid resolving broken references this way by validating your models
before every check in.
This concludes the initial setup of a team development infrastructure.
233
E ownership policies 48
resolving conflicts 80
elements (ClearCase) 113 resolving differences 69
environment variables sample scenario 140, 172, 193, 228
configuring 126, 146, 178, 198 semantic phase 74
silent 52
using a new XDE instance 56
F model elements
moving 54
fusing models 61 referencing 55
model partitioning 43
benefits 44
G drawbacks 44
guidelines 46
geographically distributed development 35
planning 48
GUIDs 63
models
creating XDE 130, 157
fusing 61
I merging 80
icons partitioning 43
conflict 66, 94 sharing 40
difference 65, 93 sharing outside source control 108
resolution 94 validating 130, 156
integration streams 111, 112
P
J parallel development 30, 32
java controlling change 33
adding classes 133, 160 controlling releases 35
creating modeling projects 129, 155 developing multiple releases 32
joining a project 166, 223 partitioning
models 43
planning 48
platform models 107
M profiles 97
merging project (UCM) 112, 148, 200
automatic 56 joining 111, 166, 223
base models 59 project set file
ClearCase 51 adding to source control 135, 162
ClearCase versions 114 creating 134, 161
common ancestors 59 importing 139, 170
detecting changes 65 loading into a view 164
diagram phase 74 project VOB 115
fusing 61 creating 148, 200
guidelines 50, 80 projects
identifying conflicts 66 controlling change 33
identifying differences 65 creating java modeling 129, 155
out-of-context 44 Rational 111
V
S
validating models 130, 156
semantic phase (merging) 74 version trees (ClearCase) 113
streams (UCM) 111, 112, 115 views (ClearCase) 115
synchronizing 153, 206 creating 128, 136, 181, 188
subunits dynamic 151, 204
combining 55 snapshot 151, 204
planning 47 VOBs 113
preferences 55 creating 128, 150, 180, 203
referencing 55 planning 128, 180
working with 53 storing components 120
system architecture 118
X
T
XDE
tagged values 98 adding packages 137, 168
comparing models 140, 172, 193, 228
configuring ClearCase 51
U creating models 130, 157
generating code for classes 133, 160
UCM 109 merging models 140, 172, 193, 228
changing project policies 153, 206 project set file 134, 161
creating a project 148, 200 refactoring 142, 174, 195, 230
designing components 118 starting 129, 155
joining a project 166, 223
Index 235
236 Rational XDE Guide to Team Development