4. Using Workflow to Enforce SCM Policy : Linking Workflow Stages

Linking Workflow Stages
In AccuRev, you use a transition to link one workflow stage to another. The stage from which you are linking is referred to as the source stage; the stage to which you are linking is referred to as the destination stage. In the following illustration, Scheduled is the source stage; it is linked to WIP, the destination stage, by the assign transition:
Here, only the WIP stage is currently being used as a destination stage. The Scheduled stage currently has no source stages linked to it via the schedule transition.
Destination Stage Transitions
The destination stage in a pair of linked workflow stages must have a transition associated with it—without it, there is no way for an issue to enter that stage using workflow transitions. In the following example, the Closed stage cannot currently be used as a destination stage because it does not have a transition associated with it:
Once the Closed stage is associated with a transition, called cancel, for example, issues can move to it through the workflow from either the New or Scheduled stages, as shown here:
Note that a destination stage can be referenced by more than one source stage. In addition, a destination stage may have more than one transition associated with it. You might want to set up your workflow such that an issue can move from WIP to Closed via a complete transition, for example.
Creating Transitions for Destination Stages
In most cases, stages are associated with transitions. When you use the Stage Generator to create workflow stages, for example, AccuRev automatically creates a transition that uses that stage as its destination. AccuRev also lets you create new transitions for destination stages as part of the stage linking process.
Linking Workflow Stages Using Existing Transitions
There are two ways to link workflow stages using existing transitions, as summarized in the following table:
Tip: You can also use the Link Stages dialog box to create a new transition for the destination stage. See Linking Workflow Stages Using a New Transition on page 153 for more information.
You can also create a transition at the same time you create the link. See Linking Workflow Stages Using a New Transition on page 153.
Using the Link Stages Dialog Box
1.
In the AccuRev Web UI, click the Admin menu and choose Open Workflow.
The Open Workflow dialog box appears.
2.
The Workflow Editor appears.
Tip: If you select a stage in the workflow diagram, AccuRev uses that stage as the default source stage in the following step.
3.
Click the Link Stages button () on the Workflow Editor toolbar.
The Link Stages dialog box appears.
4.
When you select a destination stage, the Transition field displays transitions associated with that stage.
5.
Select the appropriate transition from the Transition field and click Ok.
AccuRev links the source and destination stages using the transition you selected.
6.
Click the Save button () to save your changes to the workflow.
Using the Context Menu
To link two workflow stages using the stage context menu:
1.
In the AccuRev Web UI, click the Admin menu and choose Open Workflow.
The Open Workflow dialog box appears.
2.
The Workflow Editor appears.
3.
AccuRev displays a menu listing transitions associated with available destination stages as shown in the following example:
4.
AccuRev links the source stage you specified in Step 3 with the destination stage associated with the transition you specified in this step. For example:
5.
Click the Save button () to save your changes to the workflow.
Linking Workflow Stages Using a New Transition
Use this procedure when you want to link two workflow stages using a new transition that you create for the destination stage.
1.
In the AccuRev Web UI, click the Admin menu and choose Open Workflow.
The Open Workflow dialog box appears.
2.
The Workflow Editor appears.
3.
Click the Link Stages button () on the Workflow Editor toolbar.
The Link Stages dialog box appears.
Tip: If you select a stage in the workflow diagram, AccuRev uses that stage as the default source stage in the following step.
4.
When you select a destination stage, the Transition field displays the transitions associated with that stage.
5.
Click the Create New Transition button ().
The Create New Transition dialog box appears:
Tip: The Destination Stage field displays the name of the destination stage you selected in Step 4.
6.
In the Transition Name field, enter a name for the transition.
7.
8.
9.
You are returned to the Link Stages dialog box.
10.
Click Ok to link the source and destination stages using the new transition.
11.
Click the Save button () to save your changes to the workflow.
Unlinking Workflow Stages
When you unlink two workflow stages, you are simply de-coupling the source and destination stages; it has no effect on the transition associated with the destination stage. If you want to delete a transition, see Deleting a Workflow Transition on page 149.
There are two ways to unlink workflow stages, as summarized in the following table:
Using the Unlink Stages Dialog Box
1.
In the AccuRev Web UI, click the Admin menu and choose Open Workflow.
The Open Workflow dialog box appears.
2.
The Workflow Editor appears.
3.
Click the Remove Links button () on the Workflow Editor toolbar.
The Remove Links dialog box appears.
4.
5.
Click the Remove button.
AccuRev unlinks the source and destination stages you selected.
6.
Click the Save button () to save your changes to the workflow.
Using the Source Stage Context Menu
To unlink two workflow stages using the source stage context menu:
1.
In the AccuRev Web UI, click the Admin menu and choose Open Workflow.
The Open Workflow dialog box appears.
2.
The Workflow Editor appears.
3.
AccuRev displays a menu listing the transitions associated with destination stages as shown in the following example:
4.
AccuRev unlinks the source stage you specified in Step 3.
5.
Click the Save button () to save your changes to the workflow.

Micro Focus