SharePoint 2010 Workflows in Visio 2010 – A seamless integration!

I have been doing some analysis work on a new SharePoint 2010 implementation and have wandered across the new SharePoint workflow template in Visio 2010. It’s an area I briefly touched last year on the 2010 Beta but didn’t get much hands on time with.

I’ve had a quick play with the feature set and the template and wanted to share my findings and thoughts on the subject. A good search didn’t bring much info in the way of SharePoint / Visio 2010 so I will do my bit to contribute to the ever-growing pool of resources.

So as you have probably seem from the marketing guff and the PowerPoint decks, there is a new SharePoint workflow template available in Visio, with the intention of empowering the business analyst (or power user) to design or re-design workflows within Visio and have that exported directly into SharePoint designer.

The advantage here is all the developer needs to do is take the exported Visio process and connect up the data sources / lists to the appropriate places, and you have your working workflow. Easy as that!

There are some interesting discussions going around about the pros / cons of this, particularly around whether such users should be empowered to make these design-type decisions (or more accurately, whether developers should take the models and deploy them verbatim) but I will make my comments on this further after a brief primer.

You have probably seen the process before in presentations or similar blogs, but for those who haven’t, I’ll quickly run through the process.

First you select the ‘SharePoint Workflow’ template in Visio.

You then get a blank canvas and a raft of SharePoint-specific workflow shapes to choose from

They are set out in normal style: actions, conditions and terminators.

Drop the shapes as if you doing a standard process flow and then run the validation rules.

Under the ‘Process’ ribbon, select the ‘Check Diagram’ option.  Generally you need to avoid things like looping back to parent shapes and ensuring all decision points have a Yes / No branch.

Below is an example of a validated workflow.

Once your workflow is validated, it is then exported into a Visio Workflow Interchange file (*.vwi) before being imported into SharePoint designer.

To export your Visio workflow , select ‘Export’ from the ‘Process’ ribbon and select a save location.

Now fire up SharePoint designer and connect to a site. Choose ‘Workflows’ from the ‘Site Objects’ list.

Select ‘Import from Visio’ and locate the interchange (*.vwi) you exported above.

Now choose whether to assign to a list or a content type. Depending on your plan this is an important decision but for the purposes of this demo just choose a content type under the ‘Reusable Workflow’ dropdown.

So as you can see the logic from our Visio model has been imported into a If/Else start into SharePoint designers. From here the developers can link up the steps to the data sources / lists as required and you have a working workflow! Easy!

This is just an overview and I haven’t really got into the guts of the possibilities yet, but should serve as a primer to getting in and having a stab yourself.

Personally I see value in this more in improving and re-designing workflows than perhaps designing from scratch. A developer can build a workflow from requirements as they see fit and make the required design decisions based on their experience and understanding of the technical requirements. A business user may inadvertently make bad design decisions that impact the performance or the usability of a workflow.

The beauty of this model (I think at least!) is the ability to import an existing workflow, pull it into a nice, visual Visio format and let business users muck around with that. The logic and conditions will remain in the XML and when it is exported back to SharePoint designer, the detail will remain along with the required changes to the flow.

I’ll have more comments / thoughts in this area as I progress through, but if nothing else the above should serve as a base for those looking at SharePoint workflows in Visio.

Watchout for my next post on custom workflow actions and how they look when pulled back into Visio!