A Better Solution, Inc. - ClearCase Triggers

"clearcase triggers, clearcase scripts, clearcase tools, clearcase knowledge base, triggers, scripts, tools, knowledge base, clearcase, Clearcase, Rational, clearCase consulting, Jazz tools consultant, ABS, training, GSA, Rational, IBM, GSA, BM Rational Tools consultant, Clearquest, ClearCase training, CM, scm, ClearCase help, consulting, trainer, training, ClearCase guru, configuration management" "RTC, Rational Team Concert, clearcase, CLEARCASE resume, trainer, consultant, clearcase, BM Rational Tools consultant, ClearCase training, GSA contract holder, Rational, IBM, CM, scm, ClearQuest Consulting, ClearCase help, consulting, trainer, training, ClearCase guru, configuration management" "ClearCase training, RTC, Requisite Pro, JAZZ, ABS, GSA Schedule holder, Rational, IBM, ClearCase training, CM, scm, ClearCase help, consulting, ClearQuest, BM Rational Tools consultant, trainer, training, ClearCase guru, configuration management"
Helpful ClearCase triggers applied primarily by ClearCase Administrators to help create and enforce policy for their users. ABS provides triggers that define and enforce those policies. Here are a few triggers with their associated source code (written in Perl or Shell). Use as needed. Our gift to you. "clearcase triggers, clearcase scripts, clearcase tools, clearcase knowledge base, triggers, scripts, tools, knowledge base, clearcase, Clearcase, Rational, clearCase consulting, Jazz tools consultant, ABS, training, GSA, Rational, IBM, GSA, BM Rational Tools consultant, Clearquest, ClearCase training, CM, scm, ClearCase help, consulting, trainer, training, ClearCase guru, configuration management" "RTC, Rational Team Concert, clearcase, CLEARCASE resume, trainer, consultant, clearcase, BM Rational Tools consultant, ClearCase training, GSA contract holder, Rational, IBM, CM, scm, ClearQuest Consulting, ClearCase help, consulting, trainer, training, ClearCase guru, configuration management" "ClearCase training, RTC, Requisite Pro, JAZZ, ABS, GSA Schedule holder, Rational, IBM, ClearCase training, CM, scm, ClearCase help, consulting, ClearQuest, BM Rational Tools consultant, trainer, training, ClearCase guru, configuration management"

#############################################################
# INHIBIT_DUPLICATE_ELE.pl  (Perl)
#
# Before allowing a new element to be created make sure that the
# element does not already exist in for this directory in some
# branch that is invisible to thie current view.  If the element
# already exist warn the user and disallow the action.
#
# If the user is the VOB_OWNER then give the option to abort the
# mkelem or perform the action anyway
#
# Author: Charles W. Clarke III (ABS)
# email:  charles@abs-consulting.com
# URL:    http://www.abs-consulting.com
# Date:   Apr. 08,  1998
############################################################
# History: 04/08/98 : Created for A Better Solution, Inc.
#        : 11/11/00 : Added line for ClearCase 4.0
#        : 08/22/01 : Tweaked for UNIX - Thanx - Maggie Stearns
#        : 01/23/02 : Changed "Windows_NT" to "Windows*"
#        : 04/23/02 : Changed to be called from lnname:mkelem
#        : 04/27/02 : Change algorythm to a faster one.
#        : 09/04/02 : Removed trailing space - thanx Mark Jaskilka
#        : 03/02/03 : Changed to also work for ln, ln -s 
#                   : as well as mkelem and "move" command. 
#        : 07/01/03 : - Compressed some "if" statements
#                   : - Test if possible dupe is same named branch
#        : 03/19/07 : Added change for slink
#        : 06/19/08 : Added case for snapshpt views (thanx Greg)
#############################################################


This trigger script is expected to be called from a preop trigger. 
Notice it is not called from pre-mkelem, pre-mkslink or 
pre-mv (there "actually" is no pre-mv). This is because they each 
actually call a cleartool lnname first, so the trigger is appied there.

The administrator should create an trigger like so (or similar):

    cleartool mktrtype -ele -all -pre lnname \
          -c "Only allow the VOB-owner the ability to create elements that \
              already exist as duplicates in the current directory but in \
              a branch hidded from the current view" \
          -exec "{path}/perl {path}/INHIBIT_DUPLICATE_ELE.tgr" INHIBIT_DUPLICATE_ELE


Shortcut using...

If using ClearTrigger, you don't need to write ANY trigger code... Just turn on this functionality bit (bit 2) in the configuration file.

Read more on Policy without Triggers using ClearTrigger.


View Trigger Code.  (Perl)