Microsoft Visio 2010 Premium Edition introduced an extension to the Visio Type Library called the Validation API. This provides the capability to validate a Visio diagram to ensure that its construction complies with industry-standard or company –wide rules.
Organizations are able to use this new feature to encapsulate business logic as validation rules, grouped within rule sets.
Microsoft Visio 2010 Premium edition contains rule sets for use with Basic and Cross-Functional Flowcharts, BPMN Diagrams and SharePoint Workflow Designer diagrams.
This article describes how you can create your own rule sets and rules.