Example of Defining Change Policies with Validation Rules
You can define validation rules that automatically enforce change policies by testing for prohibited changes and setting the severity of the validation.
Scenario
The following tables summarize an example of an item rule set and two item rules that enforce a pair of change policies on item structures.
Rule Set Field |
Value |
---|---|
Business Entity |
Item |
Rule Set Name |
Structure Validation Policy |
Rule Set Type |
Validation |
Association Type |
Item Class |
Association Name |
Root Item Class |
The first rule:
-
Tests whether the structure name for the item is
Manufacturing
. -
If the test for the structure name evaluates to true, performs the validation specified by the Validation Condition, which is the expression
false
. -
If the Validation Condition evaluates to false, then the validation fails, and the action for the Severity is performed, which is Needs Approval
-
Consequently, if a change is being attempted to the Manufacturing structure of the item, then the rule forces you to create a change order and get it approved.
Rule Field |
Value |
---|---|
Name |
Structure Policy Rule 1 |
Description |
Ensures that changes to the Manufacturing structure of the item require approval of a change order. |
Valid Component Rules check box |
Check box must be deselected. |
Severity |
Needs Approval |
IF Expression |
|
Validation Condition |
|
User Message |
Changes to this structure require the creation and approval of a change order. |
The second rule:
-
Tests whether the structure name for the item is
Engineering
and the Life Cycle Phase isDesign
. -
If the test for the structure name evaluates to true, performs the validation specified by the Validation Condition, which is the expression
false
. -
If the Validation Condition evaluates to false, then the validation fails, and the action for the Severity is performed, which is Reject
-
Consequently, if a change is being attempted to the Engineering structure of the item while the Life Cycle Phase is Design, then the rule rejects the change and prevents it from occurring.
Rule Field |
Value |
---|---|
Name |
Structure Policy Rule 2 |
Description |
Ensures that changes to the Engineering structure can't be made if the life cycle phase is Design. |
Valid Component Rules check box |
Check box must be deselected. |
Severity |
Reject |
IF Expression |
|
Validation Condition |
|
User Message |
Changes to this structure can't be made during the Design life cycle phase. |