Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 7 Subscription Service for Queue-Based 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 uses the Queue-based communication.
The example simulates the Queue-based communication paradigm that is supported by the adapter Subscription service. The Tuxedo service, based on the Department ID that it receives from the invoking client, returns the Employee ID, Employee Name and Department Name corresponding to that Department ID.
Following are the flow of events:
1.
Enter the values for Department ID, ReplyQueue, CommunicationType, ServiceName, QueueSpace in the Get_input.xml as shown below:
<?xml version="1.0" encoding="UTF-8"?>
<Employees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Employee>
<DEPTID>15</DEPTID>
<ReplyQueue>REPLYQ</ReplyQueue>
<CommunicationType>Queue</CommunicationType>
<ServiceName>QSERVICENEW</ServiceName>
<QueueSpace>QSPACE</QueueSpace>
</Employee>
</Employees>
2.
The TIBCO ActiveMatrix BusinessWorks process, sub-send 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, EMPINFO.
5.
The service based on the Department ID that is received, queries the flat file - inputdata.txt for all employee records with matching Department ID.
6.
The Subscription service sends the records that matched the query on the reply subject.
7.
The sub-receive process in TIBCO ActiveMatrix BusinessWorks gets triggered once the reply is received.
8.
The data received on the reply subject is then written to the Get_output.xml 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\QueueBased\Employee
TIBCO_HOME\adapter\adtuxedo\version_number\examples\QueueBased\Employee\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