Writing Rational ClearCase triggers for synchronization

Rational® ClearCase® users can write triggers that perform Rational ClearCase actions during synchronization.

About this task

The ClearCase Synchronizer runs cleartool commands to perform operations. As with any cleartool operation, pre-op triggers that are in place are also run during this process. If the success criteria for the trigger are not met, the synchronization is blocked as a result of the trigger failure. The synchronization process is not running interactively, so pre-op triggers that prompt for input can cause problems.

The ClearCase Synchronizer processes the output from the cleartool commands that it issues. Extraneous output from triggers can cause the synchronization to be blocked. Post-op triggers that do not write to stdout and stderr are not problematic; the ones that do might be problematic, depending on the command and the nature of the output.

The ClearCase Synchronizer does not run in a view context, so triggers must be (re)written without the expectation of a view context.

Rational ClearCase triggers that might interact with synchronization can use one of the environment variables CONNECTOR_SYNCH and ATRIA_WEB_GUI, which are set during synchronization. All attempts in a trigger to interact with the user must be guarded by a check on one of these variables. If either is set, no interaction with the user should be attempted, and instead the best value that can be automatically computed must be used. If no value can be automatically computed, the script must fail. Synchronization sets the environment variable ATRIA_WEB_GUI to a value of 1, which disables clearprompt.

The ClearCase Synchronizer includes an environment variable that makes it possible to use work item information in Rational ClearCase triggers. During each synchronization, the list of Rational Team Concert™ work items that are associated with changes that are being synchronized to Rational ClearCase are made available in the environment variable CCASE_JAZZ_WORK_ITEMS. Rational ClearCase users can use this variable in triggers that performRational ClearCase actions. For example, a trigger can add the list of work items to check-in or check-out comments in Rational ClearCase or a trigger can create attributes for the work item information about new Rational ClearCase versions that are created during the synchronization.


video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki