Identifying the Knowledge Not Stored in Attributes
Items of some classes can contain one or more values that are distinct from the items' attributes. For instance, a variable or parameter can contain a value, and can be defined to also contain history datapoint values. Also, lists and arrays can contain values and references to other items in their elements. See the appropriate chapter in this document for more information about the knowledge that these items can contain.
Identifying the Status Knowledge of Items
Items also contain several kinds of status knowledge:
disablefrom the item's menu.
A permanent item continues to exist in the current KB after the KB is reset or restarted. When you save the current KB to a file, only the KB's permanent items are stored in the KB file.
A transient item does not continue to exist in the current KB after the KB is reset or restarted. Likewise, a KB that has been loaded but not yet started contains no transient items. When you save the current KB to a file, the KB's transient items are not stored in the KB file.
After being created interactively, an item is permanent. For instance, any item that you create by selecting from the
KB Workspace > New Objectmenu is a permanent item.
When you create an item programmatically, using the
createaction, that item is transient.
for any transaction T
if the status of T is not message-sent
then in order
create a transaction-message TM and
conclude that the status of TM is unsent
and make TM permanent
g2-system-predicatesystem procedure to obtain any item's permanent/transient status:
You can only set the active/inactive status of activatable subworkspaces. You perform this action programmatically.
For more information about how G2 activates workspaces, see Activating and Deactivating Workspaces.
In addition, G2 cannot activate these items:
You can disable an item only interactively. Once disabled, an item is effectively deactivated, and its activation status is inactive. Changing the enabled/disabled status of an item propagates to the items below it in the KB workspace hierarchy. Enabling or disabling a workspace affects the items that reside upon it, causing them all to become deactivated. Enabling one or more items that reside upon a disabled workspace has no effect until the workspace status is active and enabled.
When you enable an item, G2 immediately activates the item, unless there is another item above it in the workspace hierarchy that is not activated. If the enabled item is an activatable subworkspace, it is activated only when it is the target of an
When you disable an item, G2 cannot activate it, even if the item meets all other criteria for activation.
When you save the current KB, G2 also saves the knowledge of which items are disabled. Thus, items will continue to be disabled after you next load that KB.
BADand reflects whether the item knowledge is valid for KB participation. G2 changes the participation status of an item appropriately as the knowledge an item contains is updated.
BADstatus of each item appears in its
Notesattribute. The next table summarizes the meaning of each setting:
All attributes have valid values, and a sufficient number of attributes have values to permit the item to participate in the KB's processing.
At least one attribute, whose setting is required for the item to participate in KB processing, requires a different value.
At least one attribute does not have a valid value.
For example, after you create a new class definition, G2 initializes the status of the item to
incomplete until you specify new values for the item's
Notes attribute of an item can also contain other useful information. For example, the status of an item may be
OK, but if the item resides upon a disabled workspace, it cannot participate in KB processing. Such a status is displayed in the item
Notes attribute with a message such as:
Notesattribute, you can reference this status in expressions. For instance, when debugging your KB, use the Inspect facility to construct a command like this:
Notesattribute does not contain the value
Notesattribute is a composite attribute, as described in Chapter 12, Attribute Access Facility. You can refer directly to the status information of active items that the
Notesattribute contains by referring to the
item-statusof an item, and to the actual notes of an item using the
an instance ofan object or
given bya variable or parameter.
G2 propagates knowledge from item to item along the lines of the superior and subordinate relationships, including: