Example: Retrieving artifacts from applications supporting RESTful API

This example describes how to retrieve artifacts from the Requirements Management application of Rational® solution for Collaborative Lifecycle Management and create elements in IBM® Rational Focal Point™.

Purpose

If you have requirements in the Requirements Management application and want to prioritize them in Rational Focal Point, you can use the REST client view command to retrieve the requirements.
Prerequisite:
  • Set the IP address and hostname of the Rational solution for CLM server in the host file of the computer from where you are configuring the integration. For Windows, the host file is typically located at C:\Windows\System32\drivers\etc and for Linux the hose file is located at /etc/hosts.
  • Add the Requirements Management application as a Friends(Outbound) in Rational Focal Point. For more information, see Connecting to the Rational solution for Collaborative Lifecycle Management application server.
  • Be aware of the XML structure of the Requirements Management application artifacts and have the rights to access them.

Sample

This example assumes that Rational Focal Point has a workspace FP-RRC and a view View RRC Requirements. The table shows some of the attributes available in Rational Focal Point and the Requirements Management application.
Table 1. Attributes for Rational Focal Point and the Requirements Management application
Rational Focal Point attributes Requirements Management application attributes
Fuel choice rrm:description
Fuel efficiency rrm:collaboration/rrm:attributes/attribute:objectType/attribute:customAttribute/@attribute:isEnumeration
Integration Link rrm:collaboration/rrm:attributes/attribute:objectType/@attribute:projectAreaName
Title ds:location/ds:project/rrm:title
  1. In Rational Focal Point, open the FP-RRC workspace where you want to retrieve the artifacts.
  2. Click Configure > REST client view command and click Add view command.
  3. In REST Client Connector Name, type a RRC connector for identifying the connection.
  4. In REST Request Method, select the GET method.
  5. In Friends List, select RRC.
  6. In REST Application Request URL, type the application URL that contains the artifacts that you want to retrieve. For example, to get the artifacts from the Requirements Management application, type https://<hostName>:<portNumber>/rm/<projectName>/<collectionName>
    Tip: Open a web browser and type the URL that you used when adding the Requirements Management application as a friend. A list of high-level artifacts is displayed. Find out the artifact that you want to retrieve and copy its URL in REST Application Request URL.
  7. Click Connect.
  8. Click Select Root XPath to restrict your search for artifacts to a collection. Select /ds:dataSource/ds:artifact. XPath is used to narrow down the search to the artifacts. XPaths are hierarchical XML structure of an application.
  9. To ensure that the artifacts are not duplicated, in the ID Mapping section, click Add and map Fuel choice of Rational Focal Point and rrm:description of the Requirements Management application. You can map only one attribute.
  10. In the Attributes Mapping section, click Add to map the following attributes between the Requirements Management application and Rational Focal Point. The mapped attributes are displayed against the element retrieved from the application. Ensure that the attributes are editable.
    Note: The attribute that you selected in the ID Mapping section is not displayed in the Attributes Mapping section because that attribute is internally mapped and is available for the fetched elements.
    Table 2. Map attributes between Rational Focal Point and the Requirements Management application
    Rational Focal Point attributes Requirements Management application attributes
    Fuel efficiency rrm:collaboration/rrm:attributes/attribute:objectType/attribute:customAttribute/@attribute:isEnumeration
    Integration Link rrm:collaboration/rrm:attributes/attribute:objectType/@attribute:projectAreaName
    Title ds:location/ds:project/rrm:title
  11. In the REST Application supported Date Format field, type 2012-08-18.
  12. In the Focal Point Separator field, retain , as it is.
  13. Click Save.
  14. Open the View RRC Requirements view and select RRC Connector from the dropdown list. A list of requirements and attributes are retrieved and created as elements in the view.

Feedback