Defining an AccuWorkflow Configuration

Each AccuWork issue database has its own workflow, a directed graph whose nodes (green rectangles) are called workflow stages and whose arrows (with orange labels) 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.