Use case UC002 - TLOG data capture from POS and transfer to head office
The 4690 POS Server is collecting transaction (TLOG) data and is storing this data as files at an FTP accessible directory. The System must watch this directory through a remote FTP connection. If an appropriate file appears the System must capture the file and wrap the file content into a message with a parameter for the message purpose. The message must be sent to the head office Backbone Service Bus. At the beginning and end of the processing, the System must generate events containing information about the transaction status.
Let's start with FTP data transfer first. Two major parts need to be configured within Lotus Expeditor integrator
- A Resource Adapter for monitoring the remote FTP directory and modifying the JMS custom properties of the message that's being sent to the Backbone Service Bus
- A Flow definition once you don't want to use one of the standard ones
There are several approaches to configure Lotus Expeditor integrator. One may use the same configuration and the same Flow for similar use cases and leverage incoming message parameters and / or configuration file to separate these. Anyway it is recommended to use a unique configuration for each use case that should be processed. It helps to avoid side effects and a lot of trouble when searching for errors in system configuration.
See the appropriate Resource Adapter configuration below (you could also define an outbound resource mapper with configuration parameters and define the ResourceType
only. Please check Lotus Expeditor Administrators Guide for further details)
<!-- BEGIN UC002 adapter -->
<adapter type="XPDINTEG_FTP_ADAPTER" name="AdapterForTLogFile">
<!-- sync mode -->
<param name="ResourceType" value="TlogFile"/>
<param name="ProcessZeroLengthFiles" value="FALSE"/>
<param name="TransportType" value="FTP"/>
<param name="Description" value="Tlog Binary File"/>
<param name="TransferMode" value="ASCII"/>
<param name="TransferConfirmationMode" value="RecreateZero"/>
<param name="FtpServer" value="localhost"/>
<param name="FtpServerPort" value="21"/>
<param name="FtpPassive" value="TRUE"/>
<param name="FtpUser" value="xpdadmin"/>
<param name="FtpPassword" value="passw0rd"/>
<param name="FtpType" value="DEFAULT"/>
<param name="TransferPriority" value="5"/>
<!-- END UC002 adapter --></htmlblock></font></pre>
Find below the Flow definition file GetTlogFile.flow
You may have recognized that the parameters within the polling section in Resource Adapter configuration define, that the root directory of the FTP Server will be checked every minute for files like XML.*
. The FTP server itself can be any FTP Server that is running on Windows 2003 Server. We've used the built-in IIS FTP Service with an appropriate setup.
The Resource Monitor acts as publisher to the topic com/ibm/integrator/flowtriggerevent/FileTransfer/FTP/TlogAdapter
(with the Resource Adapter defined). The Flow acts as subscriber to this trigger topic. Once the Resource Monitor has fired the event to the EventAdmin Service the Flow will be executed.
In the future, the 4690 POS will contain software called DIF (Data Interchange Facility) that allows sending TLOG data as JMS messages. In this case the System must monitor a pre-defined queue and transfer the incoming messages to the head office Backbone Service Bus in same manner. The following picture shows the final solution with JMS messages sent by DIF on 4690.
Use case UC002
This next evolution of POS TLOG data capture is done by a JMS Client hooking on DIF / 4690. This approach is quite the same as in the next use case (UC003) and so far the configuration of message forwarding is described at next.