|
Creating Custom States
• Warning: This option generates a warning message when the attribute or relationship violates the condition.
• Mandatory: This option generates an error message when the attribute or relationship violates the condition.
• Read-only: By default, attributes and relationships are editable, but you can make them read-only for your condition.
• Visible - irrelevant: This option is only available for custom attributes and relationships. You cannot set base APM attributes or relationships to visible - irrelevant.
• Invisible - irrelevant: This option is only available for custom attributes and relationships. You cannot set base APM attributes or relationships to visible - irrelevant.
• Not visible: This option hides the attribute or relationship under the specified condition.
•
•
•
•
•To Create a Validation Rule for an Attribute
2. Select the Customization Center view.
3. Click Lock for Customization. The APM icon in your Task bar now has a key on it:For this example, open the Asset custom class.Create the state group
5.
6. Click New. The State Group dialog appears.Enter conditions for the state group
7. Create the conditions for the states. To create a new condition, click New. The State Rule Condition dialog appears.
If you are basing the condition on an attribute in either the class being customized or a related class, select Attribute. For example, Classification is an attribute of the Asset class.However, if the condition is to be based on the content of a relationship, select the Relationship option. For example, Asset Type (along with other value lists) is a separate class that is related to the Asset class.
•
• Criterion is based on: Based on an attribute
• Relationship from Asset: blank
• Controlling attribute: Classification
9. Select the Type of value to test for:
• Fixed: Select this option to test the condition based on a specific value that you enter.
• Variable: Select this option to test a condition using a relative value. The value used in the filter is only determined at the time the filter is used by looking up the current value of the selected attribute or relationship. You can use any attribute or relationship that can be reached through a join path starting from the class that you are customizing. A specific value cannot be selected.
For example, when the attribute is a date and time, the list contains conditions such as Last week, Next week, In the last, and so on.
Select a Test value for the assertion. If are testing a fixed value, enter the specific value that you are testing for.
For example, when the attribute is a date and time, the list contains conditions such as Last week, Next week, In the last, and so on.
Select the attribute that contains the value to be tested. For example, if you are testing a value in the Asset class, you might select the Classification attribute. This setting does not apply to fixed filter value types.
• Type of value: Fixed
•
• Test value: Maintainable asset
•
12. Click OK to save the condition.
• ANDed within a group, ORed between groups: items within the same group are evaluated with ANDs; items in different groups are evaluated with ORs.
• ORed within a group, ANDed between groups: items within the same group are evaluated with ORs; items in different groups are evaluated with ANDs.Select the attributes, relationships, methods, and pages affected by the state group
15. Click Browse. The Browse Object Model dialog appears.Note: To select an item from a contained class, enter a join path in the Contained class box. A contained class is a class that is related to the current class by a “Contains” type of relationship. For example, the Asset class contains one Manufacturer’s Info.
16. On the Attributes tab, select one or more attributes. Then, select the appropriate state to assign to the attributes:
•
17. On the Relationships tab, select one or more relationships. Then, select the appropriate state to assign to the relationships:
•
18. On the Methods tab, select one or more methods. By default, selected methods are set to Disabled (grayed out); however, you can change this later if necessary.
19. On the Controls tab, click the Pages configuration and then select one or more pages. By default, selected pages are set to Not visible; however, you can change this later, if necessary.
20. Click OK. The selected items are added to the state group.
22. On the Summary tab, you can view a description of your conditions and the states for each of the items that you selected.Note: If do not see a description, click Generate Description.
23.Test your states