Skip to main content

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

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

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.

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

All information submitted is secure.

  • Close [x]

Create baselines from multiple requirements projects

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

Fabian Lomeli (fabian@mx1.ibm.com), Software Engineer, IBM
author photo
Fabian 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.

Summary:  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.

Date:  15 Nov 2011
Level:  Intermediate PDF:  A4 and Letter (99KB | 7 pages)Get Adobe® Reader®
Also available in:   Chinese

Activity:  9654 views
Comments:  

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" & _
             "\samples\Learning_Project-Use_Cases\"

             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
                BaseCompRPXProxy();
           RPXProxyDataDescriptor oDataDesc = new
                RPXProxyDataDescriptor();
          ProxyProject oProject = null;

          oProject = bcRPXProxy.openProject(projectPath, projectUserID,
                projectPWD);

            oDataDesc.project(oProject);
            oDataDesc.projectFilePath(projectPath);

            oDataDesc.userName(projectUserID);
            oDataDesc.userPassword(projectPWD);
            oDataDesc.label(projectLabel); 
            oDataDesc.location(projectDest);
           
            // Options
            oDataDesc.traceability(projectTraceability);
            oDataDesc.cpt(projectCPT);
            oDataDesc.discussion(projectDiscussion);
            oDataDesc.history(projectHistory);

            oDataDesc.elementType( EnumProxyElementType.project);

            bcRPXProxy.createBaseline(oDataDesc);

            oProject.closeProject(); 


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


Downloads

DescriptionNameSizeDownload method
Sample script for Listing 1CreateBaselineVB.zip5KBHTTP
Sample script for Listing 2CreateBaselineJava.zip2KBHTTP

Information about download methods


Resources

Learn

Get products and technologies

Discuss

About the author

author photo

Fabian 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.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


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. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

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.

(Must be between 3 – 31 characters.)

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

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=773073
ArticleTitle=Create baselines from multiple requirements projects
publish-date=11152011

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.

Special offers