B. AccuWork : Transaction-Level Integrationbetween AccuRev and AccuWork

Transaction-Level Integration
between AccuRev and AccuWork
There are two similar, but separate facilities that integrate AccuRev's configuration management functionality with its issue management (AccuWork) functionality. The one described in this topic a particular issue-record field as the point of integration. The other (Change-Package-Level Integration between AccuRev and AccuWork on page 328) uses change packages as the point of integration. Both integrations record information about the Promote transaction in a user-specified AccuWork issue record.
The integration between configuration management and issue management at the transaction level records the number of each promote transaction in a particular field of a user-specified issue record.
Enabling the Integration
The transaction-level integration is enabled on a depot-by-depot basis, by setting the depot's pre-promote-trig trigger. For example:
accurev mktrig -p kestrel pre-promote-trig client_dispatch_promote
Note that "client_dispatch_promote" is simply a keyword, not the name of a script file. The integration is implemented by two cooperating routines, one built into the AccuRev client software, one built into the AccuRev server software.
Triggering the Integration
Once the integration is enabled for a depot, it is activated whenever a user executes the Promote command in any workspace or dynamic stream:
1.
The depot's default query, as defined on the Queries tab (Issues > Queries), is executed and the results are displayed to the user.
Note: If you have enabled the use of third-party issue tracking system (ITS) keys in the AccuWork schema, the Select Issue (Change Package) dialog displays additional controls that let you specify whether you want to use AccuWork issue numbers or third-party keys when selecting issues to promote against. See the section “Using Third-Party Keys in the Java GUI” in the AccuRev® Technical Notes for more information.
2.
3.
The Promote command completes its work, propagating the versions to the backing stream.
4.
The Promote transaction number is recorded in the affectedFiles field of the selected issue record. (This change to the issue record is, itself, recorded as a transaction, of kind dispatch.)
If the user enters "0" or makes a blank entry, the Promote command completes but no change is made to any issue record. This provides a way for the user to bypass the integration.
Over time, the affectedFiles field of a given issue record can accumulate a SPACE-separated list of Promote transaction numbers.
Implementation and Customization of the Transaction-Level Integration
When the transaction-level integration is activated, processing takes place on both the AccuRev client machine and the AccuRev server machine:
·
The client-side processing -- querying the AccuWork issues database and prompting the user to specify an issue record -- is structured as a pre-promote-trig trigger routine built into the AccuRev client software.
·
The server-side processing -- updating of the AccuWork issue record -- is structured as a server-post-promote-trig trigger routine built into the AccuRev server software.
You enable the integration by setting the pre-promote-trig trigger with the "client_dispatch_promote" keyword, as described above. You don't need to explicitly set a server-post-promote-trig trigger script. If you do, the script runs instead of -- not in addition to -- the server-side built-in routine.
In most cases, you'll want to avoid setting a server-post-promote-trig trigger script, just letting the built-in routines do their work. But suppose that after a Promote , you want the server machine to perform operations in addition to those defined in the transaction-level integration -- for example, updating reference trees and sending email messages. In such cases:
1.
Create a script that performs the server-side part of the transaction-level integration, along with the desired additional processing. Start with the sample script server_dispatch_promote_custom.pl, which is located in the examples/dispatch subdirectory of the AccuRev installation directory.
2.
3.
Use a mktrig command to make the script the depot's server-post-promote-trig trigger script.
Further customizations of the transaction-level integration are possible. For example, you might want the user to be able to specify several issue records, not just one. Or you might want to link promote commands in one depot with the AccuWork issues database in another depot. Or you might want to update an issue record field other than affectedFiles. In such cases, you'll want to dispense with the built-in "client_dispatch_promote" routines altogether:
1.
Start with the sample script client_dispatch_promote_custom.pl (in the examples/dispatch subdirectory), and create your own script for use as a pre-promote-trig script to execute on the client.
2.
As described above, start with the sample script server_dispatch_promote_custom.pl (in the examples/dispatch subdirectory), and create your own script for use as a server-post-promote-trig script to execute on the server.
If Both Integrations are Enabled
Both the change-package-level and transaction-level integrations can be enabled for a given depot at the same time. In this case, a user performing a Promote command in a workspace is prompted to specify an issue record just once, not twice. The prompting for an issue record by the change-package-level integration takes place as usual. That issue record is then updated by both integrations.
Note that even if both integrations are enabled, a Promote command performed in a dynamic stream (not a workspace) activates just the transaction-level integration, not the change-package-level integration.

AccuRev, Inc.
Phone: 781-861-8700
Fax: 781-861-8704
support@accurev.com