View of Participating Classes script for UML models

For IBM Rational Software Modeler, Rational Software Architect, or Rational Systems Developer

This script enables you to quickly generate a Participating Classes (or participants) diagram from a use case realization or package.

Share:

Darrell R. Schrag, Jr. (drschrag@us.ibm.com), Central Region Practice Lead - Architecture Management and SOA, IBM

Darell was with Rational for seven years before the IBM acquisition. He has extensive knowledge of Rational configuration and change management, modeling, requirements management, and process solutions and is interested in model-driven development and the application of domain models as a strategic advantage in software development organizations. He has worked in the retail, services, insurance, distribution, and telecommunications sectors.



Steve Arnold (steve.arnold@uk.ibm.com), Senior IT Specialist, IBM

Steve is a senior technical consultant who works for IBM Rational in the U.K., where he has worked since 2000. His main areas of expertise are UML design and Model-Driven Architecture (MDA), plus he has a strong interest in Eclipse and product extensibility.


developerWorks Professional author
        level

Todd Dunnavant, Lead, Rational Architecture Management Community of Practice, IBM

Todd leads the IBM Rational Architecture Management Community of Practice. His areas of expertise include service-oriented architecture (SOA) design, object-oriented design, requirements management, reusable asset management, and model-driven development.



26 August 2008

Script overview

The View of Participating Classes script quickly creates a class diagram that shows either the classes within a package or the collaborating classes within a use case realization. In the latter case, the script then adds unidirectional associations between collaborating classes if they do not already exist and marks them as "generated."

Script use

To generate a View of Participating Classes (VOPC) from a use case realization:

  1. Select the use case realization from the Project Explorer.
  2. Right-click on the use case realization name, and choose Create VOPC.

Note: This option is also available from the IBM Addins menu.

The script will then create a class diagram called <collaboration-name>-VOPC, which will show all of the classes in the collaboration (top pane in Figure 1) and create the appropriate relationships among them (bottom pane in Figure 1).

Figure 1. Use case realization as it appears in the VOPC views
Screen capture, top and bottom panes

To generate a VOPC from a package:

  1. Select the package from the Project Explorer.
  2. Right-click on the package name, and select Create VOPC.

Note: This option is also available from the IBM Addins menu.

The script will then create a class diagram called <package-name>-Owned Elements, which will show all of the classes in the package plus any existing relationships between them (see Figure 2).

Figure 2. Package as it shows in the VOPC views
Screen capture, top and bottom panes

Script installation

The installation of the VOPC plug-in is straight-forward:

  1. Download the RAS file included with this article (see Downloads) to a location on your hard drive.
  2. Start IBM® Rational® Software Modeler (or IBM® Rational® Software Architect or IBM® Rational® Systems Developer) and select File > Import.
  3. Select RAS > RAS Asset and click Next.
  4. Browse to the downloaded RAS file, accept the warning about deployable plug-ins, and click Next.
  5. Select the feature, accept the license agreement, and then click Finish.
  6. When prompted, restart to enable the plug-in.
  7. Now switch to the Modeling perspective.
  8. Select either a use case realization or package, right click, and you should see the option to select Create a vopc.

Downloads

DescriptionNameSize
Deployable RAS filevopc_rasv2.0.4.zip18KB
Source code as an archived Eclipse projectvopc_2_0_4.zip14KB

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Rational software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=332355
ArticleTitle=View of Participating Classes script for UML models
publish-date=08262008