A workflow is a set of process steps, some
or all of which have been automated. For the automated parts of a
workflow, documents and files are stored and moved electronically,
according to a set of predefined rules, so that they are available to
participants as required.
To define a workflow, you need to identify three things:
-
The participants (both people and systems)
-
The sequence of activities
-
The documents, databases, and other required work items
Common workflow examples in many organizations include the
following:
-
Approving employee expense reports
-
Getting approval and then registering for a seminar
-
Writing, editing, getting approval for, and publishing a new
policy manual
Microsoft SharePoint 2010 includes a variety of predefined
workflows, and you can both customize the existing workflows and define
new workflows using SharePoint Designer. However, SharePoint Designer is
a text-oriented tool. Many people, especially those who are already
familiar with creating flowcharts in Visio, prefer to define workflows
visually.
Because of that desire, Visio Premium 2010 includes a SharePoint
Workflow template. You can use it to build graphical workflow layouts
and you can move workflow definitions in both directions between Visio
and SharePoint Designer. For example, you can create a workflow
definition in Visio, export it to SharePoint to add required parameters,
test and revise the workflow, and then bring it back to Visio to see the
new visual representation.
In this exercise, you will create a simple workflow to check a
document out of a SharePoint repository, verify the creation date of the
document, and revise the document if it is more than one year old. You
will create the workflow by using the Visio SharePoint Workflow
template, validate it against the SharePoint Workflow rules, and then
export it in SharePoint Designer format.
Set Up
Start Visio, or if it’s already running, click
the File tab, and then click New. In the Template Categories section,
click Flowchart, and then double-click Microsoft SharePoint Workflow.
Save the drawing as Document Revision Workflow.
If the Shapes window does not display two columns of masters, adjust
its width.
Tip
Take a moment to explore the three stencils that open with this
template. In addition to the Quick Shapes stencil, you will see
SharePoint Workflow Actions, SharePoint Workflow Conditions, and
SharePoint Workflow Terminators.
-
From the Quick Shapes
stencil, drag a Start shape and
drop it near the left page margin.
-
Point to the start shape’s AutoConnect arrow, and from the Quick Shapes menu, add a Terminate shape.
-
From the SharePoint Workflow
Actions stencil, drag a Check out
item shape onto the connector between the start and
terminate shapes.
Tip
You will need to scroll down to find Check out
item.
Visio moves the terminate shape to make room for the task
shape.
-
From the SharePoint Workflow
Conditions stencil, drag a Created in date span shape onto the
connector between the Check out
item shape and the terminator.
-
With the new condition shape still selected, type Older than one
year?.
-
From the SharePoint Workflow
Actions stencil, drag a Start
custom task process shape onto the connector between the
Older than one year? shape and
the terminator.
-
With the new task shape still selected, type Revise
document.
-
From the SharePoint Workflow
Actions stencil, drag a Check in
item shape onto the connector between the Check out item shape and the
terminator.
-
Drag the AutoConnect arrow
under the Older than one year?
shape and connect to the Check in
item shape.
Important
When you glue the connector to the Check in item shape, be
sure to glue it to the connection point on the bottom of
the shape in order to create static glue. Do not create
dynamic
glue. Although this distinction does not affect the
workflow for SharePoint, in this particular case, it creates a
better layout for the connector.
You are now ready to try exporting your SharePoint
workflow.
-
On the Process tab, in the
SharePoint Workflow group, click
the Export button.
Important
Visio will not let you export a SharePoint workflow if it
contains errors. Consequently, Visio always runs a diagram
validation check when you click Export.
-
Click OK to close the
Export Workflow dialog
box.
Visio opens the Issues window and reports two issues, both
related to the connectors on the Older than one
year? condition shape.
You need to add Yes/No labels to the condition’s
outgoing connectors. Unlike the flowchart shapes, the connectors in
the SharePoint Workflow stencil have been given right-click menu
options for exactly this purpose.
-
Right-click the connector between the Older than one year? shape and the
Revise document shape. Then click
Yes.
-
Right-click the connector from the Older than one year? shape to the Check in item shape. Then click No.
-
On the Process tab, in the
SharePoint Workflow group, click
the Export button. Visio clears
the Issues window and opens the Export Workflow dialog box.
-
In the Export Workflow
dialog box, type Document Revision Workflow as the
file name, navigate to your desired folder, and click Save.
Visio creates a Visio Workflow Interchange file with a
file extension of .vwi.
Clean Up
Save your changes to the Document
Revision Workflow drawing, and then close it.
The .vwi file you’ve created can be imported directly into
SharePoint Designer.
Important
Creating a workflow in Visio Premium 2010 does not eliminate the
need to use SharePoint Designer. Although you can use Visio to define
and illustrate the flow of the work in a process, you must still use
SharePoint Designer to provide the rest of the information that is
required to execute the workflow.