Before you begin: Installing and configuring software
You must perform key software installation and configuration tasks before you set up your environment.
The following software must be installed on client workstations:
- Rational Software Architect 6.0
- Concurrent Versions System 3.0.1
This scenario assumes that your Concurrent Versions System (CVS) repository is created and configured for all three users.
You share a modeling project, so that other team members can also work on it. In this section, you start Rational Software Architect as cvs_admin, import a modeling project, and share it in CVS.
Starting Rational Software Architect
Start Rational Software Architect and create an initial workspace.
To start Rational Software Architect:
- Click Start > Programs > IBM Rational > IBM Rational Software Architect V6.0 > Rational Software Architect.
- In the Workspace Launcher window, in the Workspace field, specify a workspace and click OK.
Note: Your CVS repository location and your Rational Software Architect workspace should always be separate.
Importing an existing modeling project
In this exercise, you import an existing modeling project called Piggy Bank. In accordance with the Rational Unified Process (RUP), the Piggy Bank sample UML model is divided into three models that each describe a different aspect of the system: the use-case model, analysis model, and design model.
To import the Piggy Bank modeling project:
- Click Help > Samples Gallery.
- In the Contents pane, navigate to Application samples > Piggy Bank Application > Piggy Bank Models.
- In the right pane, click Import the sample.
- In the Sample Banking Models wizard, on the Piggy Bank Models page, accept the default project name and click Finish.
- Close the Samples Gallery.
The following figure illustrates how the Piggy Bank modeling project is displayed in the Model Explorer view.
Figure 1. Piggy Bank modeling project
Share your project to allow other team members to access it.
To share your project:
- In the Model Explorer view, right-click Piggy Bank Models; then click Team > Share Project.
- In the Share Project wizard, on the Share Project page, click CVS and click Next.
- On the Share Project with CVS Repository page, click a repository location and click Next.
- On the Enter Module Name page, click Use project name as module name and click Next.
- On the Share Project Resources page, click Commit All Changes.
- In the Add to CVS Version Control window, click Yes.
- In the Commit window, type
Share projectand click OK. - On the Share Project Resources page, click Finish.
Adding to the modeling project
Make changes to your models and store them in CVS, so that other team members can view them. Update a use-case diagram with an action.
To update a use-case diagram:
- In the Model Explorer view, double-click Use Case Model.emx.
- Navigate to Use Case Model > Account Operations > Display Balance > Display Balance and double-click Display Balance Activity Diagram.
Figure 2. Opening the Display Balance Activity Diagram
- In the Palette, click Action.
- In the diagram editor, click above Display Accounts with balance.
- In the diagram editor, rename Action to
Select Account. - In the Palette, click Control Flow.
- In the diagram editor, click Select Account and drag the cursor to Display Accounts with balance.
- In the guard condition, type
[true]. - Click the end of the guard condition that points to Display Accounts with balance and drag the cursor to Select Account.
The following figure illustrates how a new action is displayed in the diagram editor.
Figure 3. Creating an action
- To save your changes, click File > Save All.
Committing your work to the repository
Commit your changes to the repository, so that other users can view them.
To commit your work to the repository:
- In the Model Explorer view, right-click Piggy Bank Models; then click Team > Synchronize with Repository.
- In the Synchronize view, in Outgoing Mode, right-click Use Case Model.emx; then click Commit.
- In the Commit Comment window, type
Create Actionand click OK.
Developing models as part of a team
At this point in the scenario, the administrator has finished setting up the development environment. In this exercise, the focus switches to the development process and to two developers with the user IDs dev1 and dev2.
Setting up work areas for the developers
In this exercise, you set up the individual work areas for dev1 and dev2. This exercise assumes that the CVS repository is already created and configured for dev1 and dev2.
- Log in as dev1.
- Click Start > Programs > Rational Software > Rational Software Architect.
- In the CVS Repository Exploring perspective, expand HEAD.
- Right-click Piggy Bank Models; then click Check Out As.
- To load Piggy Bank models into your workspace, in the Check Out As window, click Finish.
- To set up another work area for dev2, repeat steps 1 through 5.
Adding to the modeling project
As dev2, make a change to a use-case diagram by renaming an action.
To rename an action:
- In the Model Explorer view, double-click Use Case Model.emx.
- Navigate to Use Case Model > Account Operations > Display Balance > Display Balance and double-click Display Balance Activity Diagram.
- In the diagram editor, rename Display Accounts with balance to
Display Selected Account. - Click File > Save All.
The following figure illustrates how a renamed action is displayed in the diagram editor.
Figure 4. Renaming an action
Committing your work to the repository
Commit your changes to the repository, so that other users can view them.
To commit your work to the repository:
- In the Model Explorer view, right-click Piggy Bank Models; then click Team > Synchronize with Repository.
- In the Synchronize view, in Outgoing Mode, right-click Use Case Model.emx; then click Commit.
- In the Commit Comment window, type
Rename Actionand click OK.
Updating the work area for dev1
Update the work area for dev1 with the latest changes that dev2 committed to the repository.
To update the work area for dev1:
- Log in as dev1.
- Click Start > Programs > Rational Software > Rational Software Architect.
- In the Model Explorer view, right-click Piggy Bank Model; then click Team > Synchronize with Repository.
- In the Synchronize view, in Incoming Mode, right-click Piggy Bank Model; then click Update.
Starting parallel development: Comparing and merging models
In this exercise, you perform parallel development. The two users on your team make different changes to the same model element. In the next exercise, the second user tries to synchronize with the repository, and then must perform a merge to resolve the differences.
A merge typically starts when you check in a model to a configuration management system and a newer version of the same model already exists in the repository. At the start of the merge, all non-conflicting differences and trivial conflicts are resolved automatically. You must then manually resolve the remaining conflicts by selecting a version of a model from which to accept changes. After you resolve the remaining conflicts, you can save the merged model and close the merge editor.
Introducing conflicts to the model
In this exercise, dev1 introduces a change to a file, then commits the file. When dev2 makes a conflicting change to the same file, dev2 must merge the two files before committing changes to the repository.
To create a conflicting change:
- As dev1, in the Model Explorer view, double-click Use Case Model.emx.
- Navigate to Use Case Model > Account Operations and double-click Account Operations Use Cases.
- In the diagram editor, rename Teller to
Auditor. - Click File > Save All.
- Commit your changes to the repository:
- In the Model Explorer view, right-click Piggy Bank Models; then click Team > Synchronize with Repository.
- In the Synchronize view, click Outgoing Mode.
- Right-click Use Case Model.emx; then click Commit.
- In the Commit Comment window, type
dev1 changesand click OK.
- To exit Rational Software Architect, click File > Exit.
- Log in as dev2.
- In the Model Explorer view, double-click Use Case Model.emx.
- Navigate to Use Case Model > Account Operations and double-click Account Operations Use Cases.
- In the diagram editor, rename Teller to
Manager. - Click File > Save All.
Resolving the conflict
At this point, dev1 and dev2 have both made changes to the same file. The dev1 user has committed changes. The dev2 user has not yet committed changes. When dev2 synchronizes with the repository, a merge initiates and dev2 must resolve any conflicts that exist before committing changes to the repository.
To resolve the conflict:
- As dev2, in the Model Explorer view, right-click Use Case Model.emx; then click Team Synchronize with Repository.
- In the Synchronize view, in Incoming Mode, double-click Use Case Model.emx (which is identified by a conflict icon).
- Click Synchronize.
The Merge window opens. You can view the differences and conflicts between contributor and ancestor files in the Left, Right, and Ancestor views. You can also view details about each difference and conflict in the Structural Differences view. The Merged result view displays the merged model.
- To accept the change that dev2 made, in the Merge window, in the Structural Differences view, right-click Conflicting changes; then click
Resolve with Left Contributor.
Figure 5. Resolving a conflict
- In the Merged result view, click Save as Left contributor.
Figure 6. Saving a merged model
- Close the Merge window.
- In the Synchronize view, in Incoming Mode, right-click Use Case Model.emx; then click Mark as Merged.
- Click Outgoing Mode.
- Right-click Use Case Model.emx; then click Commit.
- In the Commit Comment window, type
merged use-case modeland click OK.
The merge is now complete and the results are under CVS control.
This concludes the initial setup of a team development infrastructure. This article also concludes the series of scenarios designed to cover the use of Rational Software Architect in a team environment, practicing model-driven, team-oriented development.
Learn
-
Scenarios of working in a team development environment: Using IBM Rational Software Architect and base ClearCase: This first scenario describes how to work in a team development environment using Rational Software Architect and base ClearCase.
-
Scenarios of working in a team development environment: Using IBM Rational Software Architect and UCM: This second scenario describes how to work in a team development environment using Rational Software Architect and UCM.
-
Comparing and merging UML models in IBM Rational Software Architect: Part 3: This article is part of a series of articles that discuss how to compare
and merge UML models in Rational Software Architect.
-
Introducing IBM Rational Software Architect: Improved usability makes software development easier: This article is a basic introduction to the Rational Software Architect product.
-
IBM Rational Software Architect product page: Find technical documentation, how-to articles, education, downloads, and product information about Rational Software Architect.
-
IBM Rational ClearCase product page: Find technical documentation, how-to articles, education, downloads, and product information about ClearCase.
Get products and technologies
-
IBM Rational Software Architect: Download a trial version from developerWorks.
Discuss
- Participate in the discussion forum.
-
Rational Software Architect, Software Modeler, Application Developer and Web Developer forum: Ask questions about Rational Software Architect.
-
developerWorks blogs: Participate in the developerWorks community.






