A.2 Examining the Adapter Definition Demo

The Northwind adapter definition comes preconfigured with all types of element and alarm definition. It utilizes the Northwind database to show how to expose database information.

In this example, when the Northwind adapter definition is deployed, it builds an adapter that has a hierarchy for both customers and product inventories.

Figure A-1 illustrates the customer hierarchy building out elements for invoices and groups by Shipment Type for each customer:

Figure A-1 Explorer Pane by Shipment Type

Figure A-2 illustrates the product inventory hierarchy building out elements for products and groups them by Product Type:

Figure A-2 Explorer Pane by Product Type

The remainder of this section provides a high-level overview of specific examples from the demo adapter definition that created these various types of elements (in the deployed adapter) and their associated alarms.

A.2.1 Looking at Basic Adapter Information

When an adapter definition is created, basic information and settings are defined for the adapter to use when deployed.

In Figure A-3, the run-time adapter leverages the Product Name, Vendor, Version, and Copyright Notice in the adapter properties:

Figure A-3 Definition Editor

To examine the adapter settings example:

  1. In the Definition Editor, select the root element in the Definition Navigator pane (in this instance, it is the northwind element).

  2. Click the following icons to see how the adapter icon, default properties, scripts, and databases are set:

    Adapter: Defines basic descriptive information for the adapter, including copyright information.

    Icon: Allows assigning an icon for the root adapter element in the run-time adapter.

    Properties: Defines defaults and permissions for alarm columns, hierarchy file, stylesheet file, and maximum number of alarms for the adapter.

    Scripts: Defines defaults and permissions for any scripts to be run with adapter activity.

    Database: Defines database information and permissions for the database connection used by the run-time adapter.

A.2.2 Looking at Element Groups

Element Group is a hard-coded folder (not dynamically created) that might hold children and alarms in the deployed adapter.

In Figure A-4, the run-time adapter uses the Group definition to create a single Operations Center element (or folder) named Customers:

Figure A-4 Definition Editor Group Definition Tab

In the Northwind demo, there are several examples of Element Groups, which include Customers, Invoices (by ID), and Product Inventory.

To examine an element group example:

  1. In the Definition Editor, click to open and browse the hierarchy in the Definition Navigator pane.

  2. Select the Customers folder.

    This is an element group definition.

  3. Click the Group and Icon icons to see how group elements (folders) are created and assigned icons in the demonstration definition.

    The Group pane defines basic information about the Element Group definition. In this case, the name specified for this element is used for this element in the deployed adapter.

    The Icon pane allows assigning an icon that is used for this parent element (folder) in the deployed adapter.

A.2.3 Looking at Database Elements

In Figure A-5, the run-time adapter uses the Database Element definition to create Operations Center elements for all unique customer names found in the Customers table:

Figure A-5 Definition Editor: Database elements are displayed in the Definition Navigator pane.

The Northwind demo has several examples of database elements, including CustomerList, CategoryList, and ProductList.

To examine a database elements example:

  1. In the Definition Editor, click to open and browse the hierarchy tree in the Definition Navigator pane.

  2. Select the CustomerList element.

    This is a database element definition. With the deployed adapter, it instructs the creation of an element under the Customers folder for each unique value found in the CustomerName column of the Customers table.

  3. Click the following icons to see how database elements are defined in the demonstration definition:

    Element: Defines basic information about the database element definition. In this case, the name and description are only used within the adapter definition and the Definition Editor.

    Icon: Assigns an icon for these elements in the deployed adapter.

    Query: Defines the query that pulls database information to create these elements. It is also used to define various properties for the elements.

    Schedule: Sets up a schedule for polling the database for new information with the query specified in the Query tab.

    Pages: Defines one or more property pages for the element using the properties available in the Query tab.

A.2.4 Looking at Generated Elements

A generated element is created in the adapter definition when you want to create parent elements directly from a table column in the database.

It is important, however, that the associated Property Name value exactly matches a property created from a query of a child DB Element or Alarm Definition.

In Figure A-6, the run-time adapter uses the generator definition to create a Operations Center element for all values found in the table column that identifies the shipping method used to send the order:

Figure A-6 Definition Editor: Operations Center elements can be generated from database table columns.

In the Northwind demo, two examples of generated elements are shipment_order_generator, and order_id_generator.

To examine an element group example:

  1. In the Definition Editor, click to open and browse the hierarchy in the Definition Navigator pane.

  2. Select the shipment_order_generator folder.

    This is a generator definition.

  3. Click the Generator and Icon icons to see how generators are created and icons are assigned in the demonstration definition.

    The Generator pane defines basic information about the generator definition. The Name and Description values are used only by the adapter definition and the Definition Editor. The Property Name value must directly match a property created from a query of a child Database Element or Alarm definition.

    The Icon pane is used to assign an icon to the elements created by the Generator Definition by the deployed adapter at run-time.

A.2.5 Looking at Alarm Definitions

Figure A-7 illustrates that alarm definitions can be created in the adapter definition when you want to have alarms generated for an element from database information:

Figure A-7 Definition Editor with Alarm Definitions

In the Northwind demo, one example of an alarm definition is order_alarm.

To examine a database elements example:

  1. In the Definition Editor, click to open and browse the hierarchy in the Definition Navigator pane.

  2. Select the order_alarm definition folder.

    This is an alarm definition. With the deployed adapter at run-time, it instructs the creation of alarms for the elements created by order_id_generator.

  3. Click the following icons to see how database elements are defined in the demonstration definition:

    Alarm: Defines basic information about the Alarm definition. In this case, the name and description are only used within the adapter definition and Definition Editor.

    Icon: Allows assigning an icon for these alarms in the deployed adapter.

    Query: Defines the query that pulls database information to create alarms for the corresponding element. It is also used to define various properties for the alarms.

    Schedule: Sets up a schedule that is used to poll the database for new information using the query specified in the Query tab.

    Pages: Defines one or more property pages for the alarm using those properties available from the Query tab.