4. Using Workflow to Enforce SCM Policy : Creating and Managing Workflows

Creating and Managing Workflows
This section describes how to create and manage workflows, including procedures for defining workflow conditions, and opening, renaming, and deleting workflows.
Restricting Access to Workflow Administration
By default, the ability to perform workflow administration operations (creating and deleting, renaming, associating with streams, and so on) is limited to the AccuRev users in your Admin group if you are using the server_admin_trig trigger to enforce AccuRev security. To restrict access to workflow operations in this case, simply ensure that the AccuRev users who will be responsible for implementing workflow are members of this group.
For more information on the server_admin_trig trigger, see the AccuRev Triggers topic in the AccuRev® Administrator’s Guide. To learn more about other ways to implement security in AccuRev, see the AccuRev Security Overview topic, which is also in the AccuRev® Administrator’s Guide.
Creating a Workflow
You can create one or more workflows for a depot. Note that a workflow is not activated until you define conditions for it. See Activating a Workflow: Defining Workflow Conditions on page 135 for more information.
Tip: You can also create a workflow by copying an existing workflow and specifying a unique set of conditions for it. See Copying a Workflow on page 136 for more information.
To create a workflow:
1.
In the AccuRev Web UI, click the Admin menu and choose Create Workflow.
The Create Workflow dialog box appears.
2.
In the Depot field select the depot for which you want to create a workflow.
3.
In the Workflow field, enter a name for the workflow. Workflow names are not case-sensitive.
4.
The Workflow Editor appears, along with the Set Workflow Conditions dialog box.
If you want to specify workflow conditions now, see Activating a Workflow: Defining Workflow Conditions on page 135. To specify them another time, click Cancel.
The workflow is empty by default. To get started defining your workflow, see Creating and Managing Workflow Stages on page 138.
Activating a Workflow: Defining Workflow Conditions
In order for AccuRev to use a workflow for issue process automation and SCM policy enforcement, you must activate the workflow. You activate a workflow by defining one or more conditions that identify the issues are subject to it. For example, you might decide to create a workflow to manage issues that are defects. In this case, you would define the condition for the workflow as Type = Defect. Thereafter, any issue in the depot whose Type field has a value of Defect is subject to the rules defined in that workflow.
Note: The conditions you specify for a workflow must be unique for all workflows within a depot.
Where to Define Workflow Conditions
You define workflow conditions using the Set Workflow Conditions dialog box, as shown in Step 4 in Creating a Workflow on page 134. Workflow conditions can be defined using any simple or compound clauses you need, including nested AND and OR statements.
The Set Workflow Conditions dialog box has the same features and uses the same mechanics as the AccuRev Web UI Query Builder. See Working with the Query Builder on page 64 for more information.
When to Define Workflow Conditions
You can define workflow conditions at the same time you create the workflow, or later. Remember, however, that a workflow is inactive until you have defined its conditions. AccuRev prompts you to define workflow conditions when you:
Displaying the Set Workflow Conditions Dialog Box
You can display the Set Workflow Conditions dialog box for any open workflow by clicking the Conditions button on the Workflow Editor toolbar.
Copying a Workflow
You can create a new workflow by copying an existing workflow and giving it a unique name and unique conditions.
To copy a workflow:
1.
In the AccuRev Web UI, click the Admin menu and choose Copy Workflow.
The Open Workflow dialog box appears.
2.
In the Depot field, select the depot whose workflow you want to copy.
3.
In the Workflow field, select the workflow you want to copy.
4.
In the New Workflow field, enter a name for the new workflow.
5.
AccuRev displays a message reminding you that you need to create a unique set of conditions in order to activate the workflow.
6.
AccuRev displays the Set Workflow Conditions dialog box.
7.
8.
Important: The conditions for this workflow must be unique. See Activating a Workflow: Defining Workflow Conditions on page 135 for more information.
9.
Opening a Workflow
You can open a workflow for the current depot, or for any depot you choose.
Tip: You must open a workflow if you want to rename it or delete it.
To open a workflow:
1.
In the AccuRev Web UI, click the Admin menu and choose Open Workflow.
The Open Workflow dialog box appears.
2.
To open a workflow for a different depot, first change the depot in the Depot field, then select the workflow and click Ok.
Renaming a Workflow
You can rename a workflow only if it is open in the Workflow Editor. You can rename a workflow even if it is already associated with a stream.
To rename a workflow:
1.
2.
Click the Rename button on the Workflow Editor toolbar.
The Rename Workflow dialog box appears.
3.
Enter a name in the New Name field and click Ok.
The new workflow name appears in the Workflow Editor tab, and in a label in the upper right corner of the Workflow Editor window.
Deleting a Workflow
You can delete a workflow only if it is open in the Workflow Editor. Deleting a workflow that is currently associated with a stream removes any workflow rules set on that stream. See Using Workflow to Enforce SCM Policies on page 161 to learn more about setting workflow rules for a stream.
To delete a workflow:
1.
2.
Click the Delete button on the Workflow Editor toolbar.
AccuRev displays a message asking you to confirm that you want to delete the workflow.
3.
Click Yes to delete the workflow. Click No to cancel the delete operation.

Borland