The Adapter for JText connector can convert business object data into text files, and text files into business object data, which allows it to exchange business objects between InterChange Server Express and file-based applications, such as mainframes. Although many applications manage their business data through application-programming interfaces, some do not. Almost all applications, however, are capable of processing text files, which makes the Adapter for JText a popular and powerful integration component.
The SystemTestObject collaboration object exchanges data using an instance of the Adapter for JText. This instance is named SystemTestConnector in this SystemTest sample. This sample does not represent a typical integration interface since the exchange of Enterprise data occurs between separate applications. It does, however, provide an application-independent means of validating most of the types of components that are typically involved in an IBM WebSphere Business Integration Server Express server exchange.
The SystemTestConnector polls the data directory within the \\Samples\System folder of the IBM WebSphere Business Integration Server Express installation. This installation folder contains the Employee.in folder, which contains a number of records for an Employee business entity.
The following data represents a single record of this type:
This type of record is referred to as a name/value pair, delimited. Metadata names, such as EmployeeId, identify the data that they represent. Individual fields are identified by special characters such as paragraph returns. Individual records are identified by special characters such as semicolons.
The JText connector processes the Employee.in file, converting the records contained within it to business objects, and then sends these business objects to InterChange Server Express. The business objects are processed by a collaboration, which applies a small amount of business logic to the objects. The collaboration sends the objects back to SystemTestConnector, which converts each business object to a file in the data folder. SystemTestConnector uses the same data folder to poll for new events and to output the business objects it processes. SystemTestConnector recursively processes its own output, providing a consistent flow of data through the system.
The SystemTest collaboration template, upon which the collaboration objects are based, is designed to attempt an illegal Java number-formatting operation on a field in some of the business objects processed by the collaboration. This illegal operation generates failed flows so you can use Flow Manager to experiment with resolving failures in the system. For more information about Flow Manager, see the IBM WebSphere Business Integration Server Express and Express Plus System Administration Guide.
The following instructions use the Adapter for JText to process text files through a pair of interfaces in the system.
The information displayed within the "SystemTest sample" console window scrolls rapidly as JTextConnector starts, and then polls and processes events.