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:
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 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.
A structured diagram is a set of logical relationships between items, where these relationships provide visual organization or describe special interaction behaviors between them.
- 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.
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 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.
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:
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 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 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.
Simply double-clicking on the xml file will open it in the associated program, which in my case is Internet Explorer.
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.
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, which is a site template that is included with Microsoft SharePoint 2013. It provides a place to share and collaborate on process diagrams, and for reviewers to add comments. The repository has built-in file access control and version control — users can view the process diagram simultaneously and edit the diagram without corrupting the original.
Microsoft Visio has had, for several versions, a useful Save As Web feature that creates a mini-website, complete with widgets for pan and zoom, Shape Data, and shape reports. This has worked best using the Vector Markup Language (VML) in Microsoft Internet Explorer; or in Scalable Vector Graphics (SVG) using a web browser that supports it natively; or in older browsers that have the required plug-in. This is quite powerful, but it does require that the native Visio file is republished if any changes are made to the document. The new Open Packaging Convention XML in Visio 2013 is utilized by Visio Services in SharePoint 2013 to render the diagram in html directly, and has a JavaScript Object Model (JSOM) for developers. In addition, Microsoft has an ActiveX Visio Viewer control that can display native Visio files that are in the new OPC format or the older binary and XML formats.
The user can interact with the diagrams by clicking on shapes to view the Shape Data, navigating any embedded hyperlinks as well as pan/zoom and print capabilities. These are capabilities of the Save As Web and Visio Viewer options too. In addition, Visio 2013 introduced commenting on shapes and the ability to co-author. These features are extremely useful for collaboration.
Microsoft Visio 2007 introduced the ability to add a data recordset to a diagram and refresh that data so that the diagram could be kept up-to-date, but the Save As Web html pages and the Visio Viewer ActiveX controls are not able to automatically respond to any data changes. Therefore, the diagram can quickly become outdated, thus requiring you to refresh the diagram in Visio, and then to republish it.
Microsoft has merged the Professional and Premium editions from Visio 2010 into the Professional edition in Visio 2013. There is still a Standard edition, but there is a flavor of the Professional edition for 2013 that is available with certain Office365 subscriptions. The Office365 edition of Visio Professional can be used on up to 5 PCs as a Click-Once installation
You need to be aware of the relevant features that are in each of them. In the following matrix, a black dot denotes which features are in which edition:
- The Software and Database\UML Model Diagram solution from Visio 2010 has been removed and replaced with six UML templates, none of which have an add-on behind them to create a model in the way that it used to.
- The Software and Database\Database Model Diagram solution from Visio 2010 has been removed and replaced with three database modeling notation templates, none of which have an add-on behind them to create a model in the way that it used to.
- The Software and Database\Data Flow Model Diagram solution is one that was re-assessed for Visio 2010. We still have the template and stencil for this but the add-on has not made it through the Microsoft rationalization of Visio add-ons. Therefore, you can now construct DFD models badly without realizing it. We will attempt to remedy this omission in a later chapter by constructing a ruleset that can be used with DFD models.
- The Organization Chart solution within Visio is essentially a closed add-on that has been around for many years. It has been given a facelift in Visio 2013, but experience has shown that it can only be enhanced with great care (and skill). There is no Application Programming Interface (API) to develop with.
- The Pivot Diagram solution is useful but also lacks an API for developers, thus making customization difficult.