Method rules are Control-O rules that are invoked to change the status of an object. To determine which Method rule to invoke, Control-O/COSMOS searches the Method database. Rows of the Method database contain information (methods) indicating which rule performs the change of an object from its current status to its desired status.
Note: Multiple Method databases can be specified. A Method database can be associated with more than one Object database. However, each Object database can be associated with only one Method database.
Each Method database must contain the following columns:
Table 17 Method Database Columns
Column |
Description |
---|---|
CURRENT |
Current status of the object. |
DESIRED |
Desired state of the object. |
OBJDB |
Name of the Object database in which the object is defined. |
METCLASS |
Name of an object or object class. |
METHOD |
Name of the Method rule to be triggered, and arguments (if any) to be passed to the Method rule. A Method rule must be triggered using an ON RULE statement. The name specified in the Method column must match the name in the ON RULE statement. |
The following screen segment contains sample content of a Method database (as displayed in the Variable Database Definition screen):
Figure 13 Method Database Screen Example
ROW CURRENT DESIRED OBJDB METCLASS METHOD
00001000 DOWN UP COSMET01
00002000 UP DOWN COSMET04
00003000 UNKNOWN COSMET03
00004000 DOWN UP COSVTMOB COSMET11
00005000 UP DOWN COSVTMOB COSMET12
00006000 UNKNOWN COSVTMOB COSMET13
Control-O/COSMOS compares the information in each row of the Method database with the attributes of the object whose status is to be changed.
Attributes of a method may match the object’s attributes exactly, or a partial match may occur. Furthermore, multiple methods can match object attributes to varying degrees. Therefore, an algorithm is used rate (assign a score to) each method. Based on this rating, the method that best matches the attributes of the object to be changed is invoked. For more information, see Generic Statuses, and Method Selection Logic.
Parent Topic |