A common practice in organizations is for a
business analyst to work with business users in Visio when designing
workflows. The end result, a Visio diagram, is handed to a developer
where it is then turned into a SharePoint Designer workflow or Visual
Studio workflow.
Visio 2010 provides a new template specifically for
designing workflows that can be imported directly into a SharePoint
Designer workflow. Figure 1 shows the Visio 2010 home page where you can select the Microsoft SharePoint Workflow.
Selecting the SharePoint Workflow template opens up
the shape stencils specifically for SharePoint workflows. Each of these
shapes relate to the actions and conditions that are available in
SharePoint Designer. Similar to any Visio diagram, these shapes can be
dragged on to the canvas to build out a full workflow solution. Figure 2
shows all the available action shapes for a workflow. Each shape
reflects a default action, so dragging it onto the canvas has the same
effect as adding the action to the SharePoint Designer canvas. It is
not possible to define the properties on the shapes, however. For
example, adding the Log to history list action does not allow you to
define the message you are logging to history. These properties still
have to be set after the workflow has been imported into SharePoint
Designer.
Even though the properties cannot be set by the
workflow designer from within Visio, you can still add details to each
step, specifying what any values should be. This additional description
can be added directly on the design canvas and will be ignored by
SharePoint Designer on import.
Designing a Visio Workflow
Let’s
look at an example of how a workflow can start its life in Visio and
get transformed into a fully deployed SharePoint workflow solution. The
example we are going to use is a simple Expense approval process. A
SharePoint list is used by employees to request expense approval. If
the amount is greater than $1,000, then the expense needs to be
approved by a director; otherwise, it can be approved by the
requestor’s manager.
Figure 3
shows our workflow designed in Visio. As you can see, it is not too
complicated, but you can also see how easy it is to determine the
approval flow.
You can see that we also added a general
description and some detail at each step to assist the workflow
developer when filling in the properties in SharePoint Designer. Now
all that has to be done is to save this Visio file and
get it to the workflow developer. Once the developer receives and
understands the flow, he can select to Export the diagram from the
Process tab in Visio. This will check the workflow for errors and, upon
success, will export to a .vwi (Visio Workflow Interchange) file, which
can be imported into SharePoint Designer.