Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 6 Subscription Service for Conversational Communication : Example Description

Example Description
This example shows how the adapter Subscription service can be used in a TIBCO ActiveMatrix BusinessWorks process using TIBCO Rendezvous 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 Conversational communication.
The example simulates the Conversational communication paradigm that is supported by the adapter Subscription service. The Tuxedo service, based on the value for OCCURS (Batch Size) that it receives from the invoking client, returns the records (that will contain ITEMCODE, ITEMID, PRICE) in batches (If OCCURS = 2, it will return 2 records at a time).
Following are the flow of events:
1.
User enters the input data (values for OCCURS) into the Get_input.xml as follows:
<?xml version="1.0" encoding="UTF-8"?>
<Materials xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Material>
<OCCURS>1</OCCURS>
</Material>
</Materials>
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, SEARCHITEM.
5.
The service based on the BatchSize that is received retrieves the records in batches from the items file.
6.
The Subscription service receives these records and sends these on the reply subject.
7.
The sub-reply process in TIBCO ActiveMatrix BusinessWorks gets triggered once the reply is received.
8.
The data received on the reply subject is then written to an XML namely Get_output.xml.
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\Conversational\Material
TIBCO_HOME\adapter\adtuxedo\version_number\examples\Conversational\Material\BusinessWorks
The project zip that contains the preconfigured adapter subscription service and theTIBCO 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