Visio Services – Using Visio & Web Part Connections to Highlight

In SharePoint 2010, you can use web part connections between a Sharepoint list and a Visio Web Access web part to highlight steps in a process diagram that are associated with a list item:

When you select a different list item, different steps in the process diagram are highlighted:

Here are the steps to build this example:

  1. Open Visio 2010, create a Visio diagram, and save it as a “Web Drawing” file type
  2. Upload the Visio file to a SharePoint document library
  3. In your Sharepoint site, create a web part page and add the Visio Web Access web part to the page. Edit this web part and set the web drawing URL to the Visio file URL
  4. Create a custom list and add a column called “Highlighted Steps.” Choose “Single line of text” as the column type
  5. Create a list item in the custom list. In the “Highlighted Steps” column, add the Shape name(s) that you want to highlight when you select this list item. If it’s multiple shape names, separated them with commas with no space in between. Ex) “Process1,Proccess1”. You can find the shape name by clicking on the shape information pane and then clicking the shape. The shape name shows up in the upper left side of the box. In the example shown in the picture, the shape name is  Process.3.
  6. On the page, add the list view web part for the custom list you created above.
  7. In the edit mode for the page, click the edit dropdown > Connections > Get Shapes to Highlight From > (custom list name)
  8. In the web part connection settings, set the Provider field name to the “Highlighted Steps” column and the Consumer field name to “Shape Names”. Click Finish

Now when you select one of the list items, it will highlight all the shapes associated with the list item.



Visio Services – Using Visio to Connect Processes

Unlike SharePoint 2007, SharePoint 2010 has a Visio web access web part that allows you to show Visio diagrams on your site. One way to leverage this new capability is to show a master detail view of a diagram/process. When you click on a shape in the “master” view, the “details” view will show the information associated with that shape. For example, when you click on the shape for “Phase 1” in the “master” view, the “details” view will show the sub-process related to Phase 1. This is especially helpful when you want both a high level and detail level view of a process.

Fig. 1: Clicking on the Initiation process shows the sub-process for the Initiation process

Fig. 2: Clicking on the Testing process shows the sub-process for the Testing process

These are the steps to build this example:

  1. Open Visio 2010
  2. Click New > Basic Flowchart > Create
  3. Click Save As > Change the file type to “Web Drawing” and save
  4. Create both your main process diagram and sub-process diagrams. Save the main process and sub-processes as two different Visio files.
  5. On the sub-process diagrams: change the page names for each sub-process
  6. On the main diagram: Select the whole process and right-click on the process > Data > Define Shape Data. Click New. Set the label to “subprocess” and type to string. Right click on the first shape > Data > Data Shape. Set the “subprocess” variable to the page name of the sub-process that is associated with the first shape. Repeat this step for all shapes in the main diagram
  7. Open your sharepoint site that you want to display these Visio diagrams
  8. Upload both Visio files to a document library
  9. On a page, add two Visio web access web parts – one is for the main process and one is for the sub-process
  10. Edit the main process Visio web part and set the web drawing URL to the main process Visio file url
  11. In the “Expose the following shape data” field, type the name of the label we created previously, which is “subprocess”
  12. Save the changes made to the main Visio web part
  13. Edit the sub-process Visio web part and set the web drawing URL to the sub-process Visio file url
  14. Save the changes made to the sub-process Visio web part
  15. On the sub-process Visio web part, click edit > Connections > Get Web Drawing URL and Page Name From > (the main process Visio web part) – Provider Field Name: subprocess, Consumer Field Name: Page Name. Click Finish
  16. Exit edit mode of the page (or Publish if the publishing feature is activated)