Microsoft Visio 2010 Business Process Diagramming and Validation

By David John Parker
  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Overview of Process Management in Microsoft Visio 2010

About this book

Microsoft Visio is a diagramming program using vector graphics, which ultimately allows business professionals to explore and communicate complex information more effectively. Through various visual representations, Visio enables complicated data to be presented in a clear, communicative, and data-connected way. Therefore, productivity is increased by utilizing the wide variety of diagrams that can convey information at a glance, as data can be understood and acted upon quickly. This book enables business developers to unleash the full potential of Diagram Validation that Visio 2010 Premium Edition has to offer.

This focused tutorial will enable you to get to grips with Diagram Validation in Visio 2010 Premium Edition to the fullest extent, enabling powerful automatic diagram verification based on custom logic and assuring correct and compliant diagrams. You will learn how to create and publish Rules, and use the ShapeSheet to write formulae. There is a special focus on extending and enhancing the capabilities of Visio 2010 diagram validation, and on features that are not found in the out-of-the-box product, like installing and using a new Rules Tools add-in, complete with source code, reviewing the new diagramming rules in flowchart and BPMN templates, and creating your own enhanced Data Flow Model Diagram template, complete with Validation Rules.

The book begins by covering the basic functions of Visio 2010, and then dives deep into showing you how to formulate your own Validation Rules and understand the Visio Object Model. ShapeSheet functions are explored in detail, as are creating Validation Rule Sets and Rules, and visualizing issues, with practical demonstrations along the way. Other content includes building a Rules Tools add-in using C#, creating test and filter expressions, and publishing Validation Rules for others to use. Finally, the book considers the creation and implementation of a new RuleSet for Data Flow Model Diagrams with a worked example.

By following the practical and immediately deployable examples found in the book, you will successfully learn both how to use the features of Microsoft Visio 2010, and how to extend the functionality provided in the box.

Publication date:
July 2010
Publisher
Packt
Pages
344
ISBN
9781849680141

 

Chapter 1. Overview of Process Management in Microsoft Visio 2010

Process flow diagrams have long been a cornerstone of Visio's popularity and appeal, and, although there have been some usability improvements over the years, there have been few enhancements to turn the diagrams into models that can be managed efficiently. Microsoft Visio 2010 sees the introduction of two features that make process management achievable and customizable.

In this chapter, you will be introduced to the new features that have been added to Microsoft Visio to support structured diagrams and validation. You will see where Visio fits in the Process Management stack, and explore the relevant out of the box content.

What is new in Visio 2010 for Process Management?

Firstly, Microsoft Visio 2010 introduces the new Validation API for structured diagrams, and provides several examples of this in use, for example with the new BPMN Diagram and Microsoft SharePoint Workflow templates, and the improvements to the Basic Flowchart and Cross-Functional Flowchart templates, all of which are found in the Flowchart category.

Templates in Visio consist of a predefined Visio document that has one or more pages, and may have a series of docked stencils (usually positioned on the left-hand side of workspace area). The template document may have an associated list of add-ons that are active whilst it is in use, and, with Visio 2010 Premium Edition, an associated list of structured diagram validation rule sets as well.

Secondly, the concept of a Subprocess has been introduced. This enables processes to hyperlink to other pages describing the subprocesses in the same document, or even across documents. This latter point is necessary if subprocesses are stored in a document library, such as Microsoft SharePoint.

The following screenshot illustrates how an existing subprocess can be associated with a shape in a larger process:

In addition, a subprocess page can be created from an existing shape, or a selection of shapes, in which case they will be moved to the newly-created page.

There are also a number of new ease-of-use features in Microsoft Visio 2010 to assist in the creation and revision of process flow diagrams. These include:

  • Easy auto-connection of shapes

  • Aligning and spacing of shapes

  • Insertion and deletion of connected shapes

  • Improved cross-functional flowcharts

  • Subprocesses

  • An infinite page option, so you need not go over the edge of the paper ever again

However, this book is not about teaching the user how to use these features, since there will be many other authors willing to show you how to perform tasks that only need to be explained once. This book is about understanding the Validation API in particular, so that you can create or amend, the rules to match the business logic that your business requires.

 

What is new in Visio 2010 for Process Management?


Firstly, Microsoft Visio 2010 introduces the new Validation API for structured diagrams, and provides several examples of this in use, for example with the new BPMN Diagram and Microsoft SharePoint Workflow templates, and the improvements to the Basic Flowchart and Cross-Functional Flowchart templates, all of which are found in the Flowchart category.

Templates in Visio consist of a predefined Visio document that has one or more pages, and may have a series of docked stencils (usually positioned on the left-hand side of workspace area). The template document may have an associated list of add-ons that are active whilst it is in use, and, with Visio 2010 Premium Edition, an associated list of structured diagram validation rule sets as well.

Secondly, the concept of a Subprocess has been introduced. This enables processes to hyperlink to other pages describing the subprocesses in the same document, or even across documents. This latter point is necessary if subprocesses are stored in a document library, such as Microsoft SharePoint.

The following screenshot illustrates how an existing subprocess can be associated with a shape in a larger process:

In addition, a subprocess page can be created from an existing shape, or a selection of shapes, in which case they will be moved to the newly-created page.

There are also a number of new ease-of-use features in Microsoft Visio 2010 to assist in the creation and revision of process flow diagrams. These include:

  • Easy auto-connection of shapes

  • Aligning and spacing of shapes

  • Insertion and deletion of connected shapes

  • Improved cross-functional flowcharts

  • Subprocesses

  • An infinite page option, so you need not go over the edge of the paper ever again

However, this book is not about teaching the user how to use these features, since there will be many other authors willing to show you how to perform tasks that only need to be explained once. This book is about understanding the Validation API in particular, so that you can create or amend, the rules to match the business logic that your business requires.

 

Visio Process Management capabilities


Microsoft Visio now sits at the top of the Microsoft Process Management Product Stack, providing a Business Process Analysis (BPA) or Business Process Modeling (BPM) tool for business analysts, process owners/participants, and line of business software architects/developers.

Of course, your particular business may not have all, or parts, of the stack, but you will see in later chapters how Visio 2010 can be used in isolation for business process management to a certain depth.

If we look at the Visio BPM Maturity Model that Microsoft presented to their partners, then we can see that Visio 2010 has filled some of the gaps that were still present after Visio 2007. However, we can also see that there are plenty of opportunities for partners to provide solutions on top of the Visio platform.

Throughout this book we will be going into detail about Level 5 (Validation) in Visio 2010, because it is important to understand the core capabilities provided in Visio 2010. We will then be able to take the opportunity to provide custom Business Rule Modeling and Visualization.

 

The foundations of structured diagrams


A structured diagram is a set of logical relationships between items, where these relationships provide visual organization or describe special interaction behaviors between them.

The Microsoft Visio team analyzed the requirements for adding structure to diagrams, and came up with a number of features that needed to be added to the Visio product to achieve this:

  • Container Management: The ability to add labeled boxes around shapes to visually organize them

  • Callout Management: The ability to associate callouts with shapes to display notes

  • List Management: To provide order to shapes within a container

  • Validation API: The ability to test the business logic of a diagram

  • Connectivity API: The ability to create, remove, or traverse connections easily

The following diagram demonstrates the use of Containers and Callouts in the construction of a basic flowchart, which has been validated using the Validation API, that in turn uses the Connectivity API.

 

Enhanced process flow templates


There are two process flow diagram templates in Visio 2010 Premium edition that have been enhanced since the previous versions of Visio to include validation rules.

The Flowchart templates

There is now very little difference between the Basic Flowchart template and the Cross-Functional Flowchart template in the Flowchart category. In fact, they are identical apart from the latter opening with a couple of Swimlane shapes already placed on the page. Any Basic Flowchart diagram can become a Cross-Functional Flowchart diagram with the dragging-and-dropping of a Swimlane shape onto the page, at which point the new Cross-Functional Flowchart tab will appear.

In addition, parts of the new Six Sigma template in the Business category, which is Visio 2010 Premium edition only, use the same flowchart rules.

 

New process flow templates


There are two new process flow diagram templates in addition to the Six Sigma Diagram template, in the Flowchart category of Visio 2010 Premium edition that include their own validation rules. The first, BPMN Diagram, provides native Visio support for an important and widely-used process flow notation, and the second, Microsoft SharePoint Workflow enables visual development of SharePoint workflows that integrates closely with Visual Studio 2010 and SharePoint 2010.

BPMN Diagram template

The Object Management Group/Business Process Management Initiative (http://bpmn.org/ ) promotes the BPMN standards. The BMPN version in Microsoft Visio 2010 is 1.2. There is no better short description of BPMN than the charter from the OMG's website, which states:

A standard Business Process Modeling Notation (BPMN) will provide businesses with the capability of understanding their internal business procedures in a graphical notation and will give organizations the ability to communicate these procedures in a standard manner. Furthermore, the graphical notation will facilitate the understanding of the performance collaborations and business transactions between the organizations. This will ensure that businesses will understand themselves and participants in their business and will enable organizations to adjust to new internal and B2B business circumstances quickly.

Having been involved in the creation of two other BPMN solutions based on earlier versions of Visio, I believe that the native support of BPMN is a very important development for Microsoft, because it is obviously a very popular methodology for the description of an interchange of business processes.

The BMPN template in Visio 2010 contains five docked stencils, each of them containing a logical set of shapes.

Each of the shapes has BPMN attributes in the form of a set of Shape Data, which can be edited using the Shape Data window or dialog. Some shapes can also be edited using the right-mouse menu.

These Shape Data rows correspond to BPMN attributes, as specified by the OMG specification. In the above diagram, a Task shape is selected revealing that there are many permutations that can be set. A few of these permutations are made easily accessible by laying them out in the BPMN Activities stencil as different shapes.

In reality, any of these Task/Activity shapes can be changed into any of the other shapes in the BPMN Activities stencil by amending the Shape Data. Thus, the original name of the Master shape is really immaterial, since it is the Shape Data that determines how it should be understood.

SharePoint Workflow Designer template

Microsoft Visio 2010 also includes a template and shapes for designing workflows that can be imported into Microsoft SharePoint Designer. You can also take workflow files that were created in Microsoft SharePoint Designer and open them in Visio, which generates a diagram of the workflow that you can view and modify. You can pass the workflow back and forth between the two with no loss of data or functionality, by using a Visio Workflow Interchange (*.vwi) file.

 

Validation of process diagrams


Validation ensures that the diagram is compliant with the required business logic by checking that it is properly constructed. Therefore, you need to be able to verify that the rule set being used is the one that your business requires. Visio will not provide instant feedback at the moment when you transgress a rule. However, it will check your diagram against a rule set only when you select Check Diagram. It will then provide you with feedback on why any given rule has been broken.

Some of the Validation API can be accessed via the Process tab on the Diagram Validation group, but there is more that is available only to developers, thus enabling you to automate some tasks if necessary.

The first group on the Process tab, Subprocess, is for the creation of subprocesses, and the third group is for the Import and Export of a SharePoint Workflow, but it is the second group, Diagram Validation, that is of most interest here.

In this second group, the first button, Check Diagram, validates the whole document against the selected rule set(s). You can have more than one rule set in a document, which can be enabled or disabled as required. The drop-down menu on the Check Diagram button enables you to select which Rules to Check, and also to Import Rules From another open Visio document. It is a pity that you cannot export to/import from XML, but we will create our own tool to do that in a later chapter.

At this point, we should be aware that Visio documents can either be saved as binary (normally with a *.vsd extension) or XML format (normally with a *.vdx extension). So, if we save a Visio document that contains a rule set in XML format, then it can be opened in an XML viewer or editor, such as Microsoft's XML Notepad. Here we can see that the new Validation extensions for Microsoft Visio 2010 (internally, version 14) are clearly visible in XML:

If we expand a v14:RuleSet branch, and one of the v14:Rule sub-branches, then we can see how a rule is defined.

Later, we will be going into these definitions in much greater detail, but for now, notice that the v14:RuleFilter and v14:RuleTest elements contain formulae that precisely define what constitutes the particular rule.

The Diagram Validation group also has the option to show/hide the Issues Window, which has a right-mouse menu that is identical (apart from the additional Arrange by menu option) to the drop-down menu on the Ignore This Issue button.

Now that we can see that a Rule has an ID, and belongs to a RuleSet that also has an ID, we can begin to understand how an issue can be associated with a shape. So, if we expand an v14:Issue element in the Visio document XML, we can see that v14:Issue has v14:IssueTarget and v14:RuleInfo elements.

If we were to look for the Shape in the document XML, we can find it by its ID under the Shapes collection of the Page, also identified by its ID.

In fact, the PageID and ShapeID element of an IssueTarget are optional because an issue may just be associated with a page, or even with the whole document.

We will use the new Validation API to explore these RuleSets, Rules, and Issues in later chapters, and we will expose them to scrutiny so that your business can be satisfied that you have modeled the business logic correctly.

 

Visio Process Repository


There is also a new Visio Process Repository, which is a site template that is included with Microsoft SharePoint 2010. It provides a place to share and collaborate on process diagrams. The repository has built-in file access control and version control—users can view the process diagram simultaneously and edit the diagram without corrupting the original.

This repository can therefore ensure that a user is editing the most recent version of a process diagram, and enables a user to find out about updates that have been made to processes of interest to them.

In addition, administrators can monitor whether diagrams comply with a business's internal standards or not, or discover, for example, which processes apply to a specified department.

 

Visio services


Microsoft Visio has had, for several versions, a useful Save As Web feature that creates a mini-website, complete with widgets for pan and zoom, Shape Data, and shape reports. This has worked best using the Vector Markup Language (VML) in Microsoft Internet Explorer, or in Scalable Vector Graphics (SVG) using a web browser plugin in IE, although it has native support in some other browsers. This is quite powerful, but it does require that the native Visio file is republished if any changes are made to the document. Visio 2010 has introduced the increasingly adopted XAML format, which actually means that the Visio file will be rendered for viewing in Silverlight. This is a very useful addition.

In addition, Microsoft has an ActiveX Visio Viewer control that can display native Visio files that are in both binary and XML format. This control is installed as default with Microsoft Outlook 2007+, but is also available as a separate free download from Microsoft. In fact, the Visio Viewer control has a programmable API that enables Shape Data to be extracted and exposed too. While this viewer has the advantage that the native file does not have to be republished, its reach is limited by the choice of browsers available, and the willingness to make the native Visio file accessible—this is not always the best strategy.

Microsoft Visio 2010 provides Visio Services for Microsoft SharePoint. Therefore, with rendering on the server, any client that accesses the Microsoft SharePoint site will have the ability to view Visio diagrams without having to install anything locally.

The user can interact with the diagrams by clicking on shapes to view the Shape Data, navigating any embedded hyperlinks, as well as pan/zoom and print capabilities. These are capabilities of the Save As Web and Visio Viewer options too.

Microsoft Visio 2007 introduced the ability to add a data recordset to a diagram and refresh the data so that the diagram could be kept up-to-date, but the Save As Web html pages and the Visio Viewer ActiveX control are not able to automatically respond to any data changes. Therefore, the diagram can quickly become outdated, thus requiring you to refresh the diagram in Visio, and then to republish it.

Now with Visio Services, that same data recordset can be refreshed by the server, thus providing everyone who views the diagram using the new Visio web part with the latest information. This is extremely nice, but be aware that there are some limitations, such as no shapes will be added, moved, or deleted in this operation, as only linked Shape Data and Data Graphics are updated and all layers will be visible. Still, you no longer have to republish just to refresh the data set!

Note

Visio has a complex layering system. Most CAD systems, for example, insist that all diagram elements belong to a single layer. This layer can either be made visible or not, or all elements on a layer have a specified color. Drawing elements in Visio can belong to none, one, or many layers! Visio Services, however, simply ignores layers.

 

What are the Visio 2010 editions?


Microsoft decided to split Visio 2010 into three editions, so you need to be aware of the relevant features that are in each of them. In the following matrix, a black dot denotes which features are present:

Although you will need Microsoft Visio 2010 Premium edition to use the Validation capabilities, the other editions will be able to review any of the diagrams created.

 

Planning your own solutions


By now, you should be eager to explore the out of the box structured diagram functionality, and perhaps be considering how to create validation rules for your own business. In doing so, I would advise that you always look to build upon what Visio provides—do not try to replicate it! I believe that trying to create your own Shape Data objects, or your own line routing algorithms, for example, is ultimately a waste of time as they will lead you down some dead-ends, some of which still exist within the boxed Visio product. For example, the following three legacy diagram templates in Visio have their own limitations. They are:

  • The Software and Database|UML Model Diagram solution within Visio is essentially a closed third-party add-on that was purchased, and has seen very little development since then. However, all sets of rules need to be updated from time to time, and so the UML version in Visio will always lag behind those of the leading developers of the UML standard. In addition, there are some elements of the UML solution in Visio that leaves the users constantly frustrated—such as the inability to get at the model composition programmatically.

  • The Software and Database|Database Model Diagram solution has a few annoyances, such as the inability to print any table or field notes, and the disappearance of any forward engineering capabilities.

  • The Software and Database|Data Flow Model Diagram solution is one that has been reassessed. We still have the template and stencil for this, but the add-on has not made it through the Microsoft rationalization of Visio add-ons. Therefore, you can now construct DFD models badly without realizing it. We will attempt to remedy this omission in a later chapter by constructing a rule set that can be used with DFD models.

One of the frequently asked questions by a newbie to Visio when confronted by the multiple diagram categories and types is how a particular template is supposed to be used? Often, they are directed to the Visio online help for examples of how to create certain types of diagrams, but this is not always sufficient because they are really asking for automatic assistance as they create the diagram. What they usually want is in fact a guided diagramming system; they require a system that provides them with some feedback on the way that they are composing a diagram. It is easy to drag-and-drop shapes in Visio, to connect them together, to make a diagram pretty with embellishments, or to add text in a variety of ways. However, this loosely-created drawing cannot consistently convey any semantic meaning unless it follows generally accepted rules. It is the imposition of rules that turns a pretty picture into a meaningful mesh of semantic symbology. This is where Microsoft Visio 2010 has made a great advance because it has provided us with the ability to create validation rules for different types of behaviors. In fact, these new features are worthy of a brand new tab, the Process tab, which although automatically applied to several drawing templates, is also available for use on any type of diagram.

 

Summary


In this chapter, we looked at an overview of the new capabilities and process diagram types in Visio 2010, especially with regard to structured and validated diagrams.

Microsoft Visio 2010 provides considerable ease-of-use features to the end user, a rich programming model for the developer, and greater capabilities for document management and sharing than ever before.

In the next chapter, we will need to delve deeper into the internal structure of a Visio document and the use of its various APIs so that you can best understand how to formulate your own rules to represent the business logic that you require.

About the Author

  • David John Parker

    David began his professional life as a qualified building architect in the UK, but found the challenge of linking information to drawings too exciting. He gave up architecture in the late 80s to follow his interest and became a developer and consultant on facilities and cable management software. In 1996, David began to use Visio linked to enterprise databases, and in 1998 started his own data visualization consultancy business, bVisual ltd. His Visio-based solutions have extended to include project management, risk analysis, and process flows, amongst other things.

    David has been a speaker at several Visio conferences over the years, and has been awarded Most Valued Professional status for his services to the Visio community for the last five years. He writes a regular Visio developer blog, and has previously authored a book about visualizing information with Visio 2007.

    Browse publications by this author