When to use Rational ClearQuest scripts instead of UCM triggers

There are several use cases for UCM triggers. If your UCM project is enabled to work with Rational® ClearQuest®, you can set the following policies:
  • For submitting records from the DevOps Code ClearCase® client
    • Disallow Submitting Records from the ClearCase Client
    • Allowed Record Types
  • For WorkOn
    • Perform ClearQuest Action Before Work On
  • For delivery
    • Perform ClearQuest Action Before Delivery
    • Transfer ClearQuest Mastership Before Delivery
    • Perform ClearQuest Action After Delivery
    • Transition to Complete After Delivery
    • Transfer ClearQuest Mastership After Delivery
  • For changing an activity
    • Perform ClearQuest Action Before Changing Activity
    • Perform ClearQuest Action After Changing Activity
    • Transition to Complete After Changing Activity

Some of these policies have Rational ClearQuest global hook scripts associated with them, which you can edit or replace in Rational ClearQuest Designer to customize the policy for your environment. You can also write your own Rational ClearQuest hooks to enforce development policies. In general, if the policy you want to enforce involves a Rational ClearQuest action, use one of the Rational ClearQuest policies previously mentioned or use Rational ClearQuest hooks. If the policy you want to enforce involves a DevOps Code ClearCase action, use UCM triggers.

Some operations might have DevOps Code ClearCase triggers and Rational ClearQuest hooks associated with them. For example, you might define a trigger that sends e-mail to team members when a developer completes a deliver operation, and you might have the Perform ClearQuest Activity After Delivery policy enabled. Under DevOps Code ClearCase and Rational ClearQuest control, triggers, hooks, and UCM operations are run in the following order:

  • DevOps Code ClearCase preoperation trigger
  • Rational ClearQuest preoperation hook
  • UCM action
  • Rational ClearQuest postoperation hook
  • Rational ClearQuest transition activity hook
  • DevOps Code ClearCase postoperation trigger

You can use the Rational ClearQuest API to write code that runs in the Rational ClearQuest environment. For example, you can modify records that users submit or validate the records before they are committed to the user database. For code examples that work with cqperl on Linux® and the UNIX® system, see IBM Rational ClearQuest API Reference.