Using action hooks to send e-mail

You can use an action notification hook to send e-mail messages when a user completes a specification. In your hook code, you use the Rational® ClearQuest® API to create the message and send it.

About this task

The predefined schemas include the Send_Email_Notif base action in all enabled records. This action calls RSEM_ProcessEmailRules, and the action type is used for all actions.

If you change the names of record types or actions in the schema, you must update your action hook to reflect the new names.

To create an action notification hook:

Procedure

  1. Start the Designer.
  2. Log on to the Designer as a user with the schema designer or super user privilege.
  3. Expand Record Types or Record Types - Stateless until you see the Actions folder.
  4. Double-click Actions to open the Actions grid.
  5. In the Actions grid, click the Notification column of the action that you want to add the notification hook to; then click the arrow icon and click SCRIPTS > BASIC or SCRIPTS > PERL. If Instant Editing Mode is enabled, the Designer starts the Script editor. If Instant Editing Mode is disabled, double-click the cell to start the Script editor.

    VBScript and Perl have their own script editors. The Designer indicates the current editor in the title bar of the Designer window. Verify that you are using the correct editor before adding or editing your code.

  6. Add your hook code, and then click Hooks > Compile to compile your code and verify that there are no syntax errors.

Results

For more information, see Action hooks and the Action notification hook example in the Rational ClearQuest API reference pages.