IBM Support

About firing ClearCase triggers from the GUI

Troubleshooting


Problem

This technote explains why IBM® Rational® ClearCase® triggers may fire correctly from the command line but not from the Graphical User Interface (GUI).

Resolving The Problem

GUI commands by default have the same behavior as their equivalent cleartool subcommand defaults before additional user input. For each cleartool subcommand, the ClearCase Reference Guide provides information on what the default behavior of said cleartool subcommand is. There are some differences to note, however, when writing triggers that work with both GUI commands and from the command line using cleartool subcommands.

  1. The trigger may reference the environment variable CLEARCASE_CMDLINE. This variable is used to allow triggers to access the cleartool command line arguments. For example, it may need necessary to determine if an unreserved checkout is being performed.

    The CLEARCASE_CMDLINE variable will not be present when the trigger is fired as the result of a GUI command. Triggers that parse the CLEARCASE_CMDLINE variable to determine specific flags may not work correctly. For example, parsing the CLEARCASE_CMDLINE variable searching for the string -identical in order to ensure that this switch is never used when checking in files.

  2. Trigger output may not be displayed from a GUI command. Triggers that display output by sending text to STDOUT may not display the text from a GUI operation. The GUI commands will only display output from a pre-op trigger that fails. Pre-op triggers that succeed and all post-op triggers will not display any of the output that might have been generated by the trigger.

  3. The current working directory of a trigger may not be the directory of the file that the trigger fired for. Triggers may be using the current working directory in order to determine some information. For example, some triggers may use the current working directory to determine the view. In many GUI tools the working directory of the trigger may have no relation to the file that the trigger fired on. The current working directory may be the Windows system directory or the ClearCase installation directory.

Related Information

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"GUI","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"2002.05.00;2003.06.00;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"GUI","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
07 November 2019

UID

swg21148523