Example of Validating Component Types Using Rules

You can define validation rules that automatically check whether the components associated with the structure are valid. You can specify the list of valid user item types for components in the rule.

Scenario

The following table summarizes an example of an item rule set and item rule that:

  • Tests whether the structure associated with the item is of type Primary.

  • Validates that only components of item types type1 and type2 can be added to a structure of type Primary.

Rule Set Field

Value

Business Entity

Item

Rule Set Name

Validate Component Types

Rule Set Type

Validation

Association Type

Item Class

Association Name

Root Item Class

Rule Field

Value

Name

Validate Component Types for Primary Structure

Description

Ensures that only components of item type TYPE1 or TYPE2 can be added to a Primary structure.

Valid Component Rules check box

Check box must be selected.

Unlike other validation rules, rules that validate components don't have a Severity, because the item is being validated for only one aspect, and a degree of severity would be redundant.

IF Expression

[Structure].[Structure Attributes].[Structure Name] == "Primary"

Validation Condition

component_type("type1","type2")

User Message

Component type not supported for addition to this structure.