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.

Action Type Description Availability

Entry

Describes the action to perform on a field when the issue record enters the stage by transition.

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 for a description of setValue and other available actions.

Stages only

Validation

Describes the action to perform on one or more fields in an issue record. Validation actions can be specified for stages and transitions and are performed:

  • Any time the issue record is opened (when the validation action is specified as part of the stage)
  • Any time a transition is executed on an issue (when the validation action is specified as part of the transition)

Example: You might specify a validation action for the WIP stage that sets the Owner field to required.

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.

Stages and
transitions

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.

Back to top

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.

Action Description Can be Repeated

setValue

Sets any field on the Issue Edit form to the value you specify. For example, you can use the setValue action to set the Status field to Scheduled.

Yes

setChoices

Restricts fields on the Issue Edit form with a type of Choose to the values you specify. For example, you might want a user to be able to select from only a subset of all the operating systems defined as valid values for the Platform field.

Yes

setRequired

Makes the field on the Issue Edit form required: AccuWork highlights the field label in red and prevents the user from saving the issue record until a value for the required field has been specified.

To select multiple values, use the Ctrl or Shift key when selecting values.

No

setIssuePermission

Makes the entire Issue Edit form read-only (ro).

No

setTabPermission

Makes any tab of the Issue Edit form you specify (Basics, Assignment, and so on) read-only (ro).

Yes

setFieldPermission

Makes any field on the Issue Edit form you specify
read-only (ro).

Yes

setChangesRequired

Prevents the user from saving the current issue record unless there is at least one entry in its change package. The change package is displayed on the Changes tab of the Issue Edit form.

No

setParentRelationshipRequired

Prevents the user from saving the current issue record unless it has been specified as being dependent on another issue record. Valid for any field on the Issue Edit form with a type of Relationship; typically these are Dependencies, Duplicates, Subtasks, and Tracking Issues. (See Relationships Subtab for more information on specifying issue dependencies.)

No

setChildRelationshipRequired

Prevents the user from saving the current issue record unless one or more other issue records have been specified as dependents of the current issue record. Valid for any field on the Issue Edit form with a type of Relationship; typically these are Dependencies, Duplicates, Subtasks, and Tracking Issues. See Relationships Subtab for more information on specifying issue dependencies.

No

Back to top

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:

Workflow Object Dialog Boxes Location of Actions Editor

Stage

Add Stage

Edit Stage

Entry Actions tab

Validation Actions tab

Transition

Create New Transition

Edit Transition

Validation Actions tab

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. Choose the depot and the workflow you want to open and click Ok.

    The Workflow Editor appears.

  3. In the workflow diagram, select the workflow stage or transition whose actions you want to specify.
  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. For a stage, click the Entry Actions or Validation Actions tab; for a transition, click the Validation Actions tab.

    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. Set the values for the action.

    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.

Back to top