Introduction
This is the last part in this workflow series. In the first part of this series I wrote extensively about how Visio Services allow us to now do visual reporting on the progress of a workflow process instance. More importantly, it allows us to provide a visual report to business users removing all the technical steps that may be needed to implement an end to end workflow.
For example, I below I have a ton steps in a workflow. When SharePoint Designer 2010 publishes this workflow a Visio workflow diagram will be generated.
That Visio diagram will accurately show where it is within its execution however I can guarantee that the business user does not care about all these steps. All they want to know is what the major business process steps are and what the current status is.
Solution
We can provide a perfect solution using a custom Visio report.
My solution is to create a completely different Visio diagram to the business reporting. So what I did was take this original diagram I created in this series (below) with the objective of “lighting it up” with the current status of the business process.
The solution is simple.
· I create a column on my list item to store the current step in the business workflow the workflow is in.
· Then during my workflow, I update this column object in the Visio diagram I want to light up.
· Then connect a list and Visio web part together to allow a user to select a running workflow and then visually see the status of the workflow.
Configuration
To achieve this I need to perform a few steps.
In the workflow I added an Update List Item action. I updated my CurrentAction column with the name of the Visio object I want to light up. In this instance it is “Process.3”. Throughout other workflows I will update the CurrentAction column with other values that correspond to different objects in the Visio diagram.
Next I uploaded the Visio diagram to a location in SharePoint; simple enough.
Next I created a web part page. On that web part page I placed the list where the workflow is running.
Next I added a Visio web part and pointed to the Visio diagram that I had just uploaded. Below is a screenshot.
Next I need to connect the list web part to the Visio web part. I need to do this so that when a user selects a list item, the Visio diagram on the right will highlight the correct Visio object. On the Visio web part I made a connection to the Review list web part. Notice I select “Get Shapes to Highlight From”.
Next in the Configuration Connection screen, I select the CurrentAction column (which is the column I that I update in the workflow) and then select Shape Names. This is how the “Process.3” value is sent from the selected list item to the Visio diagram to be highlighted.
The net result is the following. As you can see a Visio object is now highlighted based on the item that I selected on the left hand side. Really simple and really effective!!!
Highlighting Multiple Items
In the example I just showed you, I am only highlighting the point where the process is in its execution. However, let’s say you want to highlight all the steps the workflow has gone through. Well that is simple too.
In this case I created a different column called “Actions” where I capture a comma delimited string of all the times I want to be highlighted. In the workflow I have the following. Notice in the String Builder window I concatenate the previous value in the column with the new value “,Process.3”.
Other than that, the configuration is 100% identical other than selecting the “Actions” column when connecting the web parts. The final result is the following – all of the Visio object names I concatenated together are highlighted.
Conclusions
This is such a powerful capability. I can create custom visual reports on my business process with no code.
I truly hope this workflow series will be helpful for you when starting to build process automation in SharePoint 2010.