Understanding the Rational ClearQuest API
You can use this API to write code that runs within Rational® ClearQuest® (hook code), or that runs independently of an instance of the Rational ClearQuest application. You can also use the API to create an integration with a new or an existing application (service, tool, or utility) and the Rational ClearQuest application.
- Type of Code
- Example
- Hook scripts for your Rational ClearQuest schema
- Modify records that users submit, and validate the records before they are committed to the user database. (Rational ClearQuest Designer provides an editor for you to insert hook scripts.)
- External applications that run outside of Rational ClearQuest
- View or modify the data Rational ClearQuest stores in the user database and schema repository.
- Integrations with an application and Rational ClearQuest
- Integrate the functionality of a service, tool, or utility with the capability to view or modify the data Rational ClearQuest stores in the user database and schema repository. See Considerations for Rational ClearQuest integrations in the Schema Developer Help for more information.
Rational ClearQuest runs your hooks in VBScript or Perl, but not both at the same time. Rational ClearQuest Designer allows you to switch between scripting languages. For more information, see the Schema Developer Help.
You can write external applications in any programming environment that supports OLE automation (such as Visual Basic or Visual C++), or that can execute Perl scripts.
- For Perl, include the following statement:
use CQPerlext;
- For Visual Basic and VBScript, all of the Rational
ClearQuest enumerated constants are defined in
clearquest.bas,
located by default in the <install-directory>/ClearQuest
directory. For Visual Basic
projects, you can add the clearquest.bas module to your project. You can also copy the constants from clearquest.bas into the
same file as your code. For example, to use the AD_COMP_OP_EQ and
AD_SUCCESS constants in a Visual Basic program, locate the following lines in
clearquest.bas
and copy them into your program file:
Public Const AD_COMP_OP_EQ = 1 Public Const AD_SUCCESS = 1