SharePoint 2010 Cookbook: Display Visual Representation of SharePoint 2010 Workflow Status with Visio Graphics Service

SharePoint 2010 offers a ton of new features that I think everyone who is familiar with SharePoint is getting to know more and more. One of the features that people are very interested in is called Visio Graphics Service. This is a SharePoint 2010 server application that allows people to share and view Microsoft Visio drawings inside your browser. Behind the scenes, this service not only allows you to share Visio drawings with other users, but it can also compose data from various sources (SharePoint list, Excel worksheet, Access database, or even SQL-based database), and then present the data to end users in the Visio drawing via their browser. The Visio Graphics Service story can’t really be summed up in a few sentences, so let’s check out the full story about the Visio Graphics Service here, beginning with a look at one of its specific advantages.

 

Challenge:

How can I display a visual representation of a SharePoint workflow through Visio Graphics Service?

 

Solution:

First of all, let’s take a few seconds to look at the requirements:

  • From the server side
    • SharePoint Server 2010 (SharePoint 2010 Foundation does not support Visio Graphics Service).
    • The SharePoint Server Enterprise features must be activated at the site collection, and workflow needs to be running.
  • From the client side
    • SharePoint Designer 2010
    • Visio Premium 2010 (Only the Premium version of Visio 2010 provides the necessary support to generate the drawing of workflow representations).

OK, let’s get started…

1. Start the service

Visio Graphics Service relies on a SharePoint service with the exact same name. Many articles and blogs out there guide people through configuring the Visio service, but some miss an important point: Even if you have successfully configured the Visio service application, if the Visio SharePoint service is stopped, nothing is going to show up.

Using Central Admin:

  • On the home page of Central Admin, under the System Settings section, click on Manage service on server.
  • Make sure the “Visio Graphics Service” status is Started; if it’s not, click on Start.

Using PowerShell:

   1: $serviceName = "Visio Graphics Service"
   2: $serviceInstance = (Get-SPServiceInstance | Where {$_.TypeName -eq $serviceName}) 
   3:  
   4: $serviceInstance 
   5:  
   6: if(($serviceInstance.Status -ne "Online") -and ($serviceInstance.Status -ne "Provisioning")) {
   7:     $serviceInstance | Start-SPServiceInstance
   8: }

 

2. How to create Visio Graphics Service

This service is not provisioned default, so we need to create it manually step–step.

Using Central Admin: (Note: you must login with farm administrator credentials to perform this action).

  • On the home page of Central Admin, under the Application Management section, click on Manage service applications.
  • Click New on the Ribbon, then Visio Graphics Service, and a new form will open up.
  • Type any friendly name for the new service.
  • Choose which application pool to use, or create a new one.
  • Leave the final checkbox set to the default (or checked if not). This will guarantee that this service will be ready to use in any Web application subscribed to the Default service application proxy.

Using PowerShell:

   1: #In case of create new application pool   
   2: $visioAppPool = New-SPServiceApplicationPool -Name "Visio Service App Pool" -Account (Get-Credential).UserName   
   3:  
   4: #In case of using existing application pool   
   5: $visioAppPool = (Get-SPServiceApplicationPool | Where {$_.Name -eq "<Name of the app pool>"})   
   6:  
   7: # Create new service application
   8: New-SPVisioServiceApplication –Name "<Name of service>" –ApplicationPool $visioAppPool -AddToDefaultGroup

That’s all, we are now done with the server-side configuration.

Now go ahead and create a workflow and we’ll move along to seeing the results of our work.

 

3. Enable Visio to generate drawings of a workflow

In the beginning of this post, I mentioned that you’re required to have Microsoft Visio Premium 2010 and SharePoint Designer 2010 installed on your client machine.  So, why do we need those things here?

We’re using SharePoint Designer 2010 to design the workflow, but why do we need Visio Premium?

SharePoint Server 2010 has a new feature that allows us to display the visual representation of the workflow, including in the browser. But please keep in mind that the visual workflow is not actually rendered at runtime, but at the time we publish the workflow using SharePoint Designer 2010. Actually, behind the scenes, SharePoint Designer uses Visio Premium to generate the visual representation of the workflow in a Microsoft Visio Web Drawing (.vdw) format and then publishes this file along with other workflow-generated files.

Now we can open up SharePoint Designer 2010 and create a simple workflow.

  • From the Ribbon, click the File menu, and under the Workflow section, click on List Workflow.
  • Enter the Workflow Name and target list the workflow will be associated with.
  • Design any workflow as you wish.

After you’re done with your workflow design, click Workflow Settings in the Ribbon, which will take you back to the overall general settings page for workflow.

As shown in the screenshot above, you’ll need to place a check in the “Show workflow visualization on status page” checkbox.

Everything is done now, so go ahead to Publish the workflow.

 

4. Start the workflow and get the visual representation

After your workflow has been successfully published, go back the SharePoint site, then go to the list where you have just published the workflow. Choose any item in the list, and start the workflow.

For those of us who have not done this before:

  • Go to the list, select any item. If you don’t have any items, try to add one.
  • On the Ribbon, click on the Workflow button.
  • Click on the recently published workflow. Then click Start on the next screen to start this workflow.

Now go to the workflow status page: woo hoo!  As you can see, the real status of the workflow is showing up. Each square in the image below represents an activity in the workflow, and in the top-left corner is the icon for that activity. By looking at the small icon in the top-right corner of each square, we can see at a glance which steps in the workflow have been completed, and which are still running:

That’s all I have for this post.  I hope you found this information useful, and please feel free to leave a comment or ask a question below.

See also:


SharePoint Online

The cloud parts are functional components that extend your SharePoint Online environment in Microsoft 365.

Supports Classic and Modern sites for SharePoint Online/Microsoft 365

Small Business Pricing and Discounts

SharePoint

Top SharePoint Online Products

Experience greater power and savings by bundling our SharePoint apps and cloud parts.


Calendar Plus


Carousel


Employee Directory Plus


Org Chart Plus


Simple Search


Tabify


Tree View

 

On-Premises Only

These web parts extend SharePoint beyond its out-of-the-box capabilities by tailoring it to your requirements with Bamboo Solution’s growing portfolio of SharePoint Web Parts.

SharePoint 2016, 2019, 2022 – Classic Pages Only

SharePoint

Top On-Premises Only Products

Experience greater power and savings by bundling our SharePoint apps and web parts.


Calendar Plus


Data Viewer


Password Change


Password Expiration


Password Reset

 

Our team of Microsoft 365 Technology Consultants helps you get the most out of your Microsoft technology, we have the best Microsoft 365 talent to streamline your organization.

Consulting to Streamline Your Department

M365 Plus

Managed Services

Microsoft 365

Consulting to Streamline Your Department


Human Resources


Information Technology


Marketing Campaigns


Healthcare


Sales

 

Our Consultants Have What You Need

Federal Contractors