Workspace Object

The Rational® ClearQuest® workspace consists of a folder hierarchy where queries, charts and reports are stored. The Workspace (WorkSpaceMgr for Perl) object provides an interface for manipulating saved queries, reports, and charts in the Rational® ClearQuest® workspace.

You can use this object:

  • To write external applications to examine the contents of the Rational® ClearQuest® workspace.
  • In conjunction with the QueryDef Object to execute saved queries, the ChartMgr Object to execute charts, and the ReportMgr Object to execute reports.

If you already have a Session object, you can get the Workspace object associated with the current session by calling the Session object's GetWorkSpace method.

If you do not have a Session object, your VB code can create a new Workspace object directly using the CreateObject method as follows:


set wkspcObj = CreateObject("CLEARQUEST.WORKSPACE") 

Your Perl code uses this syntax:


$wkspcObj = new CQWorkSpaceMgr 

Before you can use a Workspace object created using CreateObject, you must assign a Session object to it. To assign a Session object, you must call the SetSession method of the Workspace object.

You use the methods of the Workspace object to get information about the contents of the Rational® ClearQuest® workspace. You can get a list of the queries, charts, or reports in the workspace. You can also separate items based on whether they are in the Public Queries folder or in a user's Personal Queries folder.

For each folder type, it is designated as either a public or user (personal) folder, which is enumerated under the WorkspaceFolderType. The two top folders for a workspace are always a public and a personal folder, which are created automatically when a Rational® ClearQuest® user database is created.

You can also use this object to save queries back to the workspace.

Each workspace item has a dbid assigned to it and its type is enumerated under WorkspaceItemType in clearquest.bas.