Creating a Channel

How to:

In this iWay Enable application, a channel consisting of a File listener as the inlet, a route associated with the process flow created using iWay Designer, and a default outlet will be created using the iWay Service Manager Administration Console. The channel will pick up batched sales transactions from an incoming directory and process them to generate and gather business data.


Top of page

x
Procedure: How to Configure a File Listener

To configure a File listener using the iWay Service Manager Administration Console:

  1. From the Windows Start menu select All Programs, iWay 6.0.1 Service Manager, and then Console.

  2. Click Registry in the top pane.

  3. In the left pane, select Listeners.

    The Listeners pane opens, as shown in the following image.

    The table that is provided lists existing listeners and a short description for each.

  4. Click Add.

    The Listener Type pane opens.

  5. Select File from the Type drop-down list and click Next.

    The configuration parameters pane for the File listener opens.

  6. Provide the appropriate configuration properties, as defined in the following table.

    Parameter

    Value

    Input Path

    C:\Sales_Demo\sales_data\in

    Destination

    C:\Sales_Demo\sales_data\out

    Suffix In

    xml

  7. Click Next.

    The Name and Description pane opens.

  8. In the Name field, type sales.listener.
  9. In the Description field, type an optional description, for example, This File listener picks up batched sales transactions.
  10. Click Finish.

    The new File listener (sales.listener) is added to the list in the Listeners pane.

    You are now ready to define an inlet and associate it with the new File listener (sales.listener).



x
Procedure: How to Define an Inlet for Your Channel

To define an inlet for your channel:

  1. Click Registry in the top pane of the iWay Service Manager Administration Console.

  2. In the left pane, select Inlets.

    The Inlets pane opens, as shown in the following image.

    The table that is provided lists each inlet that is defined with a brief description.

  3. Click Add.

    The New Inlet Definition pane opens.

  4. In the Name field, type sales.inlet.
  5. In the Description field, type an optional description, for example, This inlet is associated with a File listener.
  6. Click Finish.

    The Construct Inlet pane opens.

    The table that is provided is used to list the components that are currently registered with the inlet.

  7. Click Add.

    The Select component type pane opens.

  8. Select Listener from the list of component types and click Next.

    The Select a listener definition pane opens, as shown in the following image.

  9. Select sales.listener from the list and click Finish.

    You are returned to the Construct Inlet pane, which now includes the File listener (sales.listener) you registered with your inlet (sales.inlet).

    If you return to the main Inlets pane, you will notice that the new inlet you just defined (sales.inlet) has been added to the list, as shown in the following image.

    You are now ready to define a route and associate it with the process flow (sales.process) that you created earlier and published to the iWay Registry using iWay Designer.


Top of page

x
Procedure: How to Define a Route for Your Channel

To define a route for your channel:

  1. Click Registry in the top pane of the iWay Service Manager Administration Console.

  2. In the left pane, select Routes.

    The Routes pane opens, as shown in the following image.

    The table that is provided lists each route that is defined with a brief description.

  3. Click Add.

    The New Route Definition pane opens.

  4. In the Name field, type sales.route.
  5. In the Description field, type an optional description, for example, This route is associated with a process flow.
  6. Click Finish.

    The Construct Route pane opens.

    The table that is provided is used to list the components that are currently registered with the route.

  7. Click Add.

    The Select component type pane opens.

  8. Select Process from the list of component types and click Next.

    The Select a process definition pane opens, as shown in the following image.

  9. Select sales.process from the list and click Finish.

    You are returned to the Construct Route pane, which now includes the process flow (sales.process) you registered with your route (sales.route).

    If you return to the main Routes pane, you will notice that the new route you just defined (sales.route) has been added to the list, as shown in the following image.

    You are now ready to construct your channel using the iWay components (inlet and route) that you have defined.


Top of page

x
Procedure: How to Construct Your Channel

After you have defined the inlet (sales.inlet) and route (sales.route) that will be used by the iWay Enable application, you can combine these components and construct a channel using the iWay Service Manager Administration Console. Every channel is required to have an inlet, a route, and an outlet. In this example, a predefined default outlet will be used and associated with the new channel.

  1. Click Registry in the top pane of the iWay Service Manager Administration Console.

  2. In the left pane, select Channels.

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

    The table that is provided lists each channel that is defined with a brief description.

  3. Click Add.

    The New Channel Definition pane opens.

  4. In the Name field, type sales.channel.
  5. In the Description field, type an optional description, for example, This channel contains an inlet (sales.inlet), route (sales.route), and outlet (default.outlet).
  6. Click Finish.

    The Construct Channel pane opens.

    The table that is provided is used to list the components that are currently registered with the channel.

  7. Click Add.

    The Select component type pane opens.

  8. Select Inlet from the list of component types and click Next.

    The select an inlet definition pane opens.

  9. Select sales.inlet from the list and click Finish.

    You are returned to the Construct Channel pane, which now includes the inlet (sales.inlet) you defined earlier.

    You are now ready to add a route to the channel.

  10. Click Add.

    The Select component type pane opens.

    Notice that only the Route and Outlet component types are listed, since you have already added an inlet to the channel.

  11. Select Route from the list of component types and click Next.

    The select one or more route definitions pane opens.

  12. Select sales.route from the list and click Finish.

    You are returned to the Construct Channel pane, which now includes the inlet (sales.inlet) and route (sales.route) you defined earlier.

  13. Click the set default icon in the Conditions column for sales.route to designate this route as the default.

    You are now ready to add an outlet to the channel.

  14. Click Add.

    The Select component type pane opens.

  15. Select Outlet from the list of component types and click Next.

    The select one or more outlet definitions pane opens.

  16. Select default.outlet from the list and click Finish.

    You are returned to the Construct Channel pane, which now includes the inlet (sales.inlet), route (sales.route), and outlet (default.outlet).

    If you return to the main channels pane, you will notice that the channel you just constructed (sales.channel) has been added to the list, as shown in the following image.

    After you have designed your channel, you are ready to build and deploy the channel into a run-time environment.


Top of page

x
Procedure: How to Build and Deploy Your Channel

To build and deploy your channel:

  1. Click Registry in the top pane of the iWay Service Manager Administration Console.

  2. In the left pane, select Channels.

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

  3. Select the check box next to sales.channel and click Build.

    The build result pane for sales.channel opens.

  4. Click Deployments in the top pane of the iWay Service Manager Administration Console.

    The Deployments pane opens, showing links to Channels, Services, Metrics, and Web Services, in the left pane. By default, Channels is selected and the Channel Management pane is displayed, as shown in the following image.

  5. Click Deploy.

    The Available Channels pane opens.

  6. Select sales.channel and click Deploy.

    You are returned to the Channel Management pane. Notice that sales.channel is now included in the list of deployed channels.

    Note: Once a channel is deployed, you must also start it. A deployed channel is not started automatically. Notice the red X in the Status column for sales.channel.

  7. Select the check box next to sales.channel, which is already deployed, and click Start.

    A green checkmark now displays in the Status column, indicating that sales.channel is started.

    You can now test your new channel (sales.channel) to ensure that it is running properly.


Top of page

x
Procedure: How to Test Your Channel

To test your channel:

  1. Create a new XML file using the following sample where five batched sales transactions are provided:
    <SALES>
      <TRANSACTION>
        <ProductID>1</ProductID>
        <Region>US</Region>
        <Quantity>5</Quantity>
        <SalePrice>50</SalePrice>
      </TRANSACTION>
      <TRANSACTION>
        <ProductID>2</ProductID>
        <Region>EU</Region>
        <Quantity>5</Quantity>
        <SalePrice>100</SalePrice>
      </TRANSACTION>
      <TRANSACTION>
        <ProductID>3</ProductID>
        <Region>US</Region>
        <Quantity>5</Quantity>
        <SalePrice>150</SalePrice>
      </TRANSACTION>
      <TRANSACTION>
        <ProductID>1</ProductID>
        <Region>EU</Region>
        <Quantity>5</Quantity>
        <SalePrice>175</SalePrice>
      </TRANSACTION>
      <TRANSACTION>
        <ProductID>2</ProductID>
        <Region>US</Region>
        <Quantity>5</Quantity>
        <SalePrice>200</SalePrice>
      </TRANSACTION>
    </SALES>
  2. Save this file as SalesTransactions.xml.
  3. On your file system, copy the SalesTransactions.xml file into the following input directory:
    C:\Sales_Demo\sales_data\in

    This is the same input directory that was configured earlier for the File listener (sales.listener), which is used to pick up batched sales transactions.

  4. Navigate to the output (destination) directory that was configured earlier for the File listener (sales.listener):
    C:\Sales_Demo\sales_data\out

    Notice that the SalesTransactions.xml response document is now available, as shown in the following image.

  5. Open the SalesTransactions.xml response document in an editor.

    The following example shows the contents of the SalesTransactions.xml response document that is returned.

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <emitstatus status="0">
      <parms>
        <parm name="return">status</parm>
        <parm name="crosssection">false</parm>
        <parm name="skipNodes">1</parm>
        <parm name="xpathExpr">XPATH(/SALES/TRANSACTION)</parm>
      </parms>
    <timestamp>2009-05-06T21:18:09.794Z</timestamp>
    <status>0</status>
    <iterator>5</iterator>
    <msg>success</msg>
    </emitstatus>

    Notice that the <msg> element tag indicates success and the <iterator> element tag has a value of 5. This value indicates that five iterations were performed. The process flow you configured earlier in iWay Designer (sales.process) uses an Iterator object (Loop Transactions) and a File object (Tap Data and Write to File) to split incoming batched sales transactions and write the individual sales transactions to a target directory.

  6. Navigate to the target directory that was configured earlier in iWay Designer for the File object (Tap Data and Write to File):
    C:\Sales_Demo\data\out

    Notice that five XML documents are now available in the target directory, as shown in the following image.

    Each XML document represents a single sales transaction that was split from the SalesTransactions.xml input document, which contains the batched data.

    For example, sale_0001.xml has the following contents:

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <TRANSACTION>
      <ProductID>1</ProductID>
      <Region>US</Region>
      <Quantity>5</Quantity>
      <SalePrice>50</SalePrice>
    </TRANSACTION>

    For example, sale_0002.xml has the following contents:

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <TRANSACTION>
      <ProductID>2</ProductID>
      <Region>EU</Region>
      <Quantity>5</Quantity>
      <SalePrice>100</SalePrice>
    </TRANSACTION>

    If you have received the same results that are described in this section, your new channel (sales.channel) has been tested successfully and is fully operational.


iWay Software