Book Image

Microsoft Visio 2010 Business Process Diagramming and Validation

By : David Parker
Book Image

Microsoft Visio 2010 Business Process Diagramming and Validation

By: David Parker

Overview of 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.
Table of Contents (15 chapters)
Microsoft Visio 2010 Business Process Diagramming and Validation
Credits
Foreword
About the Author
About the Reviewers
Preface

Preface

Once the creators of Aldus PageMaker had delivered Desktop publishing to the masses, they decided that they could make a smarter diagramming application. Eighteen months later, they emerged with the Visio product. Now they needed to get a foothold in the market, so they targeted the leading process flow diagramming package of the day, ABC FlowCharter, as the one to outdo. They soon achieved their aim to become the number one flowcharting application and so they went after other usage scenarios, such as network diagramming, organization charts, and building plans. In 1999, Microsoft bought Visio Corporation and Visio gradually became Microsoft Office Visio, meaning that all add-ons had to be written in a certain manner, and the common Microsoft Office core libraries like the Fluent UI were ever more increasingly employed.

Flowcharting still accounts for 30% of the typical uses that Visio is put to, but the core product did not substantially enhance its flowcharting abilities. There were some add-ons that provided rules, perhaps most notably for Data Flow Diagrams (which came and went); UML and Database Modelling, and many third parties have built whole flowcharting applications based on Visio. What all of these enhancements have in common is the imposition of a structure to the diagrams, which necessarily means the adoption of one rule set or another. There are a lot of competing and complementary rule sets in use, but what is important is that the chosen rule set fits the purpose it is being used for, and that it can be understood by other related professionals.

It is true that a picture is worth a thousand words, but the particular thousand words understood by each individual are more likely to be the same if the picture was created with commonly available rules. The structured diagramming features and Validation API in Visio 2010 enable business diagramming rules to be developed, reviewed, and deployed. The first diagramming types to have these rules applied to are process flowcharts, reminiscent of the vertical markets attacked by the first versions of Visio itself, but these rules can and will be extended beyond this discipline.

What this book covers

Chapter 1, Overview of Process Management in Microsoft Visio 2010, introduces 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.

Chapter 2, Understanding the Microsoft Visio Object Model, explains the Microsoft Visio 14.0 Type Library and the key objects, collections, and methods in the programmer's interface of Visio, where relevant for structured diagrams.

Chapter 3, Understanding the ShapeSheet™, explains the Microsoft Visio ShapeSheet™ and the key sections, rows, and cells, along with the functions available for writing ShapeSheet™ formulae, where relevant for structured diagrams.

Chapter 4, Understanding the Validation API, explains the Microsoft Visio Validation API and the key objects, collections, events, and methods in the programmer's interface for Visio diagram validation.

Chapter 5, Developing a Validation API Interface, is devoted to building a useful tool, called Rules Tools, to enable the tasks to be performed easily as Microsoft Visio 2010 does not provide a user interface to the Validation API for rules developers to use.

Chapter 6, Reviewing Validation Rules and Issues, will extend the tool, started in Chapter 5, to provide an import/export routine of rules to an XML file or to an HTML report, and a feature to add issues as annotations in Visio diagrams.

Chapter 7, Creating Validation Rules, will use the tool created in the previous chapter to create rules for structured diagramming. This chapter will look at common ShapeSheet™ functions that will be useful for rules, and the new Validation functions. It will also go through different scenarios for creating rules, especially with regard to Filter and Test Expressions.

Chapter 8, Publishing Validation Rules and Diagrams, will go through different methods for publishing Visio validation rules for others to use.

Chapter 9, A Worked Example for Data Flow Model Diagrams, presents a complete cycle for writing validation rules for the Data Flow Model Diagram methodology. Validation rules are created using the Rules Tools add-in developed in previous chapters, although alternative VBA code is provided.

What you need for this book

The following software products are used in this Microsoft Visio 2010 Business Process Diagramming and Validation book:

  • Microsoft Visio 2010 (Premium Edition for some of the content)

  • Microsoft Visio 2010 SDK

  • Optionally, Microsoft Visual Studio 2010 (with knowledge of C#)

Who this book is for

This book is primarily for Microsoft Office Visio users or developers who want to know how to use and extend the new Validation Rules in Microsoft Office Visio 2010 Premium Edition. There are some rule sets available out of the box, but the capability can be added to many sorts of diagramming, whether they are process flows, network cabling drawings, or risk dependency diagrams, for example. This is not a Visio SmartShape developer manual or a Visio automation guide, although these subjects are explored when relevant for writing validation rules, but it does shed light on the possibilities with this new powerful feature of Microsoft Office Visio 2010. This book will be an essential guide to understanding and creating structured diagramming rules, and will add developer tools that are not in the out of the box product.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: " The following class diagram displays the methods of the VEDocuments class."

A block of code is set as follows:

private void VisioEvents_Connect()
{
Globals.ThisAddIn.Application.DocumentOpened += new Visio.EApplication_DocumentOpenedEventHandler( VisioApplication_DocumentOpened);
Globals.ThisAddIn.Application.DocumentCreated += new Visio.EApplication_DocumentCreatedEventHandler( VisioApplication_DocumentCreated);
Globals.ThisAddIn.Application.BeforeDocumentClose += new Visio.EApplication_BeforeDocumentCloseEventHandler(
VisioApplication_BeforeDocumentClose);
//Listen for selection changes
Globals.ThisAddIn.Application.SelectionChanged += new Visio.EApplication_SelectionChangedEventHandler( Window_SelectionChanged);
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

For Each shp In shps
If shp.CellExistsU("User.UMLShapeType", Visio.visExistsAnywhere) Then
Select Case shp.Cells("User.UMLShapeType").ResultIU
Case 97
shapeID = shp.ID
Case 98, 99, 100
shapeID = shp.ID
flowchartShapes.Add shapeID
hshTable.Add shapeID, shapeStatus.[New]
End Select
End If
Next

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Let us create a test rule by selecting the Add button on the Rules Tools ribbon group.".

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to, and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book on, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Note

Downloading the example code for this book

You can download the example code files for all Packt books you have purchased from your account at zhttp://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files emailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.