4. Using Workflow to Enforce SCM Policy : Specifying Actions for Stages and Transitions

Specifying Actions for Stages and Transitions
The Stage Generator automatically creates the stage actions required to create a functional workflow. There might be occasions, however, when you need to specify additional actions to enforce your desired workflow process. For example, you might decide that you want the complete transition to set the Date Completed field to the current date. You would do this by specifying the setValue action on the Validation Actions tab for the transition, as shown here:
This section describes the types of actions available for stages and transitions and how to specify them.
Types of Actions
The following table summarizes the types of actions you can specify for stages and transitions.
Example: You might specify a stage entry action to set the value of the Status field to WIP when an issue enters the WIP workflow stage.
Note: Stage entry actions are restricted to setValue. See Predefined Actions on page 158 for a description of setValue and other available actions.
Note: Validation actions for stages and transitions are optional; specify them only if you want AccuRev to perform actions on issue records that the stage entry action is not already performing.
Note: If you choose to manually specify actions for a stage and the transition associated with it, you must ensure that the actions do not conflict with each other.
Predefined Actions
AccuRev provides several predefined actions that you can use to automate and enforce your workflow process—you can use predefined actions to set field values, make fields required, or restrict access to tabs on the Issue Edit form to a specific user or group, for example.
Predefined actions are summarized in the following table. Note that you can repeat some actions in the context of a single stage or transition. For example, you might want the assign transition to set the value for both the Status and State fields. You would do this by specifying two setValue actions for the assign transition: one for Status and one for State.
How to Specify a Stage or Transition Action
You specify actions for workflow stages and transitions using the Actions Editor, such as the one on the Validation Actions tab shown here:
The procedure for defining an action is the same for both workflow stages and transitions—only the location of the Actions Editor varies, as summarized in the following table:
To specify a stage or transition action:
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.
4.
Click the Edit button () on the Workflow Editor toolbar.
Alternative: Right-click the workflow stage or transition and choose Edit from the context menu.
The Edit dialog box appears for the object you selected.
5.
Click the Edit Logic button.
The dialog box expands to show additional panels that let you specify advanced settings for the workflow object.
6.
Existing actions are displayed, if any have been specified for the workflow stage or transition.
7.
Click Click Here to Add Action and select an action from the drop-down list.
The action is displayed in a table, along with fields that let you set its value. The setChoices action is shown here, for example:
8.
Tip: You can use drag select or Ctrl+ click to select multiple values from drop-down lists, like the values for the Category field in the previous example.
9.
Repeat Step 7 and Step 8 to specify additional actions.
Click the Delete button () to delete an action.
10.
Click Ok to change the workflow stage or transition actions.
11.
Click the Save button () to save your changes to the workflow.

Borland