Step 4: Use the Workflow to Enforce SCM Policies

Once you have created a workflow, you can use it to enforce compliance with your SCM development and release policies. You might want to ensure that only defects in the Done stage can be promoted to your QA stream, and that only defects in the Closed stage can be promoted to your Production stream, for example. You do this using workflow stages to create rules that restrict entry into and, optionally, exit from a stream.
  1. Open the StreamBrowser in the AccuRev Web UI.
  2. Right-click the stream for which you want to enforce compliance and choose Workflow Rules... The Workflow Rules for Stream dialog box appears.
  3. By default, AccuRev allows incomplete issues in a stream. Clear the Allow incomplete issues in this stream check box if you want to restrict entry to complete issues.
  4. In the Choose Workflow field, select the workflow whose stages you want to use to create stream entry and exit rules. In this example, we use the defects workflow created earlier and click the Add button. A tab displaying options for stream entry and exit rules for the selected workflow appears.

    GUID-1C848C24-DC47-4A9C-9356-455076294E93-low.png

  5. By default, all issue types are allowed in the stream. AccuRev uses the specified workflow to enforce rules only on those issues that are subject to that workflow. If you want to restrict entry to this stream to only those issues that are subject to this workflow, select the Allow issues from specified workflows only check box. Stream entry and exit rules, if any, are enforced on those issues. To further restrict entry into or exit from a stream to issues in a specific workflow stage:
    1. In the Stream Entry Rules section, select the Restrict entry to issues in specified workflow stages radio button.
    2. In the When Stage Is column, select the stage you want an issue to be in before it can be promoted to this stream. For example, you might want to restrict entry to the QA stream to issues whose status is Done, meaning that development is finished and the issue is ready to be verified by QA.
    3. Optionally, in the Perform This Transition field, select the transition you want to execute when the issue is promoted to the stream for which you are setting workflow rules. For example, when an issue is promoted to the QA stream, you might want to execute the to Closed transition, which changes the issue’s Status field from Done to Closed.
    4. If you choose, you can also specify rules to restrict exit from a stream. Click the down arrow next to Stream Exit Rules to display those fields.
    5. If you want to set rules on this stream for a different workflow, return to Step 4, otherwise, click the Ok button on the Workflow Rules dialog box to save the workflow rules for this stream.
      Note: Clicking the X icon on the workflow tab deletes the workflow rules for that workflow. It does not simply close the tab.

When you are done, streams for which you have set up workflow rules display a workflow icon.

Tip: You can click this icon to display the Workflow Rules for Stream dialog box to review and modify the workflow rules specified for a stream at any time.