< Previous | Next >

Lesson 3.2: Create associations in a development linkable domain

In this lesson, you will create associations between a use-case requirement and Java class.

In development linkable domains, such as Java or J2EE, systems architects or development managers can create associations with requirements. These associations help ensure the functional coverage of all requirements in a development project. Developers can then navigate from their development artifacts to requirements in Rational® RequisitePro® and examine the full text associated with the requirement. This provides a more complete understanding of the development goals.

These associations are configured by default as indirect associations. A proxy requirement is created in Rational RequisitePro to represent the development artifact. Traceability is established in Rational RequisitePro between the proxy and the targeted requirement.

In this lesson, you will create a Java project, and then create an association between a use-case requirement and a Java class. In a J2EE project, you might associate use-case or feature requirements with EJB JARs, Session Beans, BMP Beans, J2EE Message-Driven Beans, Web Services, Servlets, and other J2EE development artifacts.

Start by examining the use case requirements for the project:

  1. In the Requirement Explorer view, expand the Use Cases folder and the Purchase CD folder. In a typical scenario, you would study the Basic Flow of the use case in the Microsoft Word requirements document, and then associate multiple Java classes to satisfy the behavior of the use case.
  2. Notice that there is an alternate flow use case, INVALID SHOPPER ID, below the Basic flow.
For the sake of simplicity in this lesson, you will create a single Java class and associate it with this alternate flow use case.

Create a Java project and a class

Create a simple project, a folder, and a class to demonstrate an association with a development artifact:
  1. Click File > New > Project.
  2. In the New Project wizard, click Java Project > Next.
  3. Type a project name My Java Project and click Finish.
  4. When you are prompted to open the Java perspective, click No.
  5. To create a folder for classes, right-click My Java Project and click New > Folder.
  6. In the New Folder window, type a folder name classes and click Finish.
  7. To view the new folder, click the Show Domain-Specific Linking Views button , and then click Java. The Package Explorer view is displayed.
  8. In the Package Explorer view, expand My Java Project and right-click the classes folder.
  9. Click New > Other > Class > Next.
  10. Type a name for the class, FailedAuthentication, and then click Finish.

Associate a class with a use-case requirement

Add the new Java class to the Link Clipboard, and then link the use case to the class. Examine the resulting proxy requirement and traceability.
  1. In the Package Explorer view, right-click the FailedAuthentication class and click Linkability > Add to Link Clipboard.
  2. In the Requirement Explorer view, expand the Use Cases and Purchase CD folders and right-click the INVALID SHOPPER ID use case.
  3. Click Linkability > Create Link to FailedAuthentication.java.
  4. To examine the proxy requirement, scroll to and expand the Eclipse Element Proxies folder in the Requirement Explorer view.
  5. Expand the resources folder and My Java Project folder.
  6. Select the proxy for the Java class.
  7. Click the Requirement Trace view and click the Trace From icon to examine the traceability from the class proxy to the use-case requirement.
In this lesson, you have considered the basic and alternate flows of a use-case requirement. You created a Java project and a class. You associated the alternate flow use case and the Java class. Finally, you viewed the resulting proxy requirement and its traceability.
< Previous | Next >

Feedback