Microsoft Visio 2010 Business Process Diagramming and Validation
()
About this ebook
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.
A comprehensive and highly practical Visio 2010 tutorial using Premium Edition, including example code and demonstrations for creating Validation Rules, writing ShapeSheet formulae, and much more
ApproachA focused tutorial, this book provides a range of practical examples with downloadable code, showing you how to create business process diagramming templates with Visio and enabling you to effectively visualize business information. It draws on real business examples and needs, and covers all the new features of Visio 2010 Premium Edition.
Who this book is forIf you are a Microsoft Visio 2010 Premium Edition user or developer who wants to get to grips with both the basic features of Visio 2010 and the new Validation Rules in this edition, then this book is for you. A working knowledge of Microsoft Visio, and optionally .NET for the add-in code, is required, though previous knowledge of business process diagramming is not necessary. More experienced Visio users will gain valuable knowledge for building add-ins and creating and publishing rules. If you want to achieve results from Visio 2010 beyond the ordinary out-of-the-box features, then this book is ideal for you. Although this book covers the Premium Edition, much of the book is still useful if you are a Visio 2010 Standard Edition or Professional Edition user.
David J. 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.
Related to Microsoft Visio 2010 Business Process Diagramming and Validation
Related ebooks
Mastering Data Visualization with Microsoft Visio Professional 2016 Rating: 0 out of 5 stars0 ratingsMicrosoft Dynamics AX 2012 R3 Reporting Cookbook Rating: 0 out of 5 stars0 ratingsMicrosoft Dynamics AX Implementation Guide Rating: 5 out of 5 stars5/5Office 365 All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsAccess 2016: Up To Speed Rating: 5 out of 5 stars5/5Excel Macros For Dummies Rating: 0 out of 5 stars0 ratingsSharePoint 2010 Issue Tracking System Design, Create, and Manage Rating: 3 out of 5 stars3/5Microsoft Visio 2013 Basics Rating: 0 out of 5 stars0 ratingsVisio 2016: Up To Speed Rating: 0 out of 5 stars0 ratingsSharePoint 2016 For Dummies Rating: 5 out of 5 stars5/5Practical Project Management with Microsoft Project Rating: 0 out of 5 stars0 ratingsHow to Learn Microsoft Visio Quickly! Rating: 0 out of 5 stars0 ratingsHow To Develop A Performance Reporting Tool with MS Excel and MS SharePoint Rating: 0 out of 5 stars0 ratings15 Most Powerful Features Of Pivot Tables: Save Your Time With MS Excel Rating: 0 out of 5 stars0 ratingsThe Microsoft Outlook Ideas Book Rating: 0 out of 5 stars0 ratingsThe Digital Technical Documentation Handbook Rating: 0 out of 5 stars0 ratingsVisual Project Management Rating: 0 out of 5 stars0 ratingsThe Complete Business Process Handbook: Body of Knowledge from Process Modeling to BPM, Volume 1 Rating: 4 out of 5 stars4/5Extending Microsoft Dynamics 365 for Operations Cookbook Rating: 5 out of 5 stars5/5MrExcel LIVe: The 54 Greatest Excel Tips of All Time Rating: 5 out of 5 stars5/5More Excel Outside the Box: Unbelievable Excel Techniques from Excel MVP Bob Umlas Rating: 0 out of 5 stars0 ratingsSharePoint 2010 All-in-One For Dummies Rating: 4 out of 5 stars4/5Microsoft Dynamics 365 For Dummies Rating: 0 out of 5 stars0 ratingsThe Secret Life of Word: A Professional Writer's Guide to Microsoft Word Automation Rating: 0 out of 5 stars0 ratingsMDX with Microsoft SQL Server 2016 Analysis Services Cookbook - Third Edition Rating: 0 out of 5 stars0 ratingsSharepoint Administration Third Edition Rating: 0 out of 5 stars0 ratingsExcel Dashboards and Reports Rating: 5 out of 5 stars5/5Project Management Office A Complete Guide - 2021 Edition Rating: 5 out of 5 stars5/5
Enterprise Applications For You
Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Bitcoin For Dummies Rating: 4 out of 5 stars4/5Learn Windows PowerShell in a Month of Lunches Rating: 0 out of 5 stars0 ratingsCreating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Excel Formulas and Functions 2020: Excel Academy, #1 Rating: 4 out of 5 stars4/5101 Ready-to-Use Excel Formulas Rating: 4 out of 5 stars4/5Enterprise AI For Dummies Rating: 3 out of 5 stars3/5The New Email Revolution: Save Time, Make Money, and Write Emails People Actually Want to Read! Rating: 5 out of 5 stars5/5Microsoft Power Platform A Deep Dive: Dig into Power Apps, Power Automate, Power BI, and Power Virtual Agents (English Edition) Rating: 0 out of 5 stars0 ratingsExcel 2019 Bible Rating: 4 out of 5 stars4/5Excel Guide for Success Rating: 5 out of 5 stars5/5ChatGPT Ultimate User Guide - How to Make Money Online Faster and More Precise Using AI Technology Rating: 0 out of 5 stars0 ratingsExcel 2019 For Dummies Rating: 3 out of 5 stars3/5QuickBooks 2023 All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsExperts' Guide to OneNote Rating: 5 out of 5 stars5/5Building Web Services with Microsoft Azure Rating: 0 out of 5 stars0 ratingsExcel Formulas That Automate Tasks You No Longer Have Time For Rating: 5 out of 5 stars5/5Data Governance: How to Design, Deploy and Sustain an Effective Data Governance Program Rating: 4 out of 5 stars4/550 Useful Excel Functions: Excel Essentials, #3 Rating: 5 out of 5 stars5/5QuickBooks Online For Dummies Rating: 0 out of 5 stars0 ratingsQuickBooks 2021 For Dummies Rating: 0 out of 5 stars0 ratingsExcel Tips and Tricks Rating: 0 out of 5 stars0 ratingsLearning Microsoft Azure Rating: 4 out of 5 stars4/5Managing Humans: Biting and Humorous Tales of a Software Engineering Manager Rating: 4 out of 5 stars4/5The Ridiculously Simple Guide to Google Docs: A Practical Guide to Cloud-Based Word Processing Rating: 0 out of 5 stars0 ratings
Reviews for Microsoft Visio 2010 Business Process Diagramming and Validation
0 ratings0 reviews
Book preview
Microsoft Visio 2010 Business Process Diagramming and Validation - David J. Parker
Table of Contents
Microsoft Visio 2010 Business Process Diagramming and Validation
Credits
Foreword
About the Author
About the Reviewers
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Overview of Process Management in Microsoft Visio 2010
What is new in Visio 2010 for Process Management?
Visio Process Management capabilities
The foundations of structured diagrams
Enhanced process flow templates
The Flowchart templates
New process flow templates
BPMN Diagram template
SharePoint Workflow Designer template
Validation of process diagrams
Visio Process Repository
Visio services
What are the Visio 2010 editions?
Planning your own solutions
Summary
2. Understanding the Microsoft Visio Object Model
The Visio Type libraries
But all I need is the object model
Types of Visio document
Which programming language should you use with Visio?
The Drawing Explorer window
The Visio object model
The Application object
The ActiveDocument and ActivePage objects
The Addons collection
The COMAddIns collection
The CurrentEdition property
The DataFeaturesEnabled property
The Documents collection
The TypelibMinorVersion and Version properties
The Document object
The Advanced Properties object
The DataRecordsets collection
The DocumentSheet object
The ID and Index properties
The FullName and Name properties
The Masters collection
The Pages collection
The ReadOnly property
The Type property
The Validation object
The Master object
The BaseID property
The Hidden property
The ID, Index, and IndexInStencil properties
The Name and NameU properties
The PageSheet object
The Type property
The Page object
The Connects collection
The ID and Index properties
The Layers collection
The PageSheet object
The Reviewer property
The Shapes collection
The Type property
The Shape object
The Characters and Text properties
The Connects and FromConnects collections
The Hyperlinks collection
The ID, Index, NameID, Name, and NameU properties
The IsCallout and IsDataGraphicCallout properties
The LayerCount property
The Master, MasterShape, and RootShape objects
The OneD property
The Parent object
The Type property
The Section object
The Row object
The Cell object
The Column property
The Error property
The Formula and FormulaU properties
The Name and LocalName properties
The Result properties
The Units property
Iterating through cells
Connectivity API
The Shape.ConnectedShapes method
The Shape.GluedShapes method
The Shape.MemberOfContainers property
The Shape.CalloutsAssociated property
Listing the steps in a process flow
Summary
3. Understanding the ShapeSheet™
Where is the ShapeSheet?
What are sections, rows, and cells?
Reading a cell's properties
Can I print out the ShapeSheet settings?
What is a function?
What are the important sections for rules validation?
The User-defined Cells section
What category is a Shape?
What structure type is a Shape?
Is the shape inside a container?
How many shapes are inside a Container shape?
Where is the shape in the List?
How many shapes are in a List shape?
Are there any Callouts attached to a shape?
Which shape is a Callout connected to?
The Shape Data section
The String type
The Fixed List type
The Number type
The Boolean type
The Variable List type
The Date type
The Duration type
The Currency type
The Hyperlinks section
Layer Membership
Summary
4. Understanding the Validation API
Overview of the Validation objects
The Validate method
Can custom rules code be validated?
The ValidationRuleSets collection
How do I add or update a rule set?
The ValidationRules collection
How do I add or update a rule?
How do I know my rule works?
ValidationIssues
Which issue is selected in the Issues window?
How do I toggle the Issues window visibility?
Which issues are caused by a particular shape?
How do I clear issues in code?
How do I validate in code?
How do I retrieve an existing issue in code?
How do I add an issue in code?
Summary
5. Developing a Validation API Interface
The architecture of the tool
ThisAddin class
Listening for application events
Checking for Visio Premium edition
Creating the ViewModel
Creating the BaseViewModel class
Viewing the documents collection
Viewing the ValidationRuleSets collection
Viewing the ValidationRules collection
Viewing the ValidationIssues collection
Modifying the Visio Fluent UI
Creating the Rules Explorer window
Self-describing tree views
Informative tooltips
Linked detail panels
Editing rule set properties
Editing rule properties
Handling special key strokes
The Explorer actions
The Add button
The Add Issue button
The Paste button
The Copy button
The Delete button
Displaying the rule for a selected issue
Displaying the issues for the current selection
Summary
6. Reviewing Validation Rules and Issues
Extensions to our ribbon
Annotating Visio diagrams with issues
Saving the current user settings
Displaying the issue markup page
Add in the issue comments
Hiding the issue markup page
Exporting rule sets to XML
Getting the XDocument object
Getting the VERuleSet XElement
Getting the VEIssue XElement
Importing rule sets from XML
Creating rule set reports
Getting the XSL stylesheet
Summary
7. Creating Validation Rules
Overview of the document validation process
Validation functions
Useful ShapeSheet functions
Filter and Test Expressions
Checking the type of shape
Checking the category of shape
Checking the layer of a shape
Checking if the page contains relevant shapes
Checking for specific cell values
Checking that connectors are connected
Checking that shapes have correct connections
Checking if shapes are outside containers
Custom validation rules in code
Summary
8. Publishing Validation Rules and Diagrams
Overview of the Visio categories and templates
Creating a custom template
Adding embellishments
Adding the template description
The simplest method to provide a template
Editing the file paths for templates
Creating a template preview image
Enhancing the quality of the preview image
The best method for publishing templates
Creating a setup project
Amending the installation package
Running the installation
Summary
9. A Worked Example for Data Flow Model Diagrams
What are Data Flow Diagrams?
Examining the standard template
Enhancing the masters
Editing the Data Flow master
Preparing for AutoConnect
Editing the Data Store master
Adding the Data Store Shape Data
Enhancing the Data Store graphics
Displaying the Data Store ID value
Improving the Data Store group shape
Editing the Interface master
Editing the Process master
Adding the Process Shape Data
Enhancing the Process graphics
Displaying the ID value
Displaying the Category value
Improving the group shape
Setting the sub-process master
Enhancing the page
Writing the rule set
All processes must have at least one data flow in and one data flow out
All processes should modify the incoming data, producing new forms of outgoing data
Each data store must be involved with at least one data flow
Each external entity must be involved with at least one data flow
A data flow must be attached to at least one process
Data flows cannot go directly from one external entity to another external entity: such flows need to go through at least one process
Do not allow a single page of a DFD to get too complex
Each component should be labeled
Each data flow should be labeled describing the data that flows through it
Each component and subcomponent should be numbered
A data flow must be connected between two components
A flow must not cycle back to itself
Completing the template
Creating the installer
Testing the installation
Summary
Index
Microsoft Visio 2010 Business Process Diagramming and Validation
Microsoft Visio 2010 Business Process Diagramming and Validation
Copyright © 2010 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: July 2010
Production Reference: 1020710
Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK.
ISBN 978-1-849680-14-1
www.packtpub.com
Cover Image by Sandeep Babu (<sandyjb@gmail.com>)
Credits
Author
David J. Parker
Reviewers
Dr. Stephanie L. Horn
John Marshall
Acquisition Editor
Kerry George
Development Editor
Stephanie Moss
Technical Editor
Vinodhan Nair
Indexer
Rekha Nair
Editorial Team Leader
Gagandeep Singh
Project Team Leader
Lata Basantani
Project Coordinator
Poorvi Nair
Graphics
Nilesh Mohite
Production Coordinators
Kruthika Bangera
Adline Swetha Jesuthas
Cover Work
Kruthika Bangera
Foreword
I met the author through the Visio MVP community — a group of elite Visio experts who actively share their technical expertise with others. David Parker is a long-time Visio MVP, and we first discussed the new Diagram Validation functionality shipped with Microsoft Visio Premium 2010 almost two years before its release. As a Visio MVP, David provides input for new functionality and early feedback on features as they are developed. Diagram Validation was one of the features I worked on for Visio 2010, and David was keen to learn about its functionality.
The Visio team had heard from our customers that they spend a lot of time manually checking diagrams to find even simple problems like shapes without labels and unconnected shapes. Companies were also struggling to ensure that diagrams met certain compliancy requirements or business standards. With Diagram Validation, Visio automatically verifies properties of a diagram and displays diagramming issues. It is then easy to review the issues and fix the problems in the diagram. This automatic detection of diagramming errors is a big time saver and can greatly increase diagram quality.
Microsoft Visio Premium 2010 provides built-in validation support for Basic Flowchart, Cross-Functional Flowchart, Six Sigma, Microsoft SharePoint Workflow, and Business Process Modeling Notation (BPMN) diagrams. What intrigued David most, though, was the ability for anyone to create custom validation logic — you can specify your own custom diagram requirements, for any type of diagram, and Visio will verify these requirements for you. Moreover, once you have created custom validation logic, you can use it in all your diagrams, share it with others, distribute it within your company, or even sell it as part of a Visio solution. As most diagrams have some logical structure to them, there are many opportunities to create your own custom validation logic and extend the built-in functionality of Diagram Validation.
Although Visio 2010 has just recently been released, David is already an expert in the area of Diagram Validation. He has created new validation logic for several different diagram types, created a tool to work with validation logic in Visio, and written articles about Diagram Validation. Outside of the Visio team itself, David is probably most versed in this area of Visio 2010. It was not surprising then that David chose this area for his new book. This is David Parker’s second book — he is also the author of Visualizing Information with Microsoft Office Visio 2007.
As a technical reviewer for this book, I had a chance to read the book from cover to cover. As I read, there were a couple of key things that impressed me about its contents. First, this is more than a book about Diagram Validation; it also introduces Visio users to an assortment of new Visio 2010 features. Second, it presents a nice balance between the Visio Object Model and the Visio ShapeSheet. These two powerful tools combine to provide a unique development experience within Visio. Finally, the book provides coded examples, and even a chapter devoted to a worked example. These clear, well thought out examples are great for those who want to experiment in Visio as they read the book.
David begins this book with an overview of process management in Visio 2010. Diagram Validation is one of many features developed for business process users. In fact, business process management is a cornerstone of Microsoft Visio Premium 2010. The Visio team spent a lot of time reflecting on how we could best enhance the experience for our business process users—we added new diagram types like BPMN and SharePoint workflow, redesigned our Cross-Functionality Flowchart (CFF) support to make it easier to use, and created new support for concepts like sub-processes and Diagram Validation. Readers of this book will be introduced to a breadth of new Visio 2010 functionality, thanks to David’s considerable knowledge of Visio 2010.
David next devotes a chapter each to the Visio Object Model and the Visio ShapeSheet. Microsoft Visio is unique as a diagramming application, because of the joint power of the Visio Object Model and Visio shapes. Beginners to Visio are often surprised by the amount of data and behavioral logic that can be specified on a shape, through the ShapeSheet. For example, the way a shape interacts with other shapes and the drawing page and the way users can interact with the shape are often implemented by formulas entered in the ShapeSheet. David is well aware of the balance between creating smart shapes and writing solution code.
A similar balance exists between the Visio ShapeSheet and validation logic—the validation logic can often be made simpler if the data or logic specified on shapes is slightly more complex. Unless you write code to specify your diagram requirements, this realization is fundamental to writing validation logic for your requirements. Appropriately, the worked example for data flow model diagrams at the end of the book shows how the shape properties specified in the ShapeSheet can be leveraged when writing validation logic.
Having written a significant amount of the validation logic shipped with Visio 2010, I am familiar with the learning curve associated with writing validation logic. It was daunting, at first to ponder expressing the validation logic to check the visual correctness of a diagram based on the diagramming rules specified in the BPMN standard. Perhaps surprisingly, this task turned out to be rather straightforward—Microsoft Visio Premium 2010 shipped this BPMN validation logic and it is also written out in this book’s appendix.
To write even very complex validation logic, it is simply a matter of clearly understanding the fundamentals of Diagram Validation. This book presents these fundamentals and, through examples, shows you how to create custom validation logic. David enjoyed the challenge of writing complex diagram requirements as validation logic, and the satisfaction of having these requirements forevermore verified automatically and I hope you have a similar experience with Diagram Validation. It is very rewarding to have the ability to express diagram requirements to meet your needs, and to know these requirements will be automatically verified by Microsoft Visio Premium 2010.
Dr. Stephanie L. Horn
VISIO MVP Coordinator and Program Manager on the Visio development team
About the Author
David J. Parker explored linking Unix CAD and SQL databases in the early ‘90s for facilities and cable management, as he was frustrated as an architect in the late ‘80s, trying to match 3D building models with spreadsheets.
In ‘96 he discovered the ease of linking data to Visio diagrams of personnel and office layouts. He immediately became one of the first Visio business partners in Europe, and was soon invited to present his applications at worldwide Visio conferences. He started his own Visio-based consultancy and development business, bVisual ltd (http://www.bvisual.net), applying analysis, synthesis, and design to various graphical information solutions.
He has presented Visio solution provider courses for Microsoft EMEA, adding personal anecdotes and previous mistakes hoping that all can learn from them.
He wrote his first book, Visualizing Information with Microsoft Office Visio 2007 (http://www.visualizinginformation.com), to spread the word about data-linked diagrams in business, and is currently writing his second book, which is about creating custom rules for validating structured diagrams in Visio 2010.
David wrote WBS Modeler for Microsoft, which integrates Visio and Project, and many other Visio solutions for various vertical markets.
David has been regularly awarded Most Valued Professional status for his Visio community work over the years, and maintains a Visio blog at http://bvisual.spaces.live.com.
Based near to Microsoft UK in Reading, he still sees the need for Visio evangelism throughout the business and development community.
I would like to thank the Microsoft Visio for continuing to develop such a great application, and in particular, Stephanie Horn for agreeing to edit this book. Similarly, I would like to thank my fellow Visio MVP, John Marshall, for his help and encouragement. Most of all, I would like to thank my wife, Beena, for allowing me to write another book!
About the Reviewers
Dr. Stephanie L. Horn is a Program Manager on the Visio team at Microsoft and coordinated the Diagram Validation feature introduced in Microsoft Visio 2010. She is also responsible for the programmability aspects of Visio and is the coordinator for the Visio MVPs—a small group of recognized Visio community leaders that includes the author, David Parker. She holds a Ph.D. in Computer Science from the University of Toronto.
John Marshall apprenticed as a Civil Engineer and early on learned the power of computers. Many of the tedious tasks that were routine in Civil Engineering could be automated and done in less time with better accuracy.
After university, he switched to OS development on mainframes