(For more resources related to this topic, see here.)
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 article, 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.
Exploring the new process management features in Visio 2013
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 Flowchart and 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 subprocess can 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:
- Easy auto-connection of shapes
- Aligning and spacing of shapes
- Insertion and deletion of connected shapes
- Improved cross-functional flowcharts
- An infinite page option, so you need not go over the edge of the paper ever again
Microsoft Visio 2013 has added two more notable features:
- Commenting (a replacement for the old reviewer's comments)
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.
Reviewing 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.
Understanding the Visio BMP Maturity Model
If we look at the Visio 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.
Reviewing the foundations of structured diagramming
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, that has been validated using the Validation API, which in turn uses the Connectivity API.
Reviewing the enhanced process flow templates
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.
Looking at 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, as in the following screenshot:
In addition, parts of the new Six Sigma template, in the Business category, use the same flowchart rules.
Reviewing the new process flow templates
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.
Understanding a BPMN Diagram
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.
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.
Understanding a Microsoft SharePoint 2013 workflow
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 Import and 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 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 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.
Analyzing the structure of a Visio document
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 PageID and ShapeID elements of an IssueTarget are optional because an Issue may just be associated with a page, or even with the whole document.
In this article, we looked at an overview of the new capabilities and process diagram types in Visio 2013, especially with regard to structured and validated diagrams.
Microsoft Visio 2013 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.
Resources for Article:
- Customize your LinkedIn profile headline [Article]
- Data Profiling with IBM Information Analyzer [Article]
- Business Process Orchestration for SOA [Article]