SharePoint 2010 - Visio Visualization of Workflow

What is Workflow Visualization?

image1.gif

Workflow Visualization was introduced in SharePoint 2010 & Visio Services is the infrastructure required to enable this feature. Workflow Visualization helps in representing a visual clue on the activities of a workflow & the current state.

Prerequisites

In addition to SharePoint 2010 the following is required:

  • Visio 2010 Client Application
  • SharePoint 2010 Visio Service started
  • SharePoint Designer 2010
  • Silverlight

Scenario

In our scenario, there are 2 document libraries
as in the following:

  • User Docs library for submitting documents
  • Approved Docs library serves as the destination for moved documents.

If a user submits a DOCX file to User Docs then it will be moved to the Approved Docs library. If a user submits PDF or TXT files then he will receive an email notifying the re-submission.

Create the Workflow

In this step, we are creating a workflow in Visio 2010.

Open Visio 2010 & choose the Flowchart category as in the following:

image2.gif

In the next page, choose "Microsoft SharePoint Workflow" as in the following:

image3.gif

Click the "Create" button. You will get the design screen with the Shapes toolbar. The Shapes toolbar contains mainly the following 3 SharePoint shapes:

  1. SharePoint Workflow Actions
  2. SharePoint Workflow Conditions
  3. SharePoint Workflow Terminators

image4.gif

Actions
contain action items like Start approval, Send an email, Add a comment, Set field and so on. Actions performs changes to the underlying objects.

Conditions contain conditions like Compare data source, Title contains keywords, File type and so on. Obviously, the condition branches to separate Yes / No areas.

Terminators contain Start and Terminate items, that are used to denote begin & end a workflow.

For starting with, drag & drop the Start item from Terminators category. Then add the following actions & condition items.

image5.gif

Our idea is to create a workflow for a document library.

The first condition File is a specific type that checks if the document is a DOCX, evaluating to Yes or No. Right-click on the Yes connector and choose the option "Yes". Right-click on the No connector & choose the option "No".

image6.gif

Now the Yes/No branches are defined as in the following:

image7.gif

The second & third actions "Copy list item" & "Delete item" denotes that the document will be copied to another library and will be deleted from the current one. (Moving operation)
The No branch will send an email to the user requesting a change in document type.

Validations: For validations, you can choose the Process menu category and click the "Check Diagram" button.

image8.gif

If no errors are found then you will get the following message box:

image9.gif

Parameters: You have noted that, we have still not specified the document type extension, email content, library names and so on. These are set during the association phase within SharePoint. This dynamicity makes the workflow reusable.

Save: changes for the Visio file.

Export the Workflow


Now we are ready to Export the Workflow. Exporting is required for compatibility with the SharePoint Designer. Without exporting, we cannot use the workflow within SharePoint.

From the "Process" tab, click the "Export" button.

image10.gif

In the dialog box that appears, enter the file name.

Create Document Libraries

Create the following 2 document libraries:

  1. User Docs
  2. Approved Docs

Import the Workflow

Now we are ready to do the import in SharePoint Designer. The exported Visio file is imported into SharePoint Designer 2010.

Open SharePoint Designer 2010 from the Start menu.

image11.gif

Please note that if you have Microsoft Office 2010 32-bit installed then you require SharePoint Designer 32-bit.

Choose the Open Site option and enter the URL for your SharePoint site.

image12.gif

Once the site is opened, choose the Workflows group from the left pane.

image13.jpg

You can see the "Import from Visio" button on the toolbar. Click on it & locate your Exported Visio workflow file.

image14.jpg

Click the "Next" button to continue. Enter the workflow name & choose the library to work with.

image15.jpg

You will see the following editing screen.

image16.jpg

Click on each link & make the following changes.

image17.jpg

For the email link, you can create a customized message including current user name & current document name.

image18.jpg

In the workflow settings section, choose "Show workflow visualization on status page".

image19.jpg

Now save & publish the workflow

image20.jpg

Testing the Workflow

Back in SharePoint; add a new document to the User Docs library. For the time being, choose a TXT file, so that you will get a notification.

After adding the TXT File, choose the Workflows context option as in the following:

image21.jpg

In the page that appears, you will see our Docx Mover Workflow as in the following:

image22.jpg

Click on it & click the Start button. Wait a few seconds for the workflow to complete. Now back in the library, you can click the workflow status.

image23.jpg

Now you can see the Visualization page:

image24.jpg

You will be getting email notification too, if you have email configured or the development email server exists.

image25.jpg

This concludes our article on Visio Visualization.

Note:

For configuring the SMTP4Dev Tool, you can use the following link:

http://www.jeanpaulva.com/index.php/2012/10/14/configuring-email-for-development-server/

References

http://bit.ly/GWBCC8

Summary

In this article we have explored the visualization of Visio Workflow in a SharePoint site. The Visio file & Exported file is attached along with the article.

Up Next
    Ebook Download
    View all
    Learn
    View all