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

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.