Question & Answer
What does the IBM Rational ClearCase Remote Client (CCRC) support for interactive triggers mean?
Interactive triggers use clearprompt to interact with users. In a remote client/server environment like ClearCase Remote Client, trigger developers need to be aware of certain considerations.
The restrictions and considerations in this document apply to all the views that ClearCase Remote Client supports. These views include
- Web views
- Automatic views in version 126.96.36.199 and later.
For more information about automatic view, see technote 1699087 About ClearCase automatic views.
ClearCase Remote Client client supports clearprompt interaction with the following properties.
- Provides list, text, proceed, and yes_no dialogs.
- Does not support File dialog because of ambiguities in client-side file selection versus server-side utilization.
- Times out after 5 minutes without user response.
For more information about this module, see the IBM Rational ClearCase Command Reference under the topic of clearprompt.
Under certain conditions, pre-op triggers do not work, for example, triggers that require specific ClearCase environment variable evaluation.
Use Perl as a trigger language in the application of ClearCase triggers.
- If the ClearCase Remote Client operation fails, trigger output appears in the client error message.
A pre-op check-in trigger that fails causes the ClearCase Remote Client check-in operation to fail.
- If the ClearCase Remote Client operation does not fail, you see no output. The reason is, for example, as follows.
When a post-check-out trigger failure does not stop check-out, the client does not display output. Trigger output might be present in internal status information from the host but the user does not see the output.
- On Windows, Perl scripts do not capture output from sub processes such as system calls (calls to clearprompt, for example) or secondary Perl scripts (nested triggers that call other triggers). Therefore, error messages can be lost before they return to the client user.
ClearCase Remote Client runs as a client process that sends RPC commands to the ClearCase Remote client/server, where they run as separate ClearCase Remote client/server processes. These server processes run under the Application Server. Therefore, the environment variables (EVs) are likely different from the EVs in a command shell window during interactive development.
ClearCase Remote client/server processes run as the "system" user and then impersonate the original ClearCase Remote Client client user. As a consequence, the trigger cannot assume that EVs exist that define the location of the "user home" directory in UNIX or "Documents and Settings/<user>" in Windows.
Paths to supporting EXE files can also be a problem if the paths to the EXE files rely on local user environment definitions, cshrc, and %USERHOME% for example.
- ClearCase Remote Client WAN Server (versions 8.0 and 9.0)
For Linux or UNIX, custom ClearCase Remote Client, you can set trigger environment variables set in the default location.
- Primary group
Instead of using an EV, you can set the primary group for a ClearCase Remote Client under the workspace preferences.
Example content of ccrpc.sh:
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- Temporary files
Define a system-wide temp directory on the host. Then, you can cache data between trigger invocations through dedicated environment variables.
Other ways to set, and get essential environment information are standard Perl packages like Config.pm. This method is an alternative to locally defined EVs.
- The CLEARCASE_* EVs are defined because the trigger is a sub process under the server-side ClearCase operation, like check-out.
- CLEARCASE_* path name EVs (CLEARCASE_PN, CLEARCASE_XPN, CLEARCASE_OUT_PN, CLEARCASE_PN2, and others) reference a temporary snapshot view on the server side (backing store). This view is an unpopulated area where files appear temporarily during operations.
- ClearCase Remote Client pre-op check-in triggers that modify the file that you check in are not supported in ClearCase Remote Client.
- The CLEARCASE_SERIES_ID and CLEARCASE_*_SERIES EVs identify whether a ClearCase operation is part of a "batch" of related operations. An example is an operation that checks out 10 files together.
The trigger uses the CLEARCASE_SERIES_ID and CLEARCASE_*_SERIES EVs to indicate whether an operation changes a group of files at the same time. The type and purpose of the trigger determines whether the trigger uses the EV and which EV the trigger uses,
The operations can be one of the following operations.
- Undo check-out
You can set these environment variables for use with ClearCase Remote Client 7.0.1 and newer.
- Currently, interactive triggers cannot determine whether a series is in progress.
- The CLEARCASE_SERIES_ID and CLEARCASE_*_SERIES Ev are undocumented.
The file might not exist in the server snapshot view, backing store when the trigger starts the process. A pre-check-in trigger does not see the file or the correct contents on the server side until after the check-in. A post-check-in trigger sees the correct contents. The file does not necessarily remain for a long time after the operation. Therefore, a later trigger for another file might find that the earlier file is no longer available.
16 June 2018