This section describes how to implement the server_master_trig trigger -- what changes to make to it and how to enable it -- to support gated streams. Note that this section describes aspects of trigger implementation that are unique to the server_master_trig trigger. See Chapter 10 AccuRev Triggers for more information on AccuRev triggers and how to use them.The first thing to do in order to implement the server_master_trig trigger is to create a non-expiring session on the AccuRev Server by logging in to the AccuRev Server using accurev login -n <username> <password>. This is typically the admin user. Make a note of this user’s username as you will need include it in the server_master_trig trigger when you edit it.This is a one-time procedure, and one which you might have already performed if you are already using server-side triggers in your AccuRev installation. See Trigger Script Execution and User Identities for more information.All sample triggers are installed to the examples directory where you installed AccuRev, c:\Program Files (x86)\AccuRev\examples\, for example. In order to edit the server_master_trig trigger:
1. Make a copy of the server_master_trig trigger. Do not edit the server_master_trigger.pl file in the examples directory.
b. Modify the path shown for $::AccuRev= as needed.
b. Replace replace_with_username with the <username> you specified using the login -n command in the preceding section, Step 1: Create a Non-expiring Session.You use this section of the server_master_trig trigger script to specify what it is you want the trigger to do. For example, you can use Perl to:
5. When you have finished modifying your copy of server_master_trig.pl, save your changes.Once you have saved your changes to server_master_trig.pl:
1. Create the a \storage\site_slice\triggers directory where you installed AccuRev if one does not already exist.
2. Once you have saved your changes to server_master_trig.pl, you need to create batch file if your AccuRev server is running on Windows. It is the batch file that AccuRev executes when elements are promoted into the gated stream.
1. Navigate to the \storage\site_slice\triggers directory where you copied the server_master_trig trigger.This creates a batch file with the same name as the trigger (server_master_trig.bat).
Micro Focus |