This page specifies the conditions that cause a
trigger to fire. This information on this page was specified when the trigger
type was created.
If you have the proper permissions,
you can modify this information by using the mktrtype -replace command
on the command line.
Items in the firing conditions page
- Kind
- Specify the basic kind of trigger using one of the following three fields:
- Element
- Explicitly attach triggers of this type to one or more individual elements
with the mktrigger command.
- All Elements
- Associates triggers of this type with all elements in the VOB. (Therefore,
the mktrigger command is not required.)
In effect, an
instance of the type is implicitly attached to each element in the VOB. This
trigger type is useful for disallowing creation of elements that have certain
characteristics.
If a post-operation trigger action returns a nonzero
exit status, a failed exit status warning message is displayed, but any other
trigger actions continue.
This kind of trigger is useful for recording
the occurrence of the operation. For example, a post-operation trigger on
checkin might attach an attribute to the checked-in version and send a mail
message to interested users and/or managers.
- Type
- Triggers of this type are associated with specific type objects. The trigger
actions are performed when any of the specified type objects is created or
modified.
- When
- The following two fields specify that a trigger be fired either before
or after the occurrence of the set of operations that cause the trigger to
fire.
- Pre
- Causes the trigger to fire before the corresponding Rational® ClearCase® operation
begins. If any trigger action returns a nonzero exit status, the Rational ClearCase operation
is canceled. If all trigger actions return a zero exit status, the Rational ClearCase operation
proceeds.
This type of trigger is useful for enforcing policies. For example,
a pre-operation trigger might prohibit checkin of an element that fails to
pass a code-quality test.
- Post
- Causes the trigger to fire after the corresponding Rational ClearCase operation
is completed. Trigger actions take place in the order you specify.
If a
post-operation trigger action returns a nonzero exit status, a failed exit
status warning message is displayed, but other trigger actions, if any, continue.
This
kind of trigger is useful for recording the occurrence of the operation. For
example, a post-operation trigger on checkin might attach an attribute to
the checked-in version and send a mail message to interested users or managers.
- Operations
- The operations that can cause a trigger to fire. An operation can be one
of the following:
- A command, or sequence of commands, that can be invoked
from a command prompt. A command can use special environment variables (EVs),
which are described in the Trigger Environment Variables section, to retrieve
information about the Rational ClearCase operation.
- A built-in action as defined by mktrtype.
The built-in actions attach metadata annotations to the object involved in
the Rational ClearCase operation.
- UCM object
- Explicitly attach triggers of this type to one or more individual UCM
objects with the mktrigger command.
- All UCM objects
- Triggers of this type are associated with all UCM objects in a PVOB, subject
to the restriction list. (Therefore, the mktrigger command
is not required.)
In effect, an instance of the trigger is implicitly attached
to each UCM object in a PVOB.
- Exceptions
- You can specify exceptions using the following two fields:
- Excluded Users
- Prevents the trigger from firing when any of the listed users performs
the actions specified in the Operations box.
By default, triggers fire no
matter who performs the specified Rational ClearCase operation.
- Restrictions
- By default, a trigger fires when any of the specified operations occurs,
no matter what type objects are involved. You can limits the scope of the
operation so that the trigger fires only if the operation involves particular
type objects. To do so, define an element trigger type or all-element trigger
type with a restriction list.
The items on the restriction list form a logical
condition at trigger firing time. If the condition is met, the trigger fires;
otherwise, the trigger does not fire.
If the list includes multiple
type objects, they are combined into a compound condition according to the
following rules:
- Objects of the same kind are first grouped with logical
OR operators.
- Next, objects (or groups) of different kinds are grouped
with logical AND operators.
In forming the condition, a type object is ignored if it could
not possibly be affected by the Rational ClearCase operation.