Traceability with DOORS 9 and RQM

Continuing the series of articles on the topic of creating traceability documents I have arrived at an interesting use case:  traceability from DOORS 9 and RQM.

doors2rqm_output

In this article I will describe how to create a document with requirements from DOORS 9 and their associated test cases from RQM.

Continue reading “Traceability with DOORS 9 and RQM”

Advertisements

Use sophisticated formatting for PDF in DNG

If you are using the document generation UI in DNG’s 5.0.x and older to generate PDF documents the default option is to use RRDG’s  so called “performance driver“.  This driver is legacy and has far fewer capabilities than the alternative “sophisticated formatting” driver.

You can read more on the history of the PDF driver  in RRDG and why we kept the legacy driver but at this time there are no reasons to use it except the fringe scenario where you need to create a 20.000 pages data dump in PDF.

Considering the performance and quality of the output produced by the “sophisticated driver” you should always use that driver. This is enforced in DNG 6.0 by making “sophisticated formatting” the default option for the PDF output.

 

A 4 step install guide for RPE 2.0.1

This post is a TL;DR version of it for Liberty and Tomcat. The installation procedure for the RPE WebServices 2.0 is described in detail in http://www-01.ibm.com/support/knowledgecenter/SS6RHZ_2.0.1/com.ibm.rational.pe.install.doc/topics/c_web_rpeng.html

RPE 2.0.1 Login Screen
RPE 2.0.1 Login Screen

 

WAS  Liberty Profile

Apache Tomcat

Ensure the TELELOGIC_LICENSE_FILE environment variable is set and points to a RPE license server.
Copy com.ibm.rpe.web.app.ear from %RPE_HOME%\remote-services into the apps folder of your Liberty server Copy rpeng.war and dgass.war from %RPE_HOME%\remote-services into the webapps folder of the Tomcat server
Ensure the JSP and Auth features are enabled for the Liberty server. Add the required users and roles for RPENG. See the example server.xml.  Add users and roles for RPENG. See the example tomcat-users.xml.
Start Liberty and navigate to  http://<server&gt;:9080/rpeng/home Start Tomcat and navigate to http://<server&gt;:8080/rpeng/home

Trouble shooting

  1. Examine rpeng.log and rpedgaas.log in %TEMP% folder
  2. Clear browser cache. This is mandatory when upgrading from 2.0 to 2.0.1
  3. Admin page – list of failed jobs
  4. View page – job details

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.

How to configure RPE 2.0 to send emails on document completion

RPE 2.0 and RPE 2.0.1 users can receive email notifications when a document generation job completes.

rpe_mail_user_3
This capability needs to be enabled by the administrator and each user. For both roles the procedure is exceedingly simple.

As a user

You need to enter your email address in the settings page. The user settings are accessed from the menu next to your user name in the top bar of the page.rpe_mail_user_2
NOTE
: if configured to use JTS for authentication RPE will automatically retrieve your email address associated with your JTS account.

rpe_mail_user_1

As an administrator

You need to configure RPE to access an email service. This is done by filling the highlighted entries in the image  below.

rpe_mail_settingsThe administrative page is accessed just like the user settings page: from the context menu next to the user name in the top bar. The menu is only available to users that have the administrative role.

Once the mail settings are properly configured an email will be sent to the owner of the document each time a document generation completes (successfully or not). For successful jobs you can access the generated documents immediately using the links from the email.

Advanced configuration

The administrative settings page also contain two properties that allow the administrator to change the content of the email generated by RPE. Please make sure that code is valid HTML and test it in a browser before changing it in the RPE settings.

Macros and DOCX in RPE 2.0.1

With RPE 2.0.1 you can specify .docx as the extension for the output documents regardless of the stylesheet you are using. With 2.0 and older the generation process would fail if the stylesheet contained macros since .docx is a macro free Word document format.

To avoid this RPE 2.0.1 will remove all macros before saving the .docx file. This also means that any macro specified to be executed for the output will be ignored if the output extension is .docx. If you need macros in your output document you need to use one of the macro enabled document formats .doc or .docm.

How to follow links from DM to DNG

In this article I describe how to generate a document with RPE that contains DM resources and their linked DNG requirements. While the example uses DNG as a target the technique is applicable to other CLM sources or even DOORS 9 with slight changes.

Credit: thanks to Kevin Cornell for his excellent DM Reporting Tutorial .

How it works

Unlike other Rational data sources links are not stored in the representation of a DM resource. This means that if you request the Reportable REST representation of a Package there will be no links inside it. The links are stored separately and access via the the “collaboration/links” Reportable REST URI.

So in order to build a document that contains DM resources and linked requirements you have to perform these 3 steps:

  1. retrieve the DM resource.
  2. retrieve the links for the DM resource
  3. access the linked artifacts

The anatomy of the template reflects these 3 steps:

DM_Links

I will skip step 1 and describe step 2 and 3

#2 Retrieve the links for a DM resource

The links for a DM resource are retrieved from the the collaboration/Link service. The dmResourceID and the dmContextID properties are available in the resource you’ve got at step 1.

https://server:port/dm/reporting/collaboration/Link?referencingId=<dmResourceID>&rmps.context=<dmContextID>

#3 Access the linked artifacts

Now that you have the link href all you need to do is access the information. Assuming all the links are for DNG text artifacts all you need is to convert the OSLC URL stored in DM to a Reportable REST form using a script like this and then access the DNG data through a Dynamic Data Source.

href.replace("resources/","publish/text?resourceURI=")

Reusing the template

The template is available on the Modelling Templates Page of the RPE DevWorks Wiki and is provided also as a reusable snippet. See the attachments section for:

  • DM Links for Package Diagrams Example
  • DM Links Snippet

Once imported in your template you connect your code to the snippet by adding code to set the baseURL, dmResourceID and dmContextID in the “add code here” Java Script block.