Validation Classes

Validation classes allow different types of business rules to be enforced. Some validation classes can be used generically while other classes are used for specific purposes. Validations can be created from a set of existing validation classes. Many business rules on nodes can be enforced with a validation class that uses a query for its logic. This enables validations to leverage queries that have been created for analysis purposes to also manage data integrity. Rules for versions and hierarchies or special cases for nodes can be accomplished using other validation classes. A few of the validation classes are used for product testing purposes only and should not be used in a production environment.

Table 5. Validation Classes

Validation Class

Level

Description

Parameters

Automatic hierarchy fail

Hierarchy

Automatically fails at hierarchy level for testing purposes

none

Automatic node fail

Global Node

Automatically fails nodes at the version level for testing purposes

none

Automatic version fail

Version

Automatically fails at the version level for testing purposes

none

Date range check

Node

Verifies that the From Date is earlier than or equal to the To Date

From Date Property, To Date Property

Fails If Prop = TRUE in hierarchy

Node

Verifies that the specified boolean property has no True values in the specified hierarchy

Property, Hierarchy

Finds branches where property is not set

Node

Verifies that the specified property is set at least once on a specified branch

Property

Global property query validation

Global Node

Verifies using predefined query and expected result

Property query name, Failure value

Hierarchy contains a reference of a node when bool property is true

Node

Hierarchy contains a reference to the node when a Boolean property is True, or if the node is a leaf node and a third Boolean property is True.

Hierarchy name, Boolean property for all nodes, Boolean property for leaf nodes

Hierarchy contains all where Prop = TRUE

Global Node

Verifies that the specified hierarchy contains all nodes where the specified property is True

Hierarchy, Property

Hierarchy contains all where Prop = value

Global Node

Verifies that the specified hierarchy contains all nodes for which the specified property has the specified value

Hierarchy, Property, Value

Invalid name length

Node

Verifies that the node name is not equal to a specified length.

Length

Limbs without any children

Node

Verifies that all limb nodes have children

none

Local property query validation

Node

Verifies using predefined query and expected result

Only a local property query can be used.

Property query name, Failure value

Maximum # of nodes in a hierarchy

Hierarchy

Verifies that the number of nodes in the hierarchy does not exceed specified limit

Maximum number of nodes

Maximum # of nodes in a version

Version

Verifies that the number of nodes in the version does not exceed specified limit

Maximum number of nodes

Maximum child nodes

Version

Verifies that the number of children per node do not exceed specified limit

Maximum number of children

Merge node equivalency validation

Merge

Verifies that the affected node and merge node have the same value for the specified property

Global node property

Merge node property overridden validation

Merge

Verifies that if the affected node property value is set (overridden), the merge node property value is set for the specified property (Property values need not be the same)

Property

No default values allowed

Node

Verifies that no default values are used for the specified property

Property

No TRUE value on a branch

Node

Verifies that the specified boolean property is set to True at least once on a specified branch

Property

Node fail random

Node

Automatically fails the specified percentage of nodes for testing purposes

Failure percentage

Property equals value

Node

Fails for all nodes for which the specified property equals the specified value

Property, Value

Property equivalency when a third boolean prop is true

Node

Property equivalency when a third boolean property is True.

Boolean property to evaluate, First Property, Second Property

Property length check

Node

Verifies that the specified property is at least minimum length and no more than maximum length

Property, Minimum Length, Maximum Length

Property set only once per branch

Node

Verifies that the specified property is set only once per branch

Property

Remove property validation

Remove

Prevents the removal of a node if the property or properties specified (in the prop1, prop2 and prop3 parameters) are equal to the specified values (in the value1, value2, value3 parameters).

Property1, Property2, Property3, Value1, Value2, Value3

Required fields

Node

Verifies that, for all nodes for which the specified property has a specified value, each property in the required list has a value:

  • If the Reject Default Records flag is True, each property in required list must have a value other than the default

  • If the Reject Default Records flag is False, then default values are acceptable

Property, Value, Reject Default Records, Required Properties

Single TRUE value on a branch

Node

Verifies that the specified boolean property is set to True only once per branch

Property

Unique 2 properties within a version

Global Node

Verifies that specified properties have no duplicate values within a version (If the Include Defaults flag is False, nodes with the default value are not included)

First property, Second property, Include Defaults

Unique property value within a branch

Node

Verifies that the specified property has unique value within a branch

Property

Unique property value within a hierarchy

Node

Verifies that the specified property has no duplicate values within a hierarchy (If the Include Defaults flag is False, nodes with the default value are not included)

Property, Include Defaults

Unique property value within a version

Global Node

Verifies that the specified property has no duplicate values within a version (If the Include Defaults flag is False, nodes with the default value are not included)

Property, Include Defaults