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

Declaring Generic and Exception Configurations

After you enter configurations that apply very generally within your KB, you might find that you must configure a unique behavior for some subset of the KB's items or for particular items. These configurations represent exceptions to your KB's more generally applicable configurations.

For example, in the KB shown in the figures in Example of the Scope of Configurations, assume that:

Following G2's rules of precedence for configurations, among the configurations that apply to car-class-1, the item configuration stored in the SCHEMATIC workspace overrides the item configuration stored in the TOP-LEVEL workspace.

You can also store configurations with a smaller scope that supplement configurations with a larger scope. This allows you to declare a unique behavior for a subset of items, without affecting the configurations for all other items in your KB.

Combining Configurations

As described in Precedence of Configurations, given two configurations that each affect some feature of an item in two distinct ways, G2 applies only the configuration with the higher precedence to the item.

However, you can use G2's precedence rules for configurations in a more complex manner. Consider the user gesture of clicking the mouse on an item to display its menu. Do you prefer to show all menu choices configured for the menu or just those mentioned in the first menu configuration that G2 finds in its search up the class and workspace hierarchies? The same question arises for which attributes to show when displaying an item's table.

G2 allows fine control over these cases by using the phrases include, include additionally, and exclude absolutely.

Combining Cooperatively

You can use two configuration statements, configure the user interface as follows and restrict proprietary items as follows, to define configurations that G2 applies in a cooperative manner. These two kinds of statements configure the interactive behavior of an item.

You can also use these statements to configure a feature for a set of items without overriding the configurations on the same feature that are of a lower precedence.

To illustrate, suppose you create a KB that represents the foundation software layer for applications built by G2 developers, with these requirements:

G2 supports this kind of application development scenario by allowing you to declare configurations that cooperate with other configurations without being overridden.

Combining Additionally

A configure the user interface as follows or restrict proprietary items as follows statement can additionally include or exclude one or more user-interface features for the target item.

Including Additionally

This instance configuration statement causes the menus for conveyor-station items to present only two of the menu choices (delete and create-subworkspace) already defined for that class:

For a more specific class, you could enter the following instance configuration statement that additionally includes another menu choice (table):

The statement declares that, in addition to any menu choices included in configurations for conveyor-station items at more general levels in the KB's class or workspace hierarchies, the table menu choice is additionally available for items at this level and at more specific levels in those hierarchies.

Excluding Additionally

A configuration statement can additionally exclude a capability for a set of items. To do so, use the exclude additionally phrase in the clauses of a configure the user interface as follows statement or restrict proprietary items as follows statement.

For example, the following statement causes the menus of CONVEYOR-STATION items to present all but two of the menu choices already defined for that class:

For a more specific class, you could enter the following statement that removes other menu choices:

The statement declares that, in addition to any menu choices excluded in configurations for conveyor-station items that are declared at a more general level in the KB's class or workspace hierarchies, the table menu choice is also not available for items at this level and at more specific levels in those hierarchies.

Implementing Localized Exceptions

You can use configuration statements with additionally clauses to alternately include and exclude system-defined or custom features of items at progressively more specific positions in your KB's class and workspace hierarchies. These nested configurations represent localized exceptions to configurations declared higher in those hierarchies. To do this use:

Combining Absolutely

You might want to prevent other G2 developers from restoring a particular feature that you have excluded for some set of items. For this reason, you can declare a configuration statement that absolutely excludes a capability.

To do so, include the exclude absolutely phrase in a configuration statement, as follows:

Because absolutely configurations cannot be overridden or supplemented, the statement above restricts conveyor-station items so that, when a user interacts with this KB via a window whose associated g2-window contains the value end-user in its G2-user-mode attribute:

An absolutely configuration on a particular item feature does not combine cooperatively with other additionally configurations on the same feature. Instead, an absolutely configuration overrides all other configurations that include or exclude the same feature for the same item(s), regardless of where you place the absolutely configuration in the KB's class or workspace hierarchies. Further, you cannot supplement an absolutely configuration for a particular item feature and for a particular set of items by other additionally configurations on the same feature.


Note: You cannot specify a configuration statement that absolutely includes some item behavior.

An absolutely configuration is particularly valuable when securing a proprietary KB, since otherwise a user could restore access to the KB's proprietary knowledge.

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

Copyright © 1997 Gensym Corporation, Inc.