Technical documentation - Validation of information

Validation function provides a toolset for validation of the database, publish process or individual presentations. A set of validation rules may be applied and result will be presented as reports.

Version 4.4. This function is available in version 4.4 and later.

Overview

The validation engine is used for defining validation settings for different validation rules that may be applied on all presentations. The validation may be applied to the entire database, to a repository, to individual items in a repository and at the beginning of publish. Validation may result in warnings or errors, where warnings will provide information to the user and errors will be stopping.

The validation engine is based on the following concepts.

Validation rule is the set of rules which are applied during validation, e.g. that parts must have a name.

Validation settings are the settings that may be applied to a validation rule to make it behave in a specific way.

Scope is a validation setting defining where the validation rule may be applied, e.g. at publish.

Target is a validation setting defining on what information the validation rule may be applied, e.g. at parts.

Validation rules

Each validation rule has the following validation settings:

Sequence number which determines the order validation rules are executed.

Enabled which allows to turn a validation rule on or off.

Mandatory which tells if a validation rule has to be executed successfully or not at publish. If mandatory the rule must validate ok before publish start. Setting added in version 5.3.0.

RequireSuccess Make validator vital, act on publications but errors can be accepted by publication checkbox. Setting added in version 5.3.0.

WarningOnFailure which tells if validation rule will be for information (warning) or stopping (error).

Options which are the options available for the validation rule, key value pairs

Scopes which define the scopes for the validation rule

Targets which define the targets for the validation rule.

Available validation rules

The following validation rules exist.

The rules marked as mandatory will be executed at publish regardless of configuration and will block publish process if failing.

Validation rule name

Description

Options

Mandatory

Validation rule name

Description

Options

Mandatory

BackingPartRelation

Used to validate that backing part relation between presentation and backing part is correct. If a few errors are found, a manual edit to remove and restore backing part relation will correct it. When many items are found perhaps support is needed to correct data in the database in other manners.

The Mandatory setting makes the validation turned on for publication at all times.

none

Yes

CatalogueConfiguration

  1. NoRootDescriptor

  2. NoRootOption

  3. InvalidRootNodeName

  4. BadRootNodePIFromCataloguePI

  5. InvalidRootNodeImage

  6. NoDescriptor

  7. BadNodePIFromCataloguePI

  8. InvalidNodeImage

Validation will check catalogue root nodes according to the catalogue.config file.

  1. Root node without descriptor item. This could typically be caused by Id on root node not being correct.

  2. Descriptor item without configuration options: “target-node-id”

  3. Root node without or with invalid name: “target-node-id”

  4. Invalid node PI compared to catalogue PI: “target-node-id”. This is typically caused by the persistent identity of the catalogue not matching Id on root node.

  5. Node image is not properly defined for node: “target-node-id”

  6. Presentation reference without configuration descriptor

  7. Invalid node PI compared to catalogue PI

  8. Node image is not properly defined for node: “target-node-id”

SuppressModel

 

CatalogueInheritedSpecification

Check for items without specifications inherited from containing catalogue.

Note: This validation rule is added in version 4.5.2.

SpecTypeCode

PartSkipItemStatus

PresentationSkipItemStatus

 

CatalogWithoutDocumentation

Used to validate that a catalogue has documents attached at a defined location.

SkipItemStatus

DocumentNodePIRegEx

 

CatalogWithoutSpareParts

Used to validate that a catalogue has part assemblies attached at a defined location. The catalogue is searched for nodes matching the regular expression. Such nodes may not lack presentations, or have presentations with an insufficient item status.

SkipItemStatus

DocumentNodePIRegEx

PartModuleItemStatusCode

PartItemStatusCode

PartModuleTypeCode

 

ContentSetFileValidation

Check for files which does not have file extension ending, eg missing .pdf in the file name. This validator can be configured for Documents, Images and ContentSets.
Note: This validation rule is added in version 5.2.

 

 

DocumentFileValidation

  1. MissingDocumentTranslations

  2. EmptyDocument

  3. EmptyFileName

  4. RedundantFolder

  5. MissingFile

  6. ZeroSizeFile

Check for strange Document disk file names and non-existing files Note: This validation rule is added in version 4.5.

  1. Some documents are missing some translations, i.e. some files are yet to be uploaded

  2. An empty document has no files on any of the document languages

  3. Document has document files with an empty name

  4. Folder name selected to same as language name, this is not wrong but is redundant information

  5. The document file is missing, a file name is declared but there is no such file in the documents/language folder

  6. The document file is found, but the file is of zero length

none

 

DocumentDiskSizeValidation

Check for large documents. Warning option sets file size in MB for warning, Error option sets file size in MB for error. Default is 10 and 40 MB.

Note: This validation rule is added in version 5.3.0

Warning

Error

 

DocumentUrlValidation

Check for strange Document Url names, when a document file is found by an Url to an external server

Note: This validation rule is added in version 4.5.

none

 

DuplicatePartNumber

Check for duplicate part numbers.

Note: This validation rule is added in version 5.1.8.

none

 

EmptyReplacement

Used to validate that replacements are not empty, a part is not replaced by null. Correct any errors by removing or completing the replacement.

Recommended to have this turned on for publication.

none

Yes

ImageFileValidation

Check for large images. Warning option sets file size in MB for warning, Error option sets file size in MB for error. Default is 1 and 2 MB.

Recommended to have this turned on for publication.

Warning

Error

 

ImageFileValidation

  1. ImageExistValidation

  2. ImageEmptyValidation

  3. ImageNameValidation

Used to validate that images have an image size, height or width may not be null or zero. It is recommended to have this turned on for publication.

  1. The image file is not found in the Images folder

  2. The image file is found in the Images folder, but file size is zero

  3. Image on disk has file name or folder name that is larger than .Net limits

none

 

ImageDiskSizeValidation

Check for large documents.

Warning option sets file size in MB for warning, Error option sets file size in MB for error.

Note: This validation rule is added in version 5.3.0

 

 

LargeChainReplacement

Used to validate if a replacement has more than X replacement parts, where X is defined in the settings dialogue (see ).

Note: This validation rule is added in version 5.1.6

MaxChain

DenyOptionalReplacements

 

LoopingReplacement

Used to validate if replacements are looping, e.g. A replaced by B which is replaced by A. Correct any error by breaking replacement chain loop. Then run validation again to conform that all loops are indeed removed.

Note: This validation rule is added in version 4.5.

none

Yes

PresentationItem

Check for mismatch in relations Presentations - Parts, Part modules, Documents etc. Validate that the database is consistent by comparing related database tables for inconsistencies. This is a technical check and failure can not be solved by the editor, but need support.

none

 

PresentationName

Used to validate that presentations have a name. The name of a presentation is normally a vital piece of data, but sometimes when IncludeInheritNodeInfo attribute is set, a presentation name is still displayed from a related node name. For a few validation errors, use the Manager to manually set a proper name. When many presentations are missing the name, import functions may be used to copy names from other systems, i.e. during a project start.

SkipItemStatus

IncludeInheritNodeInfo

Skip

SuppressNotInUse

 

PresentationSpecification

Used to validate that presentations hare mandatory specifications according to definition of mandatory specifications. See Defining enumerables, mandatory specifications and specification columns in Manager.

SkipItemStatus

Skip

 

PartModuleIllustration

Used to validate that part assemblies have an illustration. Review all reported items and provide an illustration, in the Manager.

SkipItemStatus

SkipKits

 

PartModuleHotspot

  1. RowsWithoutHotspot

  2. HotspotsWithoutRow

  3. RowsWitoutAnyHotspot

  4. HotspotsWithoutAnyRows

Used to validate that part assemblies have hotspots that matches part list, the hotspot id and the row position shall match. Four different scenarios are identified.

  1. Part module have a list of parts, where some rows with a position lack corresponding hot spot

  2. Part module illustration have hot spots, without corresponding part row

  3. Part module have a list of parts, but the illustration have no hot spots at all

  4. Part module illustration have hot spots, but the part module has no rows at all

SkipItemStatus

SkipKits

 

PartModuleMissingHotspot

Check for part assemblies with illustrations, where rows have no corresponding hot spot. Provide a match row/hot spot with the Manager.

SkipKits

 

PartModuleWithoutHotspot

Look for part assemblies which has an illustration but no hotspots at all. Provide a match row/hot spot with the Manager.

SkipKits

 

RequiredSpecification

Check for items without specifications. Suppress items with a ItemStatus, include only some specification types by Code, include items of specified presentation type/base type.

SpecTypeCode

SkipItemStatus

PresentationType

 

SpecificationReplacement

Check for parts with specification of type with PersistentIdentity according to the SpecPIValue, and at the same time contains replacements.

SpecPiValue

SkipItemStatus

 

SpecificationValue

Check specification values by comparing the specification type with the string, numerical or text value of the specification. For a text type, the text value may not be undefined. For a data value the string value may not be null. Errors may be corrected manually in the specification repository.

 

 

MandatoryLanguage

Check for texts without sufficient translations, a list of Mandatorylanguage codes may be considered - or all language codes.

MandatoryLanguage

 

MissingTranslations

Texts without any translation is reported. Use Manager to check if a text is not in use, delete such texts. else provide translations on all languages, or one language independent text.

 

 

UnusedSpecificationType

Check for unused specification types, where no specification is found of the type

none

 

UnnamedSpecificationType

The database contains unnamed specification types, provide a name in the Manager.

 

 

RegionSpecification

Check for parts with region different from that of containing catalogue.

Note: This validation rule is not active.

RegionTypeCode

PartItemStatusCode

SkipItemStatus

 

ReferenceTable

Check for mismatch in relations tables. First instance is the PresentationImages relation table where a missing constraint may accept that the Image_Id is zero.

none

 

Options

Option key

Option value

Description

Sample

Option key

Option value

Description

Sample

DocumentNodePIRegEx

regex

A regex to identify a node where information is to be found. The regex will be matched on the persistent id of the node.

%_Documents

SparePartNodePIRegEx

regex

A regex to identify a node where information is to be found. The regex will be matched on the persistent id of the node.

%_SpareParts

empty

empty-value

Placeholder, to create elements in the configuration file as support for the user. It is never active.



MandatoryLanguage

comma separated list of language codes

A list of languages that must exist in translation for the translation to be validated ok. Separate values by comma, space, semi colon.

en-GB,sv-SE

Skip

SampleInfoBaseType

Application information base type not to consider when validating data.

Part, Document, ContentSet

SkipKits

true / false

If option is true, validation will not be executed on part assemblies which has kit = true.



SkipItemStatus

text

If option is true, presentation will not be validated if it has item status = text.



SuppressNotInUse

true / false

If true, item will not be checked provided that there are no references to the item.

This option is added in version 5.1.

 

IncludeInheritNodeInfo

true / false

If true, the attributes inherited from node will be included in the validation.



SuppressModel

comma separated list of identities

Skip catalogues with the listed identities.



SpecTypeCode

code

Defines the code of a specification type that will be validated

Region, Code1, Code2

PartSkipItemStatus

ItemStatus

Parts with ItemStatus will be skipped. Separated by comma.



PresentationSkipItemStatus

ItemStatus

Presentations (catalogues) with ItemStatus will be skipped. Separated by comma.



SpecPiValue

code

Supply of specification type persistent identity to use in the validator db search



PresentationType

comma separated list of code

Defines presentation types or base types

Part, Kit

PartModuleItemStatusCode

comma separated list of code

Skip part modules with ItemStatus according to the Code value.

Publish,PublishAll

PartItemStatusCode

comma separated list of code

Skip parts with ItemStatus according to the Code value.

PublishPart,PublishpartAll

PartModuleTypeCode

comma separated list of code

Skip part modules with presentation types with a code in the value list.

Kit

DocumentItemStatusCode

comma separated list of code

Skip documents with ItemStatus according to the Code value.

Publish,PublishAll

RegionTypeCode

code

Region is located by specification type code

Region

MaxChain

integer

Max number of allowed replacement parts, 0 meaning no limit

10

DenyOptionalReplacements

true / false

Check for optional replacements and deny

 

Scopes and Targets

The following scopes are valid:

Scope

Description

Scope

Description

Database

Validation rules with scope database will be applied when selecting the validate menu command. 

Repository

Validation rules with scope repository will be applied when selecting one or several rows in a repository.

Publication

Validation rules with scope publication be applied during the publication process.

Column

Validation results will be shown as a column in storage.

Note! This option is available in version 5.0 and later. It gives a performance penalty when opening storage if validation column is shown. If column not shown, there is no penalty.

The following targets are valid:

Target

Description

Target

Description

Part

Validation rules with target Part will be applied to base type Part.

Catalogue

Validation rules with target Catalogue will be applied to base type Catalogue .

PartModule

Validation rules with target Part assembly will be applied to base type Part assembly.

Illustration

Validation rules with target Illustration will be applied to base type Illustration.

ContentSet

Validation rules with target Content set will be applied to base type Content set.

Image 

Validation rules with target Image will be applied to images.

Using validation function

Validating entire database

Validation function is used to validate the database either separately or at publish. A set of validation rules may be applied and result will be presented as reports. 

 

Validation reports may be used to navigate from the report to a workset containing the items where validation failed.

At publish

When used at publish, only successful validation will allow the publish process to proceed. From version 5.0 it is possible to turn off validation in the publish storage. If validation is turned off on a publication, publish will complete despite validation errors. A few checks on database consistency are still run and cannot be turned off (see table above).

Validation is made twice. When starting a publication, mandatory validation is run on the editor database. When all data is copied a complete a complete validation is made on the target database.

For version 5.3 and later, publication attributes are not the same. Vital (but not mandatory) validator errors can be accepted. A vital validator is configured with the element RequireSuccess=true, but Mandatory=false.

 

Validation repository

Validate selected rows in the repository by right-clicking and selecting validate in the menu in the repository. Validation task where configuration contains a scope Repository will be applied in this case.

When making status change to one or several presentations

It is possible to mark itemstatuses to require validation. When changing item status to a status where validation must be successful will disable the possibility to add that item status to the item if validation fails.

Configuration

Configuration of validation is controlled by the file located in C:\ProgramData\Signifikant\Assert\validation.config.

The configuration contains general settings and a set of rules, each for a separate validation task.

A rule may be turned on or off individually for each task.

File: validation.config

<?xml version="1.0" encoding="utf-16"?> <ValidationConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <!-- Validation enabled --> <Enabled>true</Enabled> <!-- If validation error occur an exceptioin will be thrown and publishing process stopped --> <ThrowOnError>true</ThrowOnError> <!-- If validation warning occur an exceptioin will be thrown and publishing process stopped --> <ThrowOnWarning>false</ThrowOnWarning> <ValidationSettingList> <ValidationSetting Name="CatalogWithoutSpareParts"> <!-- Order which rules are applied --> <SequenceNumber>1</SequenceNumber> <!-- Rule enabled --> <Enabled>true</Enabled> <Mandatory>true</Mandatory> <!-- Shall warning XXXX --> <WarningOnFailure>false</WarningOnFailure> <!-- From version 5.0: Name of column under show dropdown in storage --> <Column>No documents</Column> <Options> <!-- Options for the specific rule --> <KeyItemValuePair> <Key>sample</Key> <Item>sample-item</Item> </KeyItemValuePair> </Options> <Scoopes> <ValidatorScope>Database</ValidatorScope> <ValidatorScope>Repository</ValidatorScope> <!-- From version 5.0 --> <ValidatorScope>Column</ValidatorScope> </Scoopes> <Targets> <string>Part</string> <string>Part assembly</string> <string>Catalogue</string> <string>Document</string> <string>Illustration</string> <string>ContentSet</string> </Targets> </ValidationSetting> </ValidationConfiguration>

File: itemstatus.config

<?xml version="1.0" encoding="utf-16"?> <ItemStatusValueDescriptorList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Items> <ItemStatusValueDescriptor> <Value>New</Value> <Code>NEW</Code> <Name>New - Will not be published</Name> </ItemStatusValueDescriptor> <ItemStatusValueDescriptor> <Value>Publish</Value> <Code>PUBLISH</Code> <!-- Only allow to add this itemstatus of validation succeeds. --> <ValidateSuccess>true</ValidateSuccess> <Name>Pulish to web</Name> </ItemStatusValueDescriptor> <ItemStatusValueDescriptor> <Value>DoNotPublish</Value> <Code>DONOTPUBLISH</Code> <Name>Item or product is not to be published</Name> </ItemStatusValueDescriptor> </Items> </ItemStatusValueDescriptorList>

More rules in relation to options

Validation rule

Usage

Options

Description of option

Validation rule

Usage

Options

Description of option

PresentationName

Will check that presentation has a name.

<Key>IncludeInheritNodeInfo</Key> <Item>true</Item>

Accept that presentation miss a name, where it is fetched from the referring node.





Skip this check on the named presentation types.

Translation

Will check translations for all texts which are in use. A texts must have translations for all languages in the mandatory list.

Consider validation successful if translation exist for the named languages. Languages must correspond to data languages defined in Manager.

PresentationSpecification

Compare specifications defined in specification-columns.config with the ones assigned to presentations. Log all presentation where not all mandatory specification types are represented. I.e. there are missing specifications on some presentations.

Also see Defining enumerables, mandatory specifications and specification columns in Manager.

Skip this check on the named presentation types.

PartModuleIllustration

Will check that part assemblies have one or more illustrations.

Skip this check on part assemblies which are marked as kit.

PresentationItem

This is a consistency check for the database. Lookup any Presentation item where corresponding Part, Illustration, Document etc. item is missing.





BackingPartRelation

Will check that each backing part has a corresponding presentation.

This validation rule will always be run at publish if the Mandatory attribute is defined in settings.





PartModuleHotspot

Will check that part assemblies with illustrations have hotspots.

Skip this check on part assemblies which are marked as kit.

Sample validation configuration