44,39 €
Microsoft Visio is a diagramming program which ultimately allows business professionals to explore and communicate complex information more effectively. Through easy-to-understand visual representations, Visio enables you to present complicated data in a clear and communicative 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 Visio 2013 Professional Edition.
Microsoft Visio 2013 Business Process Diagramming and Validation is a focused tutorial with a range of practical examples and downloadable code that shows you how to create business process diagramming templates with Visio, enabling you to effectively visualize business information. It draws on real business examples and needs and covers all the new features of Visio 2013 Professional Edition.
This focused tutorial will enable you to get to grips with diagram validation in Visio 2013 Professional Edition to the fullest extent, enabling you to perform powerful automatic diagram verification based on custom logic and assuring correct and compliant diagrams. You will learn how to create and publish rules and how to use the ShapeSheet to write formulae. There is also a special focus on extending and enhancing the capabilities of Visio 2013 diagram validation and on features that are not found in the out-of-the-box product, like installing and using the new Rules Tools add-on complete with source code, reviewing the new diagramming rules in flowcharts and BPMN templates, and creating your own enhanced Data Flow Model Diagram template complete with validation rules.
Microsoft Visio 2013 Business Process Diagramming and Validation begins by covering the basic functions of Visio 2013 before moving on to discuss how to formulate your own validation rules and how to use the Visio Object Model. ShapeSheet functions are explored in detail as well as how to create validation rule sets and visualizing issues, with practical demonstrations along the way. It also covers integration with SharePoint 2013 and Office365 and how to build a Rules Tools add-on using C#, how to create test and filter expressions, and how to publish validation rules for others to use. Finally, the book concludes with 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 this book, you will successfully learn how to use the features of Microsoft Visio 2013 and how to extend the functionality provided in the box.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 354
Veröffentlichungsjahr: 2013
Copyright © 2013 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
Second edition: November 2013
Production Reference: 1181113
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78217-800-2
www.packtpub.com
Cover Image by Artie Ng (<[email protected]>)
Author
David J. Parker
Reviewers
Nikolay Belykh
JMee Hong
Alexander Meijers
Ed Richards
Acquisition Editor
Neha Nagwekar
Lead Technical Editor
Neeshma Ramakrishnan
Technical Editors
Monica John
Edwin Moses
Mrunmayee Patil
Project Coordinator
Kranti Berde
Proofreader
Stephen Copestake
Indexer
Mehreen Deshmukh
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
David J. Parker, being frustrated as an architect in the late 80s trying to match 3D building models with spreadsheets, explored linking Unix, CAD, and SQL databases in the early 90s for facilities and cable management.
In 1996 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 presents Visio solution providers and Visio Services courses for Microsoft EMEA, adding personal anecdotes and previous mistakes hoping that all can learn by them.
He wrote his first book, Visualizing Information with Microsoft Office Visio 2007, to spread the word about data-linked diagrams in business, and his second book, which is about creating custom rules for validating structured diagrams in Visio 2010, has now been updated and extended for Visio 2013.
He 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://blog.bvisual.net.
Based near to Microsoft UK in Reading, he still sees the need for Visio evangelism throughout the business and development community, and has been touring many European capitals over the last two years spreading the word of intelligent business diagramming with Visio and SharePoint.
I would like to thank Microsoft for continuing to develop Visio, originally in Seattle, then Redmond in USA, and now in Hyderabad, India. Thank you to Dr. Stephanie Horn at Microsoft for editing the first version of this book, and my fellow Visio MVP, John Marshall, for his help and encouragement. For the second, and updated, version, I would like to thank fellow Visiophiles: Jimi Hong, Ed Richards, Alexander Meijers, and Nikolay Belykh for their comments.
Most of all, I would like to thank my wife, Beena, for putting up with me as I wrote another book. Maybe that is why my kids, Kryshnan and Alyesha, have both left home!
Nikolay Belykh is a Visio specialist and an active member of Visio society. He works currently as software architect in Process4.biz, the Microsoft partner company, which received the Visio Partner Award of year 2012. The company provides the award-winning modeling tool for business processes based on Microsoft Visio.
He received his MS degree in informatics from the Novosibirks University, Russia. After his postgraduation studies, he started to work as software engineer in industrial automation, where he first got in touch with Visio.
Now he lives and works in Vienna, Austria. You can reach him on Visio forums, or on his blog site Unmanaged Visio (http://unmanagedvisio.com), where you can find tips and free tools for Visio developers.
JMee Hong is a Visio MVP. Her specialties include technology and applications related to data or system visualization with graphic solutions such as Visio, CAD, and so on. She runs Visio adoption center with Microsoft Korea. She as a Visio evangelist has been working with many of the commercial and public sector customers for more than 8 years.
She holds B.S in mechatronics engineering and has also studied robotics system with virtual reality software. This enables her to understand and consult any business areas' engineering or technical graphic solution, and high usability interfaces.
I'm very honored in reviewing David J. Parker's book. He is a legend of Visio and I have always learned from him through his blog.
I'm so proud of being a reviewer of his book. Thanks to all the Visio MVPs!
Alexander Meijers has been involved with Microsoft products and technologies for more than 20 years. He got introduced with SharePoint and Office since the Version 2003 came to the market, and made these products his core knowledge. With his extended knowledge of programming, he sees a lot of the opportunities the products have. Due to the fact that the SharePoint platform depends heavenly on other Microsoft products, his knowledge also extends to other products such as SQL Server, Windows, Active Directory, and Exchange Server.
He has been involved to a large extent in SharePoint implementations and a number of Office solutions. These implementations ranged from small, medium, to large business project handling and in some cases involved more than 100 thousand end users. His multidiscipline allows him to handle a large set of roles in projects such as hardcore development, lead consultant, liaison between business and IT, business advisory, project management, and lead architect. In his spare time he blogs about SharePoint and Office at http://www.sharepointinspiration.com.
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Get notified! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page.
It has been three years since the first edition of this book, and the power of Visio as a platform for visual data has been enhanced even more. Microsoft has merged the Premium edition with the far more popular Professional edition, which means that the content of this book is now accessible to literally millions more Visio users because the Professional edition is the norm in business.
Once the creators of Aldus PageMaker had successfully introduced the desktop publishing paradigm in the late eighties, some of the key personnel involved left because 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 common Microsoft Office core libraries such as Fluent UI were ever more increasingly employed. Microsoft then dropped the Office part of the name, may be because Visio continues to be an independent profit center within Visio. The 2013 edition has seen Visio adopt the Open Packaging Convention that which had already been used by the main Office products for two versions. This potentially opens the contents of a Visio file to a mature group of developers with skills in this area.
Flowcharting still accounts for 30 percent 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, UML, and Database Modelling (all of which have now lost their built-in rules engine), 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 ruleset or another. There are a lot of competing and complementary rulesets in use, but what is important is that the chosen ruleset 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 Professional 2013 enable business diagramming rules to be developed, reviewed, and deployed. The first diagramming types to have these rules applied to them 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.
Chapter 1, Overview of Process Management in Microsoft Visio 2013, introduces Microsoft Visio and the features that support process management; further, it explores the built-in templates with validation rules.
Chapter 2, Understanding the Microsoft Visio Object Model, explores the useful objects, collections, and methods in the Visio object model, in relation to validation rules.
Chapter 3, Understanding the ShapeSheet™, explores the unique ShapeSheet, and the common sections, rows, and cells, along with useful functions and formulas.
Chapter 4, Understanding the Validation API, explores the objects, collections, and methods in the Validation API.
Chapter 5, Developing a Validation API Interface, explains how to develop a tool to create and edit validation rules.
Chapter 6, Reviewing Validation Rules and Issues, extends the tool to provide an XML import/export routine of rules and issue annotation features.
Chapter 7, Creating Validation Rules, explains how to use the new tool to create validation rules, and understand common functions in rule expressions.
Chapter 8, Publishing Validation Rules and Diagrams, examines the methods for publishing validation rules for others to use.
Chapter 9, A Worked Example for Data Flow Model Diagrams – Part 1, explores customizing the Data Flow Model Diagram template in preparation for validation rules.
Chapter 10, A Worked Example for Data Flow Model Diagrams – Part 2, presents how to go through each of the twelve rules in detail, writing a validation rule for each one.
Chapter 11, A Worked Example for Data Flow Model Diagrams – Part 3, deals with preparing the new custom template for publication and creating an installation package for it.
Chapter 12, Integrating Validated Diagrams with SharePoint 2013 and Office365, explains how to understand the advantages of utilizing Visio with SharePoint with respect to validated diagrams, and how to provide a custom template via SharePoint.
The following software products are used:
This book is primarily for Microsoft Visio users or developers who want to know how to use and extend the validation rules in Microsoft Visio 2013 Professional edition. There are some rulesets 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 of this new powerful feature of Microsoft Visio 2013. 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.
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 <[email protected]>, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
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.
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
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/submit-errata, selecting your book, clicking on the erratasubmissionform 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 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 <[email protected]> with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.
When Visio was first conceived of over 20 years ago, its first stated marketing aim was to outsell ABC Flowcharter, the best-selling process diagramming tool at the time. Therefore, Visio had to have all of the features from the start that are core in the creation of flowcharts, namely the ability to connect one shape to another and to have the lines route themselves around shapes. Visio soon achieved its aim, and looked for other targets to reach.
So, 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 saw the introduction of two features, structured diagrams and validation rules, that make process management achievable and customizable, and Microsoft Visio 2013 sees these features enhanced.
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.
Firstly, Microsoft Visio 2010 introduced a new Validation API for structured diagrams and provided several examples of this in use, for example with the BPMN (Business Process Modeling Notation) Diagram and Microsoft SharePoint Workflow templates and the improvements to the Basic Flowchartand Cross-Functional Flowchart templates, all of which are found in the Flowchart category. Microsoft Visio 2013 has updated the version of BPMN from 1.1 to 2.0, and has introduced a new SharePoint 2013 Workflow template, in addition to the 2010 one.
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 while it is in use, and, with Visio 2013 Professional edition, an associated list of structured diagram validation rulesets as well. Most of the templates that contain validation rules in Visio 2013 are in the Flowchart category, as seen in the following screenshot, with the exception being the Six Sigma template in the Business category.
Secondly, the concept of a Subprocess was introduced in Visio 2010. 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 subprocesscan be associated with a shape in a larger process, selecting an existing shape in the diagram, before selecting the existing page that it links to from the drop-down menu on the Link to Existing button.
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 were also a number of ease-of-use features introduced in Microsoft Visio 2010 to assist in the creation and revision of process flow diagrams. These include:
Microsoft Visio 2013 has added two more notable features:
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.
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 2013 can be used in isolation for business process management to a certain depth.
If we look at theVisio BPM Maturity Model that Microsoft has previously presented to its partners, then we can see that Visio 2013 has filled some of the gaps that were still there after Visio 2010. However, we can also see that there are plenty of opportunities for partners to provide solutions on top of the Visio platform. The maturity model shows how Visio initially provided the means to capture paper-drawn business processes into electronic format, and included the ability to encapsulate data into each shape and infer the relationship and order between elements through connectors. Visio 2007 Professional added the ability to easily link shapes, which represent processes, tasks, decisions, gateways, and so on with a data source. Along with that, data graphics were provided to enable shape data to be displayed simply as icons, data bars, text, or to be colored by value. This enriched the user experience and provided quicker visual representation of data, thus increasing the comprehension of the data in the diagrams. Generic templates for specific types of business modeling were provided.
Visio had a built-in report writer for many versions, which provided the ability to export to Excel or XML, but Visio 2010 Premium introduced the concept of validation and structured diagrams, which meant that the information could be verified before exporting. Some templates for specific types of business modeling were provided.
Visio 2010 Premium also saw the introduction of Visio Services on SharePoint that provided the automatic (without involving the Visio client) refreshing of data graphics that were linked to specific types of data sources.
Throughout this book we will be going into detail about Level 5 (Validation) in Visio 2013, because it is important to understand the core capabilities provided in Visio 2013. We will then be able to take the opportunity to provide custom Business Rule Modeling and Visualization.
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:
The following diagram demonstrates the use of Containers and Callouts in the construction of a basic flowchart, that has been validated using the Validation API, which in turn uses the Connectivity API.
There are three process flow diagram templates: Basic Flowchart, Cross-Functional Flowchart, and Six Sigma, in Visio 2013 Professional edition that have been enhanced since the previous versions of Visio and include validation rules.
There is now very little difference between theBasic Flowchart template and theCross-Functional Flowcharttemplate in the Flowchart category. In fact, they are identical apart from the latter opening with a couple of Swimlaneshapes 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 FLOWCHARTtab will appear, as in the following screenshot:
In addition, parts of the new Six Sigma template, in the Business category, use the same flowchart rules.
There are two process flow diagram templates, in addition to the Six Sigma Diagram template, in the Flowchart category of Visio 2013 Professional 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 2013 Workflow, enables visual development of SharePoint workflows that integrates closely with SharePoint 2013.
The Object Management Group/Business Process Management Initiative (http://bpmn.org/) promotes the BPMN standards. The BMPN version in Microsoft Visio 2013 is 2.0, an upgrade from Version 1.1 in Visio 2010. Although this officially added diagram types to the standard, it did not add more BPMN templates in Visio 2013. Instead, Microsoft actually simplified the number of stencils and shapes for BPMN in Visio 2013, while increasing their capability. 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 contained five docked stencils, each of them containing a logical set of shapes, but for Visio 2013 these have been reduced to just one, BPMN Basic Shapes, as seen on the left of the following screenshot. The other stencils are still there, but hidden by default.
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 preceding screenshot, a Task shape is selected, revealing that there are many permutations that can be set.
The following screenshot shows all of the BPMN master shapes in the BPMN Basic Shapes stencil:
In reality, any of these Task shapes can be changed into a Collapsed SubProcess shape, and each of the Event shapes into any of the other Event shapes, by amending the Shape Data. Thus, the original name of the Master shape is really immaterial, since it is the Shape Data that determine how it should be understood.
Microsoft Visio 2013 also includes a template and shapes for designing workflows that can be developed in tandem with Microsoft SharePoint Designer. With Visio 2010, you could pass the workflow back and forth between the two with no loss of data or functionality, by using a Visio Workflow Interchange(*.vwi) file, and the Importand Export buttons are still present on the PROCESS tab in the ribbon in Visio 2013, as seen in the following screenshot. However, Visio 2013 Professional and SharePoint Designer 2013 become complementary design surfaces that you can seamlessly switch between, if you have them both installed on your desktop.
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 ruleset being used is the one that your business requires. Visio will not provide instant feedback at the moment that you transgress a rule. However, it will check your diagram against a ruleset 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; however, but there is more that is available only to developers, thus enabling you to automate some tasks if necessary. The following example of a BPMN diagram has some errors in it they would be difficult to spot if it were not for the Issues window that lists them, because the diagram has been validated.
The PROCESS tab is split into three ribbon groups. 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 ruleset(s). You can have more than one ruleset in a document that can be enabled or disabled as required. The drop-down menu on the Check Diagram button (shown in the following screenshot) 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 used to either be saved as binary (normally with a *.vsd extension) or XML format (normally with a *.vdx extension); however, in Visio 2013 they are in a new XML format that follows the Open Packaging Convention.
Visio 2013 diagram files have either a *.vsdx extension, or a *.vsdm extension if they contain macros. The easiest way to look at the contents of a Visio 2013 file is to change the extension to *.zip, and then just double-click to open it. Inside the zip file, you will find a visio folder, and inside that is a validation.xml file if there are any rules within the document, as shown in the following screenshot:
Simply double-clicking on the xml file will open it in the associated program, which in my case is Internet Explorer.
If we expand a RuleSets branch, and one of the Rule sub-branches, then we can see how a rule is defined, as shown in the following screenshot:
Later, we will be going into these definitions in much greater detail but, for now, notice that the RuleFilter and 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, as shown in the following screenshot:
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 Issue element in the Visio document XML, we can see that Issue has IssueTarget and RuleInfo elements, as at the bottom of the following screenshot of the Validation XML.
We can then use the ShapeID and the PageID from the preceding Issue to find the actual shape in the relevant page XML, by reviewing the Shape elements under the Shapes collection of PageContents, also identified by its ID, as shown in the following screenshot:
In fact, the PageIDand ShapeID elements 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.
There is also a Visio Process Repository
