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 2013 includes a variety of predefined
workflows, and you can both customize the existing workflows and define
new workflows using SharePoint Designer.
Whereas Visio 2010 offered a semblance of this capability but
required you to export workflows in a special file format, SharePoint
Designer 2013 reads and writes the new Visio 2013 .vsdx files directly.
When you create a new SharePoint Workflow diagram, Visio opens three
stencils—Actions, Conditions, and Components—and places several shapes
on Page-1 for you.
The large shape in the center of the page is a container for the
first stage in the workflow. Visio 2013 now supports the SharePoint
notion of using stages to organize logically related, separable sets of
workflow steps. A simple workflow might consist of a single stage,
while a more complex workflow might include many stages.
Outside the stage container to the left is a workflow Start shape.
On the left border of the stage is a green, triangular Entry shape; on
the right border is a red, square Exit shape. In the lower left corner
of the stage shape is a Visio Action Tag.
In Visio, the action tag menu will contain one or more grayed out
entries, however, when you open this diagram for visual editing in
SharePoint Designer, you will use Action Tag entries to refine and complete the workflow definition.
Visio 2013 and SharePoint
Designer 2013 also support SharePoint Workflow loops and steps,
however, you will not use either of them in this exercise.
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 six months
old. You will create the workflow using the SharePoint 2013 Workflow
template and will validate it against the SharePoint Workflow rule set
in Visio.
Of the several dozen rules in the SharePoint workflow rule set, the primary rules that apply to this exercise are as follows:
-
Every workflow must have one Start shape. (A terminate shape is not required.)
-
Every workflow must contain at least one Stage.
-
Every Stage must have exactly one Entry and one Exit shape.
-
All connections to a Stage must go in or out through the Entry and Exit shapes.
-
The only shapes allowed outside a Stage are Start, Terminate and Conditional shapes.
-
A Conditional shape must have at least one Yes and one No outcome.
Note
SET UP Click the
File tab, and then click New. Click Categories, click Flowchart, and
then double-click the Microsoft SharePoint 2013Workflow thumbnail. Save
the drawing as Document Revision Workflow.
-
Click the Stage 1 shape, type Get Document, and then press Esc.
-
From the Actions – SharePoint 2013 Workflow stencil, drag a Check out item shape into the Get Document stage, and then drop it on the connector near the center of the stage.
-
From the Components – SharePoint 2013 Workflow stencil, drag a Stage
shape, and then drag and drop it off the right end of the Drawing page
so Visio adds a new page. (Be sure to use the Dynamic Grid to align the
new stage with the previous stage.)
-
With the new stage still selected, type Update Document, and then press Esc.
-
Right-click the Drawing page, click the Connector Tool on the Mini Toolbar, and then draw a connector from the Exit shape of the Get Document stage to the Entry shape of the Update Document stage.
-
Repeat steps 3-5 to create a third stage on a new page, and then type Return Document on the new stage.
-
From the Actions – SharePoint 2013 Workflow stencil, drag a Start a task process shape into the Update Document stage, drop it on the connector, and then type Revise document.
-
Drag an Add a comment shape into the Update Document stage, drop it on the connector, and then type Update document history.
-
Drag a Check in item shape into the Return Document stage and drop it on the connector.
At this point, your workflow is nearly complete. However, you need
to add a condition: if the document has been revised in the last six
months, you don’t need to update it again.
-
From the Conditions – SharePoint 2013 Workflow stencil, drag a Modified in a specific date span shape onto the connector between the Get Document and Update Document stages, and then drag the Condition and Stage shapes so they are both fully on Page-2.
-
Click the New Condition shape, type Modified less than 6 months ago? and then press Esc.
-
Right-click the Drawing page, click the Connector Tool on the Mini Toolbar, and then draw a connector from the connection point on the bottom of the Modified less than 6 months ago? shape to the green entry triangle on the Return Document stage.
Important
When you glue the connector to the Modified Less Than 6 Months Ago? 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, it creates a better layout for the connector.
-
With the connector still selected, drag the Move Midpoint handle downward so the line is below the Update Document stage.
-
On the Process tab, in the Diagram Validation group, click the Check Diagram
button. The Issues window appears and notifies you of two problems. Both are related to the connectors leading from the Condition shape.
You need to add Yes or No labels to the condition’s outgoing
connectors. Unlike the flowchart shapes, the connectors in the
SharePoint Workflow stencil have been given shortcut menu options for
exactly this purpose.
-
Right-click the connector to the right of the Modified less than 6 months ago? shape and click Yes on the context menu.
Tip
You can also use the Shape Data window to set the Yes/No/Blank option for a connector because the value is stored in a shape data field.
-
Right-click the connector that leads from the Modified less than 6 months ago? shape to the Entry shape for the Return Document stage, and then click No. You can rerun diagram validation if you’d like, in order to ensure that the diagram is now correct.
Note
CLEAN UP Save your changes to the Document Revision Workflow drawing, and then close it.
The workflow you created in this exercise is not very complex and doesn’t really require three stages. However, creating it that way gave you an opportunity to work with stages and inter-stage conditions.
Important
Creating a workflow in Visio Professional 2013 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.
Tip
Previous versions of SharePoint Designer were text editing tools.
However, SharePoint Designer 2013 now hosts Visio 2013 as an ActiveX
control. As a result, you can create and edit visual workflows directly
in SharePoint Designer 2013 on any computer that also contains Visio
Professional 2013.