AccuRev 4.7 Beta-1 with AccuWorkflow

Usage Notes

This note describes the configuration and use of AccuWorkflow, using the AccuRev 4.7 graphical user interface. It contains the following sections:

Defining an Issue Database's AccuWorkflow Configuration

Workflow Components

Defining Workflow Stages

Validation Actions for a Workflow

Specifying the Actions to be Performed by a Workflow Transition Button

Defining and Configuring Workflow Transitions

Attaching Workflow Transitions to Workflow Stages

Adjusting the Workflow Diagram

Configuring AccuWorkflow Queries

AccuWorkflow and the Stream Browser

Drag-and-Drop Operations in Workflow

Connecting Workflow Transitions to Promote Operations

AccuWorkflow and the Edit Form

Stage Transition Toolbar Buttons

AccuWorkflow Required Fields

AccuWorkflow and the Queries Tab

Assignment to a Group

Executing a Workflow Query

Working with the Results of a Workflow Query

Issue Record Fields Used in a Workflow Query

Configuring the Users/Groups and Streams Panes

The process of setting up AccuWorkflow for an AccuWork issue database involves working with the AccuWork Schema Editor. This process is described in section Defining an Issue Database’s AccuWorkflow Configuration. Read this section first, because it also provides an introduction to AccuWorkflow concepts.

AccuWorkflow user-level features are described in sections for the relevant parts of the GUI:

Defining an Issue Database's AccuWorkflow Configuration

Each AccuWork issue database has its own workflow, a directed graph whose nodes are called workflow stages and whose arrows are called workflow transitions. Here's an example, which will be used throughout this section.

Each issue record progresses, step by step, through the workflow specified in the issue database schema -- in this example, from stage New to stage Closed. AccuRev users can perform these workflow-related operations:

Workflow Components

The components of a workflow are initially defined on the Validation subtab:

On the Workflow subtab, you assemble these components into a complete workflow:

Defining Workflow Stages

On the Validation subtab, certain validations define workflow stages: if an issue record satisfies the validation condition, AccuWorkflow considers the issue record to be "in" that workflow stage:

After creating a condition containing one or more clauses, you can declare that the condition defines a workflow stage. Invoke the command Use as Workflow Stage from the condition's context menu. Enter a name for the workflow stage in the dialog box that appears. The name is then displayed above the condition, with a special "stage" icon.

If a condition has already been declared to define a workflow stage:

 

Validation Actions for a Workflow Stage

The user initiates a workflow transition by clicking a button in the toolbar of the issue record's edit form:

The set of validation actions for a workflow stage must explicitly enable the toolbar buttons, using validation actions of type enableAction:

As this example shows, you can define any number of workflow transition buttons for each workflow stage. And you can add actions that set field values, establish field requirements, etc. -- just as with non-workflow-related validations.

Creating a validation action of type enableAction requires several steps:

  1. Declare the "custom action" name (workflow transition name), using the Edit Custom Actions command on the Validation subtab.

  2. Note: the order of the custom actions is significant. It controls the order in which workflow transition buttons will appear in the edit form toolbar (if multiple enableAction validation actions are defined for a workflow stage).

  3. On the Workflow subtab, make sure that a workflow transition has been defined that couples this custom action with a destination stage. See Defining and Configuring Workflow Transitions.

  4.  

     

  5. Use the Add Action command to create the enableAction action, specifying the "custom action" name.

Specifying the Actions to be Performed by a Workflow Transition Button

The enableAction validation action instantiates a workflow transition button in the edit form toolbar, but it doesn't specify what happens when the user clicks the button. You must make this specification with a separate validation whose condition is the keyword CUSTOM_ACTION.

 

 

Continuing the example above, you might configure the "PostPone" and "Finish Dvt" workflow transitions like this:

At minimum, the actions initiated by clicking a workflow transition button should include setting the value(s) of the database field(s) involved in the definition of the destination workflow stage. (In this example, it's the single field wflowStage.)

Defining and Configuring Workflow Transitions

On the Workflow subtab, you complete the task of configuring an AccuWorkflow. You also configure the queries that user implicitly invoke when determining which issue records are "in" a workflow stage, using the Stream Browser or on a Queries tab.

To define an issue database's set of workflow transitions, click the Edit Transitions button on the Workflow subtab toolbar. This brings up a dialog box in which you define the workflow transitions as a set of pairs:

Each cell in the Stage column is a list-box, containing all the workflow stages.

Attaching Workflow Transitions to Workflow Stages

Each workflow stage can be the "from" stage for any number of workflow transitions. To maintain the set of transitions attached to a stage, choose Select Transition Links from the stage's context menu. Then set/clear any number of the workflow transition's checkboxes:

Adjusting the Workflow Diagram

You can use drag-and-drop to adjust the Workflow subtab diagram -- for example, to prevent items from overlapping each other. The connections among the boxes and arrows of the graph are preserved, no matter where you move items.

To adjust a workflow transition arrow, drag-and-drop the orange label.

Configuring AccuWorkflow Queries

Using the Stream Browser or a Queries tab, a user can determine the set of issue records that are "in" a particular stage. AccuRev automatically composes and then executes a workflow query to determine this set of issue records; a particular AccuRev user identity and a particular stream in the issue database's depot can be inputs to this query.

For example, the Stream Browser can display the set of issue records that are in the "In Test" stage:

The workflow query that returns this set of issue records filters on the stream that the user has set as the "current project" (in this example, bear_tst).

The Setup Workflow Query Fields toolbar button on the Workflow subtab toolbar brings up a dialog box which configures how a stream (and, in some cases, the current AccuRev user identity) in the current context will be used in a workflow query.

If the dialog box settings are as shown in this example, the workflow query will include one or both of these clauses:

assignedTo is john
targetRelease is bear_tst

The User listbox in this dialog box contains all the fields of type User in the issue database schema; likewise, the Stream listbox contains all the fields of type Stream.

See the help screens for the Stream Browser and the Queries tab for details on how workflow queries work in those contexts.

AccuWorkflow and the Stream Browser

The Stream Browser's toolbar now provides access to a new display mode: workflow mode.

In workflow mode, the Stream Browser tab is split into two panes: the top pane contains the graphical display of a depot's stream hierarchy; the bottom pane displays the workflow for the depot's issue database.

Workflow stages are displayed in green. Stage transitions are displayed in orange. Each workflow stage has a special control that works similarly to the graphical pane controls on streams: clicking a stage's control opens or closes a subwindow that displays issue records that are currently in that stage:

At any given time, your organization probably has several (or many) active development efforts. In the upper pane, you must focus the workflow's issue-record display on a particular development effort by designating one stream as the "current project". Its name is displayed as a title in the lower pane, and also in each issue-record subwindow:

So the contents of a workflow-mode subwindow is the set of issue records that are:

AccuWorkflow selects the issue records by performing a query, in which the "current project" stream is tested against the value of a particular issue-record field -- for example, Target Release. The field used in this workflow query is configurable; see Issue Record Fields Used in a Workflow Query.

Drag-and-Drop Operations in Workflow Mode

You can drag-and-drop the special control for a workflow stage onto any of the workflow transitions defined for that stage.

This performs the transition for all the issue records in that stage. For example, dragging the control to the Finish Dvt transition causes issue records #5 and #9 to transition to the Implemented stage:

Drag-and-drop operations are not defined for individual issue records -- only for a the special control, which represents all the issue records in a stage.

Connecting Workflow Transitions to Promote Operations

Each transition in a workflow can be linked to a particular dynamic stream: invoke the command Create Stream Link from the context menu of a workflow transition, then click on a dynamic stream in the upper pane. This creates a two-way link between the workflow transition (T) and the stream (S):

For example, you might use Create Stream Link to specify that promoting versions from the cup_dvt stream to the cup_tst stream can transition one or more issue records from workflow stage Implemented to stage In Test.

In this example, versions were promoted through the change packages of issues #3 and #7. But the link between promotions and stage transitions works no matter how the versions are promoted -- using the Stream Browser, the File Browser, the Active Transactions tab, etc.

AccuWorkflow and the Edit Form

When you're working with issue records in an AccuWork edit form, you can click the Workflow View toolbar button to have a pop-up window display the issue database's workflow.

Stage Transition Toolbar Buttons

Each workflow stage is defined in terms of the values of one or more issue record fields. But instead of setting field values directly in order to make a transition, you click a button in the edit form toolbar:

For example, clicking the Cancel button would change field value(s) in accordance with the definition of workflow stage Closed (the destination stage of the Cancel transition).

AccuWorkflow Required Fields

The definition of a workflow stage can involve one or more required fields. For example, the definition of the Scheduled stage might require that the issue record be assigned a target release; similarly, an issue record might need to be assigned to a particular developer and to have an estimated development time in order to be in the In Dvt stage.

When you click a workflow transition toolbar button, AccuWorkflow examines the required fields, if any, for the destination stage. If necessary, it prompts you to provide values for one or more fields before performing the transition to the new stage:

AccuWorkflow and the Queries Tab

The Queries tab's toolbar now provides access to a new display mode: workflow query mode. This mode provides a very easy way to analyze issue records by the workflow stage they belong to.

In workflow queries mode, the Queries tab is divided into four panes:

The selections you make in the users/groups pane, the streams pane, and/or the workflow pane build a query. In the illustration above, one item is selected (highlighted in blue) in each of these panes, defining a query that returns all issue records for which:

(The query might involve some User-type field other than Assignee, and some Stream-type field other than Target Release. See Issue Record Fields Used in a Workflow Query.)

In the users/groups pane and the streams pane, you can select multiple items, by holding down the Ctrl key while making the additional selections. This defines an OR compound clause, such as:

You can also leave one or two of these panes with no item selected. (To deselect an item, click it while holding down the Ctrl key.) This removes that "dimension" from the query. For example, if you don't specify a stream, then the query will choose issue records regardless of their Target Release.

Assignment to a Group

By default, selecting a group (say, famgrp) constructs a query clause like this ...

the Assignee is famgrp

... not like this ...

the Assignee is a member of famgrp

This makes it easy to assign issues in two steps. For example, one person can assign an issue to a group, without having to decide who will work on the issue. Later, another person can assign the issue to a particular member of that group.

To make a group assignment have the second meaning, check the is member of checkbox at the bottom of the users/groups pane.

Executing a Workflow Query

To execute the query according to your current selections, click the toolbar button. The issue records selected by the query appear as a table in the query results pane. (The design of this table is specified in the Change Package Results section of the Change Packages subtab of the AccuWork Schema Editor. See the "AccuWork Schema Editor" chapter of the AccuRev Administrator's Guide.)

Working with the Results of a Workflow Query

You can work with the issue records selected by a workflow query in some of the same ways as with a Standard Mode query. In particular, you can invoke Open Issue on a single issue record or Export Table on a selected set of issue records.

In addition, drag-and-drop operations provide a "batch update" capability for the configured User-type field and the Stream-type field:

The User-type or Stream-type field that you change with a drag-and-drop operation does not need to be among the fields displayed in the query results pane.

Issue Record Fields Used in a Workflow Query

In the example above, the selected user/group was used as the value of the Assignee field, and the selected stream was used as the value of the Target Release field. The issue record fields to be used in the query are configurable, using the Setup Workflow Query Fields toolbar button on the Workflow subtab of the AccuWork Schema editor.

The issue record field(s) used by the workflow stage selection (in this example, In Dvt) depend on the definition of that workflow stage, on the Validation subtab of the AccuWork Schema editor. For example, the In Dvt stage might be defined in terms of a single issue record field:

wflowStage is In Dvt

Or it might be defined in terms of multiple issue record fields:

AND
state is WIP
status is Scheduled

See chapter "Designing Issue Databases and Edit Forms: The Schema Editor" in the AccuRev Administrator's Guide for details.

Configuring the Users/Groups and Streams Panes

You can choose which user and group names appear in the users/groups pane, and which stream names appear in the streams pane:


In this example, only the group name famgrp and the name of each member of famgrp will appear in the users/groups pane.


In this example, only the stream names bear and bear_tst will appear in the streams pane.