IBM Rational Publishing Engine Tool Hands-on Tutorial

By Sruthy

By Sruthy

Sruthy, with her 10+ years of experience, is a dynamic professional who seamlessly blends her creative soul with technical prowess. With a Technical Degree in Graphics Design and Communications and a Bachelor’s Degree in Electronics and Communication, she brings a unique combination of artistic flair…

Learn about our editorial policies.
Updated November 26, 2024

In-depth Review of IBM Rational Publishing Engine Tool. Learn Installation, Advance Report Formatting, Generate Requirement Report & Deploy Template to DNG:

What Is RPE?

IBM Rational Publishing Engine (RPE) is a tool to automate the generation report from various data sources. The main aim of IBM RPE is to pull the data from various data sources, it can be either IBM toolset or any other third party tools, which will help to reduce the human error and manual effort.

The tool is capable of generating five outputs at the same time such as WORD, PDF, XSL-FO, Excel, HTML.

IBM Rational Publishing Engine

In this tutorial, we will explain the in-depth usage of the IBM Rational Publishing Engine. But before that let’s take a look to understand the basics of IBM Rational DOORS Next Generation from the link below:

Recommended Reading=> Introduction to IBM Rational DOORS Next Generation

Overview Of Rational Publishing Engine

As we have already discussed the main functionality of RPE above, we will move to the features of RPE and the installation part in this tutorial.

The main features of the tools include:

  • It can apply styles and customer formats.
  • It can add multiple data sources for satisfying customer expectations.
  • Reuse of templates across the organization for all projects.
  • Can integrate with third-party tools using REST API.
  • Supports the comprehensive, traceability and any other complex format reports

Installation Of RPE

Please ensure that below-mentioned software are available before starting the installation

Note: You want to have IBM Passport advantage for accessing this.

  • IBM Floating License deployed server Hostname.

Steps to install RPE:

  1. Open IBM Installation manager
  2. Go to File>>Preference
  3. Navigate to RPE repository disktag.inf
  4. Click on Ok
  5. Install
  6. Click On Next, when it asks for the license provide the RLKS (Rational License Key Server) server hostname with the port number in the following format. Example: 27000@<ipaddress> or <hostname> //27000 is default port number.
  7. Install.

Exploring Rational Publishing Engine Desktop Interface

RPE has main two components:

  • RPE Studio: Where we will be designing the template and adding data sources.
  • RPE Launcher: Where we will be designing the style, outputs, run the data sources, and generate the report.

RPE main artifacts are as follows:

  • Document template (*.dta): This is the template format that we can reuse.
  • Document Specification/Report (*.dsx): It connects one or more templates and used to generate the report

Generating Doors Next Generation Requirement Report

Let’s start by creating templates for generating the DNG requirement document. Follow the steps mentioned below to create the same.

#1) Open Document Studio.

RPE Document Studio

#2) To create a report from the tool the first step is to add a data source. For adding the data source, click Data>> Add Data Source

Add data source

On the second page of the wizard select DNG Module from the list of predefined data sources. In the Schema field provide the hostname and port number of DNG Server. https://hostname:9443/rm/publish/modules?metadata=schema

For Example, https://softwaretestinghelp:9443/rm/publish/modules?metadata=schema

#3) Fill the DNG Login credentials in username and password and select option Auto as Authentication Type box and then click Next.

#4) Now you can see data source is added on the data source section in the template.

Add datasource schema wizard

#5) The next step is to add elements according to the needs, For that,

  • Select the container and drag to the template from palette

Note: Container is like a page that doesn’t affect the output content and it is mainly used to add data sources.

  • Add one paragraph and text from the palette, which should be inside the container as shown in the image below. Where paragraph describes the output and has a footprint in the output document.
  • Drag and drop the Data source > artifact query from the data source view.

artefact query from data source view

  • Double click on a text element and select the Data Expression tab and expand the Data source > artifact query and select title which will print DNG Module Title.

print DNG Module Title

  • Save the template. The extension will be. Dta.

#6) Now, we will configure the URI which describes the DNG Modules.

  • On the top right change the perspective to the launcher, which makes it easier for navigation, so that you can navigate to launcher easily.

DNG Modules

  • If you have saved the template, you can see under data source configuration DNG Module-Datasources in red color.
  • Right-click on the data source and select configure data source configuration.
  • Give the URL as https://hostname:9443/rm/publish/modules?reourceURI=<moduleID>

Where module id is,

  • Navigate in the browser on URL, https://hostname:9443/rm/web
  • Select the project after login to the application

login to application

Open the module for which we want to genrate the report.

Click on Share Link to Artifact and copy the id which is shown in the image below and replace the module id in the above URL.

Share Link to Artifact

sharelink

  • Now URL in RPE Launcher looks like in the below image. Provides user credentials with the Auto authentication method.

Configure XML datasource

  • Click on generate Document.

RPE results

  • The Output looks like,

Output

#7) Here the template only prints the DNG Module title, where using the DNG Module data source, we can print module details such as description, module id, etc. To print the requirement under the DNG Modules we need to add DNG text data source. For that,

  • Go to Data>>Add data source
  • On the second page of the wizard select DNG Text from Predefined and give hostname, port, username password, and auto authentication as we gave for the module data source.

DNGtextadd datasoure

Click Next and Finish.

  • Now in the data source view, we will able to see DNG Text.

Note: The important point to be noted is that in DNG Module we configure the URL in the launcher, so when we add DNG text, we need to configure it dynamically. For that automatic configuration, we need to use one more element Dynamic data source from the palette which should be inside a container. The query which will link the DNG Module and DNG text is data/source/module/context Binding of DNG Module data source.

#8) Drag and drop a container from the palette which should be placed inside the DNG Module query container.

#9) Drag the Query data/source/module/context Binding to the container, if prompted select context popup selects the main container query data source/artifact.

main container query

#10) Right-click on the container and select Insert>>Data source Configuration, now the user can see an element added to the container.

insert data source config

#11) Now the next step is to configure this data source dynamically. For that,

  • Select the data source element to go to properties tab: Datasource configuration >> Data
  • Click on Target Datasource select DNG Text
  • Select DNG Module from inherited data configuration

data configuration

#12) Click on the container and again select the Data source element as you can see in the properties tab under data a new property is added as Dynamic configuration.

select the Data source element

#13) Click on URI and select script expression from the wizard.

Note: As described above, the requirement details and the link is stored inside data>> artifact>>context binding >> about. This about contains the respective Requirement URL which cannot be used directly as it, not the same format URL. So we need to use a script expression to convert the URL to our format. For that do the same as in Image.

select script expression

  • The expression is: about.replace(‘/resources/’, ‘/publish/text?resourceURI=’);
  • Click on Ok.
  • Provide username and password in the dynamic configuration.

username and password in dynamic configuration

#14) Here we are, now the requirement will be iterated, so we will use paragraphs and text inside the container and use the DNG Text Datasource Datasource/Artifact query in the paragraph.

#15) To follow the format as the heading of requirement should be Bold we will use a condition for filtering only heading. For that,

  • Right-click on paragraph and click Data >>Edit condition

Edit condition

  • All the requirements inside a module related to basic things stored inside the DNG module Datasource/artifact/context binding.
  • Expand Attributes and the query context binding it and check the isHeading attribute.
  • Give the script as follows,

isHeading == “true”

isHeading

  • Click Ok.

#16) Next, we need to print the requirement which is not heading, we will use a condition for filtering only which is not heading. For that, add one more paragraph and text again downside with query DNGText – Datasource/artifact/content/text/richtextbody and,

  • Right-click on paragraph and click Data >>Edit condition
  • All the requirements inside a module related to basic things stored inside DNG module Datasource>>artifacts>>context binding.
  • Expand Attributes and query context binding it and click checkbox isHeading.
  • Give the script as follows,

isHeading! = “true”

  • Click Ok.

So template looks like,

sample template

#17) After configuring the DNG Text Dynamically we will hide the data source from the launcher. For that, from an outline, select data sources and click on DNG Text under the properties tab in the configuration required to select hidden.

properties tab in the configuration

#18) Save and click on generate Report.

final report

Advanced Formatting of Report

This section describes how to format the paragraph, to add styles, table of contents, and size of the text to make your report in a standard way.

As in the DNG report which we generated the module name and its place is on the left side. The agenda is to make its size to heading style and make it in the center of the page. For that,

#1) Select the Paragraph where the module title is there, goto properties on down to template and select padding, indents, and spacing option. In alignment option select Centre from the drop-down list.

select Centre from the drop down list.

#2) For increasing the size Go to Font option in properties and fix the size of your heading.

#3) To apply style right-click on paragraph and select Style>>Title

Style

#4) To add a Table of contents on top of the page as it should come after the Module Title we should add the Table of Contents from the palette. For that, right-click on the space after the Module title element is there and select Table of Content.

#5) For the report to look more appealing provide a page break after TOC.

#6) TOC element won’t add the heading Table of Content for that we need to add static Text before TOC as shown in the image below, the text is a simple value.

TOC

#7) Now let’s try to generate the report.

generate the report

Adding Master Page (Header And Footer) In Report

The master page concept in RPE is adding Header and Footer in our document. For this, we need to follow the following steps,

#1) Right-click on the main container and select Master Page>>New Master Page, Provide a name.

masterpage

#2) So we will get a new tab with the name you provided, where you can see Header and Footer element present.

a new tab

#3) As of now, we will add Page number in footer and header and add one logo on the left side of the page.

#4) In Footer add one paragraph and right-click on paragraph select page number element.

#5) Similarly, in the header add one paragraph and add an image element, right-click on image browse and load the image which you wish it to be.

header load image

header image

#6) Make the padding-left or right as per the wish by selecting the paragraph element.

#7) Save the template and generate the report.

Adding Variables And Java Script

Variables are of two types:

External variables: This is used to take input while running the report. For example, a user needs to provide his name while generating the report that is prepared by the text box.

Internal variable: If you have any calculation or any program need to write for getting the current system date we can use this.

  • So for creating a variable go-to outline section variable right-click Insert>> New variable
  • Give a name “date” to variable and access Internal for the internal variable.
  • Now go to the Footer section, add a paragraph down, and making padding on the right side where the current date will print on the footer right side.
  • Add a paragraph down and add a text inside, double click, and goto script expression.

script expression

Date=Date(Date.now()); // which will provide current date.

  • Save the template. So that date variable has access only on internal.
  • Now, we will configure an external variable that will take input from the user.
  • For that follow the same process, Right-click on variable>>Insert>>New variable
  • Enter name Prepared By and access select External
  • We will provide this just below of Module name in Template as shown in the below image.

Prepared By

  • Here I have added a Simple Text Prepared By and added one more text on the right side and added data Expression variable: Prepared By which we created.
  • So Template looks like this,

template

  • And in launcher you can see variable PreparedBy in red color, just click and provide value downside.

Variable PreparedBy

  • Run the report. You will see the Header and Footer generated in RPE.

Deploying Template In DNG

Deploy the standardized template to DNG to avoid using RPE every time. So for just one click report, we will deploy the template in DNG Application.

The Procedure is as follows:

  • Navigate to IBM JTS installation folder/server/conf/rm/reporting/initialization/rrdng
  • Ensure that the DNG Module data source name is modules and DNG text should be _text always if you are deploying,
  • To rename in outline select data source schemas, select the data source and rename.
  • Copy the template which we created in RPE to this folder.
  • Now we need to register this with DNG, for that navigate and open the /server/conf/rm/reporting/initialization/META-INF file
  • Make an entry:

Name: DNG Report
Location: templates/rrdg/DNG Report.dta
Label: DNG Report
Description: DNG Report
Content-Type: application/octet-stream
Is-Report: true
Context: view, module, collection

  • Go to Browser and navigate to URL, https://hotsname:9443/rm/admin
  • Go to the debug tab.
  • Under services, select Publish service and click on Initialize Service.

select Publish service and click on initialize service.

  • Go to Project area>> Reports

Select Report type

  • Generate the report seamless.

Conclusion

By reading this article you would have understood the importance of having Rational Publishing Engine for generating the standardized reports from DNG.

This article is for people with a basic understanding of RPE, who wish to start their career or who like to learn new skills. RPE is capable of generating reports easily from RTC and RQM, CQ, DOORS, Rhapsody, and many other third-party tools.

The important points we have discussed in this tutorial are:

  • Overview of Rational Publishing Engine
  • Installation of Rational Publishing Engine
  • Exploring the Rational Publishing Engine Desktop Interface
  • Design and create basic RPE templates
  • Generating Doors Next Generation Requirement Report
  • Advanced Formatting of Report
  • Adding a master page (Header and Footer) in the Report.
  • Adding External Variable and internal variable.
  • Deploying Template in DNG

Happy Learning!!

Was this helpful?

Thanks for your feedback!

Leave a Comment