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 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 for more information.
To create a workflow:
In the AccuRev Web UI, click the Admin menu and choose Create Workflow.
The Create Workflow dialog box appears.
- In the Depot field select the depot for which you want to create a workflow.
- In the Workflow field, enter a name for the workflow. Workflow names are not case-sensitive.
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. To specify them another time, click Cancel.
The workflow is empty by default. To get started defining your workflow, see Creating and Managing Workflows.
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. 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 Builderfor 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:
- Create a workflow (after you specify the name and depot for the workflow)
- Exit a workflow (if you have not already defined conditions for the workflow)
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.
You can create a new workflow by copying an existing workflow and giving it a unique name and unique conditions.
To copy a workflow:
In the AccuRev Web UI, click the Admin menu and choose Copy Workflow.
The Open Workflow dialog box appears.
- In the Depot field, select the depot whose workflow you want to copy.
- In the Workflow field, select the workflow you want to copy.
- In the New Workflow field, enter a name for the new workflow.
AccuRev displays a message reminding you that you need to create a unique set of conditions in order to activate the workflow.
AccuRev displays the Set Workflow Conditions dialog box.
Specify a set of conditions for the new workflow.
Note: The conditions for this workflow must be unique. See Activating a Workflow: Defining Workflow Conditions for more information.
- Make any changes needed to the new workflow. See Creating and Managing Workflow Stages and Creating and Managing Workflow Transitions if you need help with this step.
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:
In the AccuRev Web UI, click the Admin menu and choose Open Workflow.
The Open Workflow dialog box appears.
- To open a workflow defined in the current depot, select it from the Workflow field and click Ok.
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:
- Open the workflow you want to rename. See Opening a Workflowif you need help with this step.
Click the Rename button on the Workflow Editor toolbar.
The Rename Workflow dialog box appears.
- 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 to learn more about setting workflow rules for a stream.
To delete a workflow:
- Open the workflow you want to delete. See Opening a Workflowif you need help with this step.
Click the Delete button on the Workflow Editor toolbar.
AccuRev displays a message asking you to confirm that you want to delete the workflow.
- Click Yes to delete the workflow. Click No to cancel the delete operation.