Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 Subscription Service for Asynchronous Communication : Example Description

Example Description
This example shows how the adapter Subscription service can be used in a TIBCO ActiveMatrix BusinessWorks process using JMS transport. The project configured for this example has a TIBCO ActiveMatrix BusinessWorks process which sends data on the subject that the adapter Subscription service is subscribing to. The adapter Subscription service, in turn uses the Asynchronous communication.
The example simulates the Asynchronous communication paradigm that is supported by the adapter Subscription service. The Tuxedo service, based on the CUSTID, NAME, ADDRESS, CITY, STATE, ZIP and PHONE data that it receives from the invoking adapter, writes the data into a flat file named Customer. It also generates an ID for that customer and includes it in a file named GeneratedCustomerIds.
Following are the flow of events:
1.
User enters values for the following input data into the Get_input.xml.
CUSTID, NAME, ADDRESS, CITY, STATE, ZIP, PHONE, ServiceName, CommunicationType in the Get_input.xml as shown below:
<?xml version="1.0" encoding="UTF-8"?>
<Customers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Customer>
<CUSTID>15</CUSTID>
<NAME>Arundhati</NAME>
<ADDRESS>Vijaya Enclave</ADDRESS>
<CITY>Bangalore</CITY>
<STATE>Karnataka</STATE>
<ZIP>560098</ZIP>
<PHONE>1234567</PHONE>
<ServiceName>NEWCUST</ServiceName>
<CommunicationType>Async</CommunicationType>
</Customer>
</Customers>
2.
The TIBCO ActiveMatrix BusinessWorks process, sub gets triggered. The file poller in the process reads the data and forwards it to the publisher which publishes the data.
3.
The Subscription service, which is listening on the same subject as that of the invoking client (TIBCO ActiveMatrix BusinessWorks), subscribes to the subject and gets the data.
4.
The Subscription service in turn invokes the Tuxedo service NEWCUST.
5.
The Tuxedo services NEWCUST, based on the data that it receives from the Subscription service, writes the data to CustomerDetails file.
Location of the Example Files
Files provided with this example are given in the next table. The files are located in the following locations:
TIBCO_HOME\adapter\adtuxedo\version_number\examples\Asynchronous\Customer
TIBCO_HOME\adapter\adtuxedo\version_number\examples\Asynchronous\Customer\BusinessWorks
Project zip that contains the preconfigured adapter Subscription service and the TIBCO ActiveMatrix BusinessWorks process.
Contains commands required to get the Tuxedo service running on Windows (Sets the required environment variables, creates executables, loads the ubbconfig file and boots the Tuxedo service).
Contains commands required to get the Tuxedo service running on UNIX (Sets the required environment variables, creates executables, loads the ubbconfig file and boots the Tuxedo service). This script should be run in a k-shell.

Copyright © TIBCO Software Inc. All Rights Reserved