IBM Support

How to dynamically select environment variables for a project

Technote (FAQ)


How do you dynamically select environment variables for running a project in IBM Rational Build Forge?


One project might need to be run on multiple servers with different environment variables. If environment variables can be dynamically selected before executing the project, lots of redundancy projects can be avoided to create.


The following steps explain how to create a dynamic selection of environment variables:


The bftool from the following page:

Detailed steps:

  1. Create multiple different environment variables
  2. Create a sample project with one of environment variables
  3. Use bfexport to export that project into an xml file (1.xml) then remove sample project
  4. Write a script by using same contents of 1.xml but replace the environment name with command variable $1
  5. Create a project with following commands:
    1. Calling the script and passing the environment name as command variable to
    2. Generate a xml file
    3. Use bfimport to import the xml file, create a new project
    4. Use passchain to run the newly imported project
    5. Use bftool rmproject to remove the newly imported project

Document information

More support for: Rational Build Forge
API: Console Interaction

Software version: 7.1.2, 7.1.3

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Software edition: Enterprise, Standard

Reference #: 1608314

Modified date: 27 August 2012

Translate this page: