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
method that you can use to create baselines for multiple projects or automate baseline
The CreateBaseline method
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
The following line is an example of the syntax:
BaseCompDataDescriptor.CreateBaseLine(oData As DataDescriptor) As
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
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.
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
|Sample script for Listing 1||CreateBaselineVB.zip||5KB|
|Sample script for Listing 2||CreateBaselineJava.zip||2KB|
- To learn more, start with the developerWorks page for Rational RequisitePro, and then dig deeper (see the Discuss and Get products and technologies sections, too):
- Visit the Rational software area on developerWorks for technical resources and best practices for Rational Software Delivery Platform products.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Attend a free developerWorks Live! briefing to get up-to-speed quickly on IBM products and tools, as well as IT industry trends.
- Watch developerWorks on-demand demos, ranging from product installation and setup demos for beginners to advanced functionality for experienced developers.
- Improve your skills. Check the Rational training and certification catalog, which includes many types of courses on a wide range of topics. You can take some of them anywhere, any time, and many of the "Getting Started" ones are free.
Get products and technologies
- Download the Rational Requirements Composer free trial.
- Evaluate IBM software in the way that suits you best: Download it for a trial, try it online, use it in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement service-oriented architecture efficiently.
- Join the Rational ReqPro forum to ask questions and participate in discussions.
- Rate or review Rational software. It's quick and easy. Really.
- Share your knowledge and help others who use Rational software by writing a developerWorks article. Find out what makes a good developerWorks article and how to proceed.
- Follow Rational software on Facebook, Twitter (@ibmrational), and YouTube, and add your comments and requests.
- Ask and answer questions and increase your expertise when you get involved in the Rational forums, cafés, and wikis.
- Get social about thought leadership. Join the Rational community to share your Rational software expertise and get connected with your peers.
Dig deeper into Rational software on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.