Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 4 TIBCO Adapters Example : Overview

Overview
This chapter walks you through the process of creating and testing a simple adapter project. This example uses TIBCO ActiveMatrix Adapter for Files. Some of the resources used are specific to this adapter but help illustrate the design-time environment of TIBCO Designer Add-in for TIBCO Business Studio and also the use of the Adapter Tester.
Sample Adapter Project
The project that will be created in the following sections will read and publish contents of the specified file. The file is c:\FileAdapter_Example\inputfile.txt. Create this folder and the input file before proceeding with the example.
Create the input file
The input file is a comma delimited file and contains the following text:
BookName,User's Guide
BookName, Release Notes
Create the project
In this project, we will first create the schema for the input file, then create and configure the publication service, and lastly assign the schema to the publication service.
1.
Create a project, AdapterExample.
See Chapter 1, Overview for instructions on launching TIBCO Designer Add-in for TIBCO Business Studio and creating a project.
2.
Right-click the project name and select Open. The Designer menu is now added to the menubar and also the perspective changes to Designer-TIBCO.
3.
Drag and drop a File Adapter Configuration from the Palettes view to the Editor View.
4.
5.
Double-click the File Schemas folder and then drag and drop a Read Schema resource to the Editor View.
6.
Double-click the Read Schema and then drag and drop a Delimited File Record from the Palettes View to the Editor View.
7.
a.
b.
Choose Other from the drop-down list for Delimiter.
c.
Type ’,’ (comma) in the Delimiter Other field.
d.
Use the Add button to add two rows to the Attributes table.
e.
f.
Click Apply.
8.
Click FileAdapterConfiguration.adfiles in the Project Explorer view.
9.
10.
a.
Click Browse next to the Input Directory field to locate the directory and the file that you created (c:\FileAdapter_Example).
b.
11.
a.
b.
Select Leave as is in the drop-down list of the Post Processing field.
12.
In the Schema tab, click the Add icon and select the schema created earlier from the Select a Resource dialog box.
13.
Click Apply.
14.
You are now ready to test the project.
Test the project
15.
Click Designer> Tools> Show Adapter Tester.
16.
Click FileAdapter Configuration.
17.
18.
Click Start.
The Console tab displays the trace messages as the adapter executes. The following figure shows a sample Adapter Tester Console screen.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved