Updating Taps

How to:

A key part of any business process is the ability to modify or enable data capture at any point in time. A process flow can contain independent taps that are not configured initially with a specific expression. This allows you to modify or activate any tap using the iWay Service Manager Administration Console without having to go back to iWay Designer to modify the original process flow. As a result, you can have multiple deactivated taps in a process flow that serve as placeholders for future use. If the data capture requirement changes or there is a need to monitor more data, these taps can be activated accordingly.


Top of page

x
Procedure: How to Update Taps

To update taps:

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

    The iWay Service Manager Tools pane opens.

  2. In the left pane, select Views under the Real-time section.

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

  3. Click the Taps tab.

  4. Select the sales.process.tap2 tap in the Name column.

    Note: The sales.process.tap2 tap was created earlier, but not configured.

  5. Right-click the sales.process.tap2 tap and select Edit IFL (iWay Functional Language) from the context menu.

    The Edit IFL Expression dialog box opens.

  6. Enter the following expression in the top section of the Edit IFL Expression dialog box:
    _if(_contains(XPATH(TRANSACTION/ProductID),1),_expose
    (sales.quantity.product1,XPATH(/TRANSACTION/Quantity),db,int),_if
    (_contains(XPATH(TRANSACTION/ProductID),2),_expose(sales.quantity.product2,
    XPATH(/TRANSACTION/Quantity),db,int),_if(_contains(XPATH(TRANSACTION/
    ProductID),3),_expose(sales.quantity.product3,XPATH(/TRANSACTION/
    Quantity),db,int))))

    This expression allows you to capture the quantity sold for each product. Using iFL (iWay Functional Language) notation, the expression checks if the ProductID is 1. If this condition is met, the expression exposes the Quantity sold to the sales.quantity.product1 event. If the ProductID is 2, then the expression exposes its Quantity to the sales.quantity.product2 event. Finally, if the ProductID is 3, then the expression exposes the sales.quantity.product3 event.

  7. Click save.

    You are returned to the Views pane, where the new expression is now added to the Expression column for the sales.process.tap2 tap.

    Note: You may need to refresh your Web browser after the expression is saved.

  8. Select the check box next to the sales.process.tap2 tap to activate this tap.

    You are now able to tap into additional data through the process flow (sales.process) that was configured earlier and generate business events. As the process flow is processing the batched sales transactions, it is triggering the sales.process.tap2 tap, which runs the corresponding expression. As a result, three events are now generated for three product types, which are being processed.

  9. On your file system, copy the SalesTransactions.xml file that was created earlier into the following input directory:
    C:\Sales_Demo\sales_data\in
  10. Click Tools in the top pane of the iWay Service Manager Administration Console.

    The iWay Service Manager Tools pane opens.

  11. In the left pane, select Views under the Real-time section.

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

  12. Click the Events tab.

    The contents of the Events tab are displayed, as shown in the following image.

  13. Scroll down the list until you find the following events:
    • sales.quantity.product1
    • sales.quantity.product2
    • sales.quantity.product3

    Note: The new events do not have any associated feeds. However, the previously created events that are already used in the Real Time Line chart do have a default enable feed associated with them as well as the enable.sales.total.graph feed, which was created automatically by the chart.

  14. Click Tools in the top pane of the iWay Service Manager Administration Console.

    The iWay Service Manager Tools pane opens.

  15. In the left pane, select Resources under the Real-time section.

    The Resources pane opens and displays the Gauges tab by default, as shown in the following image.

  16. Click the Charts tab.

    The Charts tab opens and displays the available charts that can be configured, as shown in the following image.

  17. Click the Real Time Column chart.

    The Real Time Column Chart configuration pane opens, as shown in the following image. A visual representation of the selected chart (for example, Real Time Column) is displayed on the left. There are five configuration tabs (Sources, Data, Labels, Visuals, and Extras) located on the right. By default, the Sources tab is selected.

  18. In the Interval field, enter a value of 2, which indicates that the chart will update every two seconds.

  19. Click Update.
  20. Click the Data tab.

    The Data tab is used to specify what events will be used to feed the data. Since more than one event will be monitored using the Real Time Line chart, you must manually type in the events instead of selecting a single event from the Events drop down list.

  21. Provide the configuration properties, as defined in the following table.

    Parameter

    Value

    Events

    sales.quantity.product1|sales.quantity.product2|sales.quantity.product3

    Aggregation

    SUM

    History

    600000 (Default)

    Data Range

    5

  22. Click Update.
  23. Click the Labels tab.

  24. Provide labels that will be used to identify the data in the Real Time Line chart, as defined in the following table.

    Parameter

    Value

    Title

    Product Sales

    Subtitle

    Comparative Sales

    X Axis Name

    Time Line

    Y Axis Name

    Total Sales

    Notice that as you type values in the various label fields, the chart on the left updates to reflect the new data you entered.

  25. Click Update and then Save.

    The Save as Portlet dialog box opens.

  26. In the Name field, type ProductSalesGraph.
  27. From the Type drop-down list, select Windowed, which indicates that a pop-up window will be used to display this portlet.
  28. Click OK.

    You are returned to the main Resources pane where the Portlets tab is now selected.

    The new Real Time Column chart (ProductSalesGraph) is now added to the table.

  29. Right-click ProductSalesGraph and select View from the context menu. As a shortcut, you can also double-click the chart name.

    The ProductSalesGraph window opens and displays the Real Time Column chart you configured.

    The Real Time Column chart contains multiple vertical columns, which represent the earlier runs of data (total product sales). This data will be updated using the two second interval that was configured. You can also click the name of the chart in the title bar to view the chart in full-screen mode.

  30. On your file system, copy the SalesTransactions.xml file that was created earlier into the following input directory:
    C:\Sales_Demo\sales_data\in

    The Real Time Column chart will update in a few seconds to reflect new data.


iWay Software