| Prev | Next | Start of Chapter | End of Chapter | Contents | Index | (10 out of 14)

Saving Your Application

The most common way of saving an application is to save the top-level module to a file, or knowledge base. You typically save the KB to a file whose name reflects the top-level module. The lower-level modules exist as separate KBs. You never need to save NOL and its supporting modules.

To save the top-level module, you must save your application while G2 is paused. If you attempt to save the KB while G2 is running, G2 requires that you save the entire application in a single file, including all of the required NOL modules.

You can also save a snapshot of the entire KB in a single file.

Saving the top-level module and saving a snapshot automatically saves your configuration as well; all customizations to the colors, settings, and queues are automatically saved in the KB file.

Saving the Top-Level Module

You use the G2 save command to save the top-level module and your preferences.

To save the top-level module to a KB:

  1. Select Main Menu > Save KB.

    G2 refers to the new top-level module name as the module to save and provides a default KB name that is consistent with the top-level module name. To save the KB using a different name, simply replace the current name with a new name.

  2. Click End or press Return.

G2 reports progress while saving and displays a message in the Operator Logbook when the save is complete.


Note: In general, the KB associated with your application should reside in the same directory as all of the other KBs associated with your application product; however, this is not absolutely necessary.

Taking a Snapshot

Snapshots let you save the state of a running application. When you restore a snapshot, NOL resumes running the application from the point at which you created the snapshot; all the blocks and paths have the same attribute values they did when you saved the snapshot.

Snapshots are especially useful as a backup. You can configure NOL so that it snapshots your application automatically at regular intervals. If the system crashes, you can load the most recent snapshot and resume from that point.

The snapshot file contains your application, as well as all of the KB files necessary to run NOL. You can load the snapshot file into G2 directly.

For more information on snapshot files, see the G2 Reference Manual.

To save a running application to a snapshot file:

  1. Select the Controls > Snapshot... menu choice.

  2. Enter a file name in the dialog that appears, or use the default.

NOL saves the application, as of the moment you select OK in the Snapshot dialog. By default, NOL saves the snapshot to the file "nol-snapshot.kb" in the default NOL directory.

You can configure NOL to use a different default snapshot filename, as described in "Configuring How NOL Saves Snapshots". You can also configure NOL to save snapshot files automatically during running or from another window, as described in "Configuring How NOL Saves Snapshots".

If blocks are evaluating when you take the snapshot, they do not continue evaluating when you load the snapshot.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Index | (10 out of 14)

Copyright © 1996, Gensym Corporation, Inc.