Using Visio Shape Reports to export detail from your diagrams

Ran cross another handy feature of Visio – Shape Reports!

If you’re like me and love manipulating data in Excel to clean up and use elsewhere, rather than doing it the long, slow and manual way, then you will probably like to explore this feature of Visio.

I recently created a state chart and I needed a quick export of all of the states I used on the diagram.

Sure, I could manually type them out, or individually copy and paste each one into a document, but that’s now how I like to operate! If there’s a tool for the job – I like to use it.

So I opened up the ‘Shape Reports’ option under the ‘Review’ ribbon and begin to design my extract.

We want to create a new report, so go ahead and click that to begin the new report wizard.

Now, depending on what you’re doing or what data you’re trying to extract out of your model, you can export everything (easiest – but takes longer to clean up) or put some criteria around what you want to export (little bit trickier but my favorite!)

Easiest option is to create an export using the ‘Shapes on the current page’ and click through the wizard with the default options  and selecting  ‘Show all properties’. This will give you a dump of all properties and you can filter through what you need in Excel.

Personally I like to extract just what I need from the model, so I set some export criteria using the ‘Advanced’ option on Wizard step numero uno.

Here you can define some conditions for what you want to pull out of your model. For the above example I’ve opted to ignore the transition shapes as I just want to see a list of state names.

Play around with what’s available, particularly under the ‘Master Name’ property, to find the criteria your after.

So proceeding with example of not including ‘transition’ elements, you can then move on to selecting what properties to export.

Again, depending on what your modelling and how you defined it, your requirements may differ here. In my example I’ll be using ‘Displayed Text’ – as that’s the exact data set I’m looking for.

Give your a report a name on the next step and then a report definition (for recognizing the report later on!).

Double click your newly created report to see the results.

You need to select an export format, as I said earlier, Excel is my personal favourite for manipulating large amounts of text and filtering – but the choice is entirely yours of course.

Voila! Your data is exported in a lovely styled format ready to use as you please.

I kind of skipped over the selecting the report criteria section, so if anyone would like more guidance in that area let me know!


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!

Adding External Data to Visio 2010 Models – An example using State Chart’s in Visio 2010

Having recently started a new position and having to dust off the UML skill set, I’ve found a useful feature of Visio that I wanted to share. No doubt has been covered in detail before but perhaps not for this specific example.

I’ve been working on state charts for a system re-development and had a list of existing states from the old application that i wanted to cross reference against the new states i had modeled.

Rather than eyeballing everything manually I decided to use the .xls with my list of status as a data source in Visio and see what was missing from my updated model.

First select the ‘Link Data to Shapes’ option from the Visio ribbon.

Then as your data source, select an ‘Excel Worksheet’ – remember you could use any of the listed data sources to achieve the same objective if that’s easier. It might be a DB extract from a legacy system or a screen dump converted into a table or .xls – the world’s your oyster!

Personally I like the new SharePoint foundation list option, that is a powerful and useful way of incorporating business data into your models – possibilities are interesting there!

Then choose the .xls (or .xlsx!) you wish to use as your data source.

Now we have to select the range in the excel worksheet to use for our data. If you know the range go ahead and type it in, otherwise select ‘Select range’ and manually select the area you wish to use.

Once its in we need to select the column(s) we are concerned with. it may be useful to include an identifier column in your data in case you have integrity issues when changing things later on.

The next screen allows you to assign an identifier column (explained above). This is optional and useful if you plan on updating naming conventions and have a larger set of data.

Select ‘Finish’ to close the wizard.

If the import was successful you will see the ‘External data’ window appear with the columns you selected.

From here you can manually ‘drag and drop’ data onto shapes on your diagram to link, but I suggest using the handy auto-link feature handily provided by Visio 2010.

Assuming you named your shapes in a similar convention to the imported data, in my case it was naming system states and importing old state data, you will get a quick easy link between your source data and your shape elements. If this means tidying up your model and/or source data quickly first then it will probably save you time in the long run.

Like I said at the top of the post, not ground breaking stuff here, but still useful info for those working in this area.