More traceability – following links from RQM

Continuing the series of articles on producing traceability documents from IBM CLM I will describe today how to follow links from RQM.

If you examine the RQM schema for testcase for example you will notice entries for workitems and requirements.

qm_schema
Click on the image to enlarge it.

With these properties it should be fairly straightforward to build a template that retrieves CM and RM data associated with the QM artefacts.

However if you run your report on a test case feed URL like https://giediprime:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE Banking (Quality Management)/testcase?abbreviate=false there is no requirement or work item data in the document. And if you examine the XML returned by RQM for this request you will see that information is not present there either.

So what is the problem? The answer is in the Rational Quality Manager Reportable REST API Documentation.  For efficiency reasons RQM does not return the link information by default. If you want to create traceability documents you’ll have to explicitly ask for the link information using the calmlinks argument in the request URL.

qm_calm_links
Which means that the right URL to use in the RPE docspec will look like this https://giediprime:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE Banking (Quality Management)/testcase?abbreviate=false&calmlinks=true

Note that the URLs to RTC and DNG are OSLC links and you will need to convert them to Reportable REST API URLs before fetching RM and CCM data.

Examples showing how to follow links from individual testcase or from a test case feed are available in the RPE DevWorks – Cross Domains Templates Wiki.

Accessing individual workitems through RTC’s Reportable REST API

When accessing individual RTC work items through the reportable REST API there are two ways of going about it.

Embed the work item ID in the URL as a filter

https://giediprime:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[id=36]/(description|summary|severity|state)

Embed the work item ID in the URL as  a path segment

https://giediprime:9443/ccm/rpt/repository/workitem/workItem/id/36?fields=workitem/workItem[id=36]/(description|summary|severity|state)

Using the ID in the path segment is especially convenient when following links to RTC as it allows to convert the OSLC URL to Reportable REST without requiring additional variables and native filters as described in Assemble traceability documents from reusable building blocks.