| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (17 out of 30)

invoke

This action invokes a category of rules for all objects, or for an object specified in the Categories attribute of the rule.

To enter an invoke action:

This action invokes all rules in the specified rule-category-name. You specify the category in the Categories attribute of a rule. When G2 invokes all rules from a certain category, it uses this attribute to determine what rules are in the category.

Using the optional for object statement narrows the search for applicable rules. You can specify a class of appropriate objects for a rule in its Focal-objects attribute. When an invoke action includes the for object statement, G2 invokes only those rules that include the corresponding Rules-category and Focal-objects values. Following is an example of two invoke actions:


The first example invokes all rules that specify safety in their Category attribute.

The second invokes all rules that specify safety in their Category attribute and have filling-tank-4 as a Focal-object, or its class or one of its superior classes as the value of Focal-classes.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (17 out of 30)

Copyright © 1997 Gensym Corporation, Inc.