Create baselines from multiple requirements projects

How to use the RequisitePro Baseline Manager Library to generate baselines programmatically

The Baseline Manager Library in IBM® Rational® RequisitePro® is an API that you can use to create baselines programmatically. Write scripts to tailor processes for creating baselines for multiple projects, or schedule scripts to be run as a time-based task. With this library, you can create baselines of requirements that you keep in documents, the Attribute Matrix views, packages, or entire projects.


Fabian Lomeli (, Software Engineer, IBM

author photoFabian Lomeli is a software engineer at IBM, based in Guadalajara, Mexico. He is on the Rational RequisitePro development team where he focuses on databases, baselines, LDAP, and FIPS topics.

15 November 2011

Also available in Chinese

A baseline is a representation in XML format of what exists in a project. IBM® Rational® RequisitePro® includes a tool that you can use to create baselines, view them in a tree structure, or compare two baselines and generate reports of the comparison. You can also build new projects from existing project baselines.

Sometimes you need to be able to create baselines for multiple projects or automate baseline creation. In these situations, you must use the Rational RequisitePro Baseline Manager Library to easily create these baselines.

About the library

The baseline manager library (RqBaseComp.dll) is part of the Rational RequisitePro Extensibility Interface (RPX). It contains the CreateBaseline method that you can use to create baselines for multiple projects or automate baseline creation.

The CreateBaseline method

The CreateBaseline method receives DataDescriptor as an argument that provides information about the properties of a RequisitePro baseline. You can find more information about DataDescriptor in the RequisitePro Help menu under Extensibility Interface Reference.

The following line is an example of the syntax: BaseCompDataDescriptor.CreateBaseLine(oData As DataDescriptor) As Boolean

The BaseCompDataDescriptor object and its methods are available in the RqBaseComp.dll library, which is included in the bin directory of the Rational RequisitePro installation folder: C:\Program Files\IBM\RationalSDLC\RequisitePro\bin\RqBaseComp.dll.

Use cases for creating baselines from the library

When you use the baseline manager library, you can customize the baseline creation task by writing scripts. Use this approach when you need to create baselines frequently for the same project, or repeatedly for multiple projects, such as in the following situations:

  • Generate baselines for each project in a specific path.
  • Generate baselines for each project from the RequisitePro catalog.
  • Generate baselines on a timed interval, such as daily, weekly, or monthly.

Code examples

The following code samples offer guidance about how to create a project baseline by using either Visual Basic or Java.

The example in Listing 1 shows how to create a project baseline of a RequisitePro sample project. To run this script, you must add a reference for the library, such as C:\Program Files\IBM\RationalSDLC\RequisitePro\bin\RqBaseComp.dll.

Listing 1. Creating a project baseline

             Dim a_oData As RqBaseComp.DataDescriptor
             Dim a_oBaseComp As RqBaseComp.BaseCompApplication
             Dim a_sRQSPath As String
             Dim a_sProjectName As String

             Set a_oBaseComp = New RqBaseComp.BaseCompApplication
             Set a_oData = New RqBaseComp.DataDescriptor 
             a_sRQSPath = "C:\Program Files\IBM\RationalSDLC\RequisitePro" & _

             a_sProjectName = a_sRQSPath & "LEARNING - USE CASES.RQS"

             With a_oData
                  'set .ReqProProject = a_oProject ' can use this or the RQSFilepath
                .RQSFilePath = a_sProjectName
                .UserName = "admin"
                .UserPassword = ""
                .Location = a_sRQSPath & "Baselines"
                .Label = "Baseline-label"

                 'baseline type
                .ElementType = eProject

                ' what do you want to baseline
                .Traceability = True
                .Discussion = True
                .History = True
                .CPT = True

             End With
             ' Create the baseline
             a_oBaseComp.CreateBaseLine a_oData
             Set a_oBaseComp = Nothing
             Set a_oData = Nothing

The code in Listing 2 shows how to create a project baseline by using the Java language. This particular snippet shows the use of the baseline options passed as parameters so they are set dynamically.

To run this code you must add the following library: C:\Program Files\IBM\RationalSDLC\RequisitePro\lib\BaseComp.jar.

Listing 2. Creating a project baseline

            BaseCompRPXProxy bcRPXProxy = (BaseCompRPXProxy) new
           RPXProxyDataDescriptor oDataDesc = new
          ProxyProject oProject = null;

          oProject = bcRPXProxy.openProject(projectPath, projectUserID,


            // Options

            oDataDesc.elementType( EnumProxyElementType.project);



Import baselines from RequisitePro to IBM Rational Requirements Composer

In IBM Rational Requirements Composer 3.0.1.x there is a feature you can use to import the baselines that you created from the library into projects. This feature is available in the requirements composer tool by selecting Administration > Import RequisitePro Project.

Figure 1. The Import RequisitePro Project wizard
Interface that you use import a baseline from RequisitePro


Sample script for Listing 1CreateBaselineVB.zip5KB
Sample script for Listing 2CreateBaselineJava.zip2KB



Get products and technologies



developerWorks: Sign in

Required fields are indicated with an asterisk (*).

Need an IBM ID?
Forgot your IBM ID?

Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.


All information submitted is secure.

Dig deeper into Rational software on developerWorks

ArticleTitle=Create baselines from multiple requirements projects