Configuring an iWay Channel

In this section:

How to:

This section explains how to configure an iWay channel to capture a sample document from the data source.


Top of page

x
Configuring An iWay Channel

In iWay Service Manager, a channel serves as a container of specific iWay components, such as listeners, preparers, transforms, process flows, and emitters, through which a document containing messages or data pass. All channels must contain three sub-containers, an inlet (which is the entry point to the channel), a route (which defines the path through the channel), and an outlet (which defines how the document leaves the channel). You can create new iWay components or use existing components to configure a channel.

Using our example, we first need to extract the XML structure from our database and place the documents into a directory we can access for later use. To do this, we will create a simple channel with:

Note: All RDBMS listeners generate XML representations of table records. Once this channel is deployed, we can generate a sample XML file from which we can extract the XML structure needed in the indexing process flow.

Using the RDBMS adapter requires its corresponding JAR file to be added to the iWay environment (located in the \iWay\lib directory by default) and requires iWay to be restarted. For more information on installation requirements for the RDBMS adapter, see the iWay Installation Guide.

As a reminder, we will be designing the components of our channel and configuring the channel in the Registry (the design-time repository). We will then deploy the channel to a run-time iWay Service Manager and activate it to begin the indexing process.

The following is a summary of the steps involved in setting up the iWay channel. This section provides instructions for each of these steps.


Top of page

x
Procedure: How to Configure a Listener
  1. Start iWay Service Manager. From the Windows Start menu, select Programs, iWay 6.0 Service Manager, base.
  2. Open the iWay Service Manager Console. From the Windows Start menu, select Programs, iWay 6.0 Service Manager, console.

    The iWay Service Manager opens, as shown in the following image.

    Note: The directory that contains the database jar files must be included in the system classpath. Typically, this directory is install_drive:\Program Files\iway60\lib.

  3. In the top-left window, click Registry to enter the environment where you design iWay components.
  4. In the left pane, under Components, select Listeners.

    The Listeners dialog box opens on the right, as shown in the following image. From this dialog box you can see a list of previously configured listeners and create new listeners.

    Listeners dialog box

  5. To create a new listener, click Add.

    The Select Listener Type dialog box opens.

  6. From the Type of the new listener drop-down list, select the appropriate type of listener for the data source you want to monitor.

    In this example, the data source is a database, so the listener type is RDBMS, as shown in the following image.

    Drop down list box

    Tip: You can also use a Relational Database High Water Mark (RDBHWM) listener, which is useful when you have read-only permissions and you want to select records that exceed a high water mark, such as a last-update time of day value. For details on the RDBHWM listener, see the iWay Service Manager Extensions User's Guide.

  7. Click Next.

    The Configuration parameters dialog box opens. The following image shows part of the parameters dialog box for the RDBMS listener. Use the scroll bar to access all properties in the window.

    Parameters dialog-box

  8. Type and select the configuration properties appropriate for the listener. See the iWay Service Manager User's Guide for details on listener properties.

    The following are some recommended settings for Magnify:

    • Set Accepts non-XML (flat only) to false.
    • Set Optimize Favoring to performance.
    • Set Default Java Encoding to UTF-8.
    • Set Record Activity Log(s) to false.

    The Multi-threading and Polling Interval settings can be used to optimize the Magnify platform.

    Note: SQL Query is how to get new data in the table. SQL Postquery is responsible for updating the table after a record has been read by the listener. Controlling the post query operation as part of the process flow may be optimal. For example, for larger bulk processing where queries need to be limited by rows returned.

  9. Click Next.
  10. Type a name and description for the listener.

    To continue with the example established in the Magnify Search Feed Example, we will name the listener, Retail_DB.

  11. Click Finish.

    The Listeners pane is refreshed with the new listener, as shown in the following image.

    Listeners pane diagram

Now we will create the inlet that will hold the listener.


Top of page

x
Procedure: How to Create an Inlet
  1. In the left pane of iWay Service Manager, under Conduits, select Inlets.

    The Inlets pane opens on the right, listing the existing inlets.

  2. Click Add.

    The New Inlet Definition pane opens, as shown in the following image.

    Definition pane diagram

  3. Type a name and brief description of the inlet. For this example, we will use RetailDB.
  4. Click Finish.

    The Construct Inlet pane opens, as shown in the following image.

    Construct Inlet pane diagram

    Now we will add the listener that we created earlier.

  5. Click Add.

    The Select component type pane opens, as shown in the following image. This provides a selection of components that are allowed in an inlet.

    diagram

  6. Select Listener and click Next.

    The Select a listener definition pane opens, which lists available listeners to add to the inlet. The following image shows this pane with the listener, RetailDB, we created earlier.

    Listener definition pane diagram

  7. Select the listener you want in the inlet and click Finish.

    The Construct Inlet pane opens showing the selected listener as part of the inlet. The following image is an example of this pane showing our RetailDB listener.

    RetailDB Listener dialog box

Now create the emitter.


Top of page

x
Procedure: How to Create the Emitter
  1. From iWay Service Manager, under Components, select Emitters.

    The Emitters pane opens on the right with a list of existing emitters.

  2. Click Add.

    The Select emitter type pane opens.

  3. From the Type of new emitter drop down list, select the type of emitter you want to create. In this example, it is a File emitter, as shown in the following image.

    emitter drop-down list

  4. Click Next.

    The Emitters Configuration parameters pane opens, as shown in the following image.

    Emitters Configuration parameters pane diagram

  5. In the Destination field, type a path to the directory where you want the documents moving through the channel to be saved, and include the XML file name format for the output files.

    Note: The emitter creates a file for each row in the database when running and automatically numbers the files according to the format you provide in the Destination field. In the file name format, designate how many digits the number will contain with hash marks (#).

    The following is an example of an entry for the Destination field:

    C:/SearchData/Retail/######.xml

    This example designates six digits for the file name, therefore, the file names that are output will be 000001.xml. 000002.xml, 000003.xml, and so on. If you designate one digit (#.xml), the file names will be 1.xml, 2.xml, 3.xml, and so on. The automatic numbering always starts with 1.

  6. In the Create Directory field, select:

    true to create the directory you specified in the Destination field if it does not exist.

    false to not create the directory if it does not exist.

  7. Click Next.

    The Provide a name for the new emitter pane opens.

  8. Type a name and a brief description of the emitter.

    Our example names the emitter RetailDB_FileEmitter, as shown in the following image.

    emitter diagram

  9. Click Finish.

    The Emitters pane opens and displays the new emitter in the list of emitters.

Now create the outlet to contain the new emitter.


Top of page

x
Procedure: How to Create an Outlet
  1. From iWay Service Manager, under Conduits, select Outlets.

    The Outlets pane opens on the right with a list of existing outlets. An example of this pane is shown in the following image.

    Outlets pane diagram

  2. Click Add.

    The New Outlet Definition pane opens, as shown in the following image.

    Outlet definition diagram

  3. Type a name and brief description of the outlet. In this example, the outlet name is RetailDB_Outlet.
  4. Click Finish.

    The Outlets, Construct Outlets pane opens, as shown in the following image. This pane shows the components currently assigned to the outlet. Since this is a new outlet, none appear.

    Construct Outlet diagram

  5. To add the emitter to the outlet, click Add.

    The Select component type pane opens, as shown in the following image, with a selection of the allowable components for an outlet.

    Select component type diagram

  6. Select Emitter and click Next.

    The Select an emitter definition pane opens with a list of available emitters, including the emitter you previously created.

  7. Select the emitter you want assigned to this outlet and click Finish.

    The Outlets, Construct Outlets pane opens, showing that the emitter is now registered in the outlet. An example of this pane is shown in the following image.

    Construct outlets pane diagram

Now that we have all of the components for our channel, we can create the channel.


Top of page

x
Procedure: How to Create a Channel
  1. From iWay Service Manager, under Conduits, select Channels.

    The Channels pane opens on the right and lists the existing channels in your configuration.

    Channels diagram

  2. To create a new channel, click Add.

    The New Channel Definition pane opens, as shown in the following image.

    New Channel Definition diagram

  3. Type a name and brief description of the new channel. In our example, the channel name is RetailDB_Channel.
  4. Click Finish.

    The Channels, Construct Channel pane opens, as shown in the following image. This pane lists the components registered to the channel. Since this is a new channel, there are no registered components.

    Construct Channel pane diagram

  5. To add components, click Add.

    The Channel Component Types pane opens, as shown in the following image. This pane allows you to select an Inlet, Route, or Outlet component to add to the channel.

    Channel Component Types diagram

  6. Select Inlet, then click Next.
  7. Select an inlet definition pane opens. This pane lists the inlets available to the channel.
  8. Select the inlet you created for this channel and click Finish. In our example, the inlet is RetailDB.

    The Channels, Construct Channel pane opens showing the inlet you added to the channel. An example of this pane is shown in the following image.

    Construct Channel diagram

    Next, we need to add a route, which defines the path of the document through the channel.

    Note: Every channel must contain an inlet, route, and outlet. Though we did not create a custom route, there is a default route available in iWay.

  9. To add a route to the channel, click Add.

    The Channel Component Types pane opens.

  10. Select Route, then click Next.

    The Select one or more route definitions pane opens. This pane lists the routes available to the channel.

  11. Select the default route named move, and click Finish.

    Note: This route simply moves the document from the inlet to the outlet, without additional processing.

    The Channels, Construct Channel pane opens showing the inlet and the route you added to the channel. An example of this pane is shown in the following image.

    Construct Channel pane diagram

  12. To add the outlet to the channel, click Add.

    The Channel Component Types pane opens with the Route and Outlet options available.

  13. Select Outlet, then click Next.

    The select one or more outlet definitions pane opens. This pane lists the outlets available to the channel, as shown in the following image.

    Outlet definitions diagram

  14. Select the outlet you want to associate with this channel and click Finish.

    In this example, the outlet is RetailDB_Outlet.

    The Channels, Construct Channel pane opens showing the inlet, route, and the outlet just added to the channel. An example of this pane is shown in the following image.

    Construct Channel diagram

  15. In the route Conditions column, click the right-most document icon with the minus sign (-), as shown in the following image. This sets the default route. Since a channel can contain more than one route, you need to designate one as the default route (even if there is only one route in the channel).

    List Diagram

  16. To build the channel with its current components and settings, click Build.

    The Channels build results pane opens, as shown in the following image. This pane shows the status of the build steps and indicates the build was successful.

    Channel build result pane diagram

The channel has been successfully created and is ready to be deployed, which makes it available for use.


Top of page

x
Procedure: How to Deploy a Channel
  1. At the top of iWay Service Manager, click Deployments.
  2. In the left pane, under Management, click Channels.

    The Channel Management pane opens, as shown in the following image.

  3. Click Deploy.

    The Available Channels pane opens, as shown in the following image.

  4. Select the channel you want to deploy, then click Deploy.

    The Channel Management pane opens and lists the channel you just deployed. An example of this pane is shown in the following image.

  5. To activate or start the channel, click the red X under the Status column.

    A green check mark in the Status column indicates the channel, and therefore, the listener, is active. To stop the channel (listener), click the green check mark.

    A yellow caution sign in the Status column indicates there was an error in activating the channel. The Description column provides information about the error.


Top of page

x
Verifying the Emitter Destination Directory

Once the channel is deployed and started, verify that the destination directory you configured when creating the emitter exists and that it contains XML documents. These are the sequentially numbered files, for example, 00001.xml, 00002.xml, and so on.

If this directory does not exist or it is empty, check the parameters you entered while configuring the listener and the emitter. Use the following steps to update the channel:

  1. Undeploy the channel (within Deployments).
  2. Correct the listener or emitter (within Registry).
  3. Build the channel (within Deployments).
  4. Deploy the channel (within Deployments).

These files provide the structure of the data coming from our data source. This information is important and will be used in designing our indexing process flow.

Now that you have configured the search engine and a channel with a listener for the data source, continue to Creating the Indexing Process Flow to configure the process flow.


WebFOCUS