vbug nov 2010 visio validation
TRANSCRIPT
David J Parker
MVP (Visio)
bVisual ltd
Need Premium for Validation!
Silverlight application to view built-in rules
• Click http://www.visiorules.com/rulesexplorer.html
Free Silverlight application
Create a drawing from one that contains
rule set(s)or
Import rule set(s) from an existing
document
Enable one or more of the rule sets
Select Process / Check Diagramor
Call document.Validate in code
Review issues
Define rules using quasi-ShapeSheetformulae
and/or
Respond to document.RuleSetValidatedevent
Useful for cyclic connections, for example
Use ValidationRule.AddIssue
The Validation Process
Loop through each Target TypeCheck that Filter Expression evaluates to True
Abort if False
Check that Test Expression evaluates to False
Abort if True
Add IssueTarget (document. Page or shape)
Rule
Save as VDXNew v14 namespace
View in XML reader, eg XML Notepad
Role()=n0=Element,1=Connector,2=Container,4=Callout
HasCategory(category)
OnLayer(layername)
Is1D()
StrSame(Left(MasterName(750),n),name)
AggCount(set) = n, >n, <n, etc
ConnectedShapes(direction)
GluedShapes(direction)
ContainerMembers()
ListMembers()
Callouts()
ParentContainers()
ShapesOnPage()
OnBoundaryOf()
TWO books on Visio
Microsoft Visio 2010 Business Process Diagramming and Validation
see https://www.packtpub.com/microsoft-visio-2010-business-process-diagramming/book
Sample Chapters
Chapter 2 : Understanding the Microsoft Visio Object Model see https://www.packtpub.com/sites/default/files/0141-chapter-2-understanding-the-microsoft-visio-
object%20.pdf
Chapter 3 : Understanding ShapeSheet™ in Microsoft Visio 2010
see http://www.packtpub.com/article/understanding-shapesheet-microsoft-visio-2010
For latest news, updates and rule sets, visit http://www.visiorules.com
Click http://www.visualizinginformation.com/
Adding validation to DFDs
There are a number of rules that are commonly followed
when creating DFDs: 1. All processes must have at least one data flow in, and one data flow
out
2. All processes should modify the incoming data, producing new
forms of outgoing data
3. Each data store must be involved with at least one data flow
4. Each external entity must be involved with at least one data flow
5. A data flow must be attached to at least one process
6. Data flows cannot go directly from one external entity to another
external entity; such flows need to go through at least one process.
There are also some conventions that could be
considered.: 1. Do not allow a single page of a data flow diagram to get too
complex—it should have no more than ten components. If it has
more than this, combine some components into a single, self-
contained unit and create a new DFD for that unit.
2. Each component should be labeled with a suitable description.
3. Each data flow should be labeled describing the data flowing through
it.
4. Each component and subcomponent should be numbered in a top-
down manner.
Introduction to Validation Rules in Visio Premium 2010 click http://msdn.microsoft.com/en-us/library/ff847470.aspx
Creating Custom Validation Rules for Visio Premium
click http://msdn.microsoft.com/en-us/library/ff797562.aspx
David J Parker click http://davidjpp.wordpress.com/
MSDN Articles
10 Days for Office 2010: 10 Visio 2010 Tips and Tricksclick
http://blogs.msdn.com/b/mvpawardprogram/archive/2010/05/13/10-
days-for-office-2010-10-visio-2010-tips-and-tricks.aspx
Blogs