This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Templates Ver. Rev. 1.0 Page 1 of 83
Infosys QUALITY SYSTEM DOCUMENTATION
Templates
Lab Guide for ES-TECH-FP-EAIS-SE-TIBCO Course
September, 2011
EAI, ES Academy
Document No. : 1.0 Version.Rev : V1
Authorized by: Yogesh Kumar Bhatt Signature/: Date
Shauvik Das
19th
October 2011
Templates Ver. Rev. 1.0 Page 2 of 83
Usage Guidelines
Do not forward this document to any non-Infosys mail ID. Forwarding this document
to a non-Infosys mail ID may lead to disciplinary action against you, including
termination of employment.
Contents of this material cannot be used in any other internal or external document
i. Press “Windows +R” and type cmd ii. Go to directory where TIBCO RV is installed. Then type “cd
d:\TIBCO\tibrv\8.1\bin” iii. Type command “tibrvsend -service 7503 -daemon tcp: 7503
test "My first RV test” Note: you can confirm send is successful if there is listener
already running. Use below commands for listener to be active
2.3 Sample send message
i. Press “Windows +R” and type cmd ii. Go to directory where TIBCO RV is installed. Type cd
d:\TIBCO\tibrv\8.1\bin iii. Type command “tibrvlisten -service 7503 -daemon tcp: 7503
test”
2.4 Sample program
i. Example Description
a. This example demonstrates the use of all the Rendezvous
activities within BusinessWorks. When a RV message is received on the subject "BW.Start" by a Rendezvous Subscriber, the process starts a Wait for
b. Rendezvous Subscriber listening to the subject "BW.Request", as well as a Send Rendezvous Request on the Subject "BW.Request" and a Reply Subject "BW.Reply". When the RV message from Send Rendezvous Request is received by the Wait for Rendezvous Request, a Reply message is sent by the Reply to Rendezvous Request activity. A final Result message is produced by a
Rendezvous Publisher on the subject "BW.Result". Please note that if you don't specify the reply subject in the Send Rendezvous Request activity, it will create its own inbox subjects and expects a reply on that subject).
ii. Setup
a. There is nothing to set up to run this project. However, you may change the subjects on which each of the activities use for publish or subscribe
Double click on the RVRPC object in the project tree panel (top left) to display the process in the design panel (top right)
Click on "Subscribe to BW.Start" and in the configuration panel and change the subject.
Similarly change the subject specified in "Send Request on BW.Request" and "Wait for BW.Request" configuration and the "replySubject" in the input tab. You may change also the subjects in "Publish Result on BW.Result".
iii. Running the example
a. In TIBCO Designer, load the RendezvousExample.zip project using the Project->Import Full Project->Menu selection
b Click on the Start Test Mode tab to run the project in test
mode.
c Open a Command window and type tibrvlisten "BW.Result" to subscribe to the final result.
d Open a second Command window and type tibrvsend
"BW.Start" "hello world" to publish a message to trigger the process.
Templates Ver. Rev. 1.0 Page 15 of 83
e Repeat tibrvsend "BW.Start" "with a different message"
and observe the output.
iv. Expected Results
You should see "HELLO WORLD" in the tibrvlisten output. If you send a different RV message, you should see the result with all the lower case letters converted to upper case letters.
v. Troubleshooting
BW process is not starting
a. Make sure you are sending an RV Message on the same subject as configured in the "Subscribe to BW.Start"
b. If you see the test mode hung at "Send Request on BW.Request"
activity make sure that if you have given some content in the data part of the input tab (right hand side in the Activity Input panel under body).
To compile and run the sample clients you need to execute "setup" script, which is located in the EMS_HOME/samples/java directory. On Windows systems, the setup file is setup.bat
a. Make sure you have Java JDK 1.5 or greater installed and that
you’ve added the bin directory to your PATH variable.
b. Open a command line or console window, and navigate to the EMS_HOME/samples/java directory.
c. Open the correct setup script file and verify that the TIBEMS_ROOT environmentvariable identifies the correct pathname to your EMS_HOME directory. For example, on Windows system this might look like:
d. Set TIBEMS_ROOT=C:\TIBCO\ems\5.0 e. Enter setup to set the environment and classpath: f. Setup g. Compile the samples: h. javac -d . *.java
This compiles all the samples in the directory, except for those samples in the JNDI and tibrv subdirectories.
If the files compile successfully, the class files will appear in the EMS_HOME/samples/java directory. If they do not compile correctly, an error message appears.
ii. Start the Subscriber Clients
You start the subscribers first because they enable you to observe the messages being received when you start the publisher.
To start Trainer as a subscriber: a. In the first command line window, navigate to
D:\TIBCO\ems\5.0\samples\java
Templates Ver. Rev. 1.0 Page 26 of 83
b. Type command “setup”
c. Type command “java tibjmsMsgConsumer –topic
Infosys.Trainee.topic-user Trainer”
To start Trainee as a subscriber:
a. In the first command line window, navigate to
D:\TIBCO\ems\5.0\samples\java
b. Type command “setup”
c. Type command “java tibjmsMsgConsumer -topic Infosys.Trainee.topic-user Trainee”
iii. Start the Publisher Client and Send Messages
a. In the first command line window, navigate to D:\TIBCO\ems\5.0\samples\java
If adapters are part of your project, you can create adapter archives and add them to the Enterprise archive. The following example uses a Generic Adapter Configuration. The process would be the same for an adapter.
To Add a Generic Adapter Configuration Archive
6.1 Configure the adapter. 6.2 Select the Enterprise Archive resource in the project panel. If
there are any configured adapters in your project, an Adapter Archive resource becomes available in the palette panel. If you’re working in palette mode, it is located in the adapter’s palette.
6.3 Drag the Adapter Archive into the design panel and specify
information in the Configuration tab, then click Apply:
6.4 After you have selected an adapter, the Advanced tab becomes
available and you can optionally specify the following information, then click Apply.
Software Type The type of adapter. This corresponds to the extension
of the adapter project file (multi-fileprojects). This field is only available for Generic Adapter Configuration or for adapters that allow multiple software choices, such as the TIBCO Adapter for Tuxedo. This value must match the value set by the software’s installer or specified when custom software was added to the administration domain.
Update Version from Adapter
When you build the archive, TIBCO Designer includes the ActiveEnterprise version of the adapter associated with this archive by default. If you unselect this checkbox, you can supply a different version instead. If the box is unchecked, the deployment ActiveEnterprise version value could go out of sync with the adapter’s value (the adapter provides a button to manage the
Name Name of the Adapter Archive.
Description Optional description of the Adapter Archive.
Author Optional author of the Adapter Archive.
Adapter Click the browse button (the binoculars) and select the adapter you wish to associate with the archive. Note that you need to create a new Adapter Archive for each adapter.
Deployment Plugin
Deployment plugin class. This class must be an implementation of the com.TIBCO.tra.tsm.plugin.custom.CustomTSMPlugIn interface. TIBCO Administrator runs this code as part of the deployment process when it creates the .tra file.
In addition to providing a pointer to this class here, you must also add a .jar file to the Shared Archive that includes the class so the class will be in the classpath.
Templates Ver. Rev. 1.0 Page 33 of 83
version). Warning: Supplying a different version can have seriouscompatibility consequences.
Minimum Version
Minimum version for the adapter. The value of this field is provided by the adapter and can be changed.
6.5 To build the archive, select the Enterprise Archive (which is
one level higher in the project tree) and click the Build Archive button.
Templates Ver. Rev. 1.0 Page 34 of 83
7. INSTALLATION OF TIBCO ADADB 5.5
7.1 Double click on application TIB_adadb-suite_5.5.0_win_x86.exe
7.2 Select “Next”
7.3 Select “I accept the terms of the License Agreements”
Installation completes with this step. 9.9 Verification of installation
Please do validation on installation by browsing through the locations specified in the above screen shots for the products specified above. e.g.:TIBCO File adapter is installed in D:\TIBCO\adapter\adfiles\5.4\bin Screenshot of verification is given below
Templates Ver. Rev. 1.0 Page 44 of 83
10. FILE ADAPTER HANDS-ON
10.1 Set up for examples
The pre configured examples are located in the examples directory. The directory contains executable files for Windows and UNIX platforms. Two subdirectories, reader and writer contain the directories used in the examples where input files exist and output files are placed. The reader directory is used by the publication service. The writer directory is used by the subscription service.
To access the examples directory on Windows:
cd C:\TIBCO\adapter\adfiles\<version number>\examples
To access the examples directory on UNIX:
cd <install_path>/TIBCO/adapter/adfiles/<version
number>/examples
10.2 Publishing Container Records - Example 1
Two examples are available that demonstrate how the adapter handles container records. The first example has a simple schema and the second has a more complex schema:
• ContainerReader and ContainerWriter Example • ContainerReader2 and ContainerWriter2 Example
In the ContainerReader and ContainerWriter Example, the publication service parses an input file container.txt which has the following records,
The publication service publishes the reader\input\container.txt file. The subscription service receives it and writes it to writer\output\outcontainer.txt.
iv. Stop the subscription service by pressing Ctrl c in the
command window.
10.4 Results
The publication service parses the input file, processes it into objects, and publishes it. The subscription service receives the objects, and formats them according to the WriteSchema, where the Employee record is no longer contained within the Department record. Instead,
Templates Ver. Rev. 1.0 Page 46 of 83
it is now a child record of the parent record Department. Therefore, all the records are written to a different line in the output file.
10.5 Understanding the Configuration
a. Publication Service
The publication service’s read schema has stored the base record Employee under the BaseRecords folder. The Department record contains the Employee record as the third field. The first two fields are field and field1.
The subscription service’s Write Schema is configured to write all file records to a separate line. Department is no longer a container record and does not have the Employee record as the third field. Instead, the Employee record is now a child record.
11. TRANSFERRING RECORDS USING TIBCO BUSINESSWORKS
This example shows how to use the adapter services within a TIBCO BusinessWorks process to transfer records. The example has three components, FAReader (publication service), FAWriter (Subscription Service), and ConnectFAReaderFAWriter (BusinessWorks process).
FAReader uses the adapter’s Publication service to read
delimited.txt from the reader/input directory and publish the message.
ConnectFAReaderFAWriter subscribes to the message, does a
field-to-field mapping, and publishes the message again.
FAWriter uses the adapter’s Subscription service to subscribe to the republished message and write it to outdelimited.txt in the writer/output directory.
11.1 PREREQUISITES
You can start the adapter, TIBCO BusinessWorks, and the example in one of the following ways: Using TIBCO Designer Using TIBCO Administrator Enterprise Edition The following software must be installed to run the example: TIBCO BusinessWorks TIBCO Administrator Enterprise Edition TIBCO Adapter for Files TIBCO Runtime Agent
11.2 RUNNING THE EXAMPLE USING TIBCO DESIGNER To run the example: In TIBCO Designer, click Tools>Show Adapter Tester. The Adapter Tester dialog box is displayed. Select FAWriter. Click Browse to specify a Working directory.
Templates Ver. Rev. 1.0 Page 49 of 83
Click Apply. Click Start. The FAWriter starts. Click the Tester tab. Click the Start testing viewed process button or press F9. The Select Processes to Load dialog box is displayed. Select ConnectFAReaderFAWriter and click Start Selected. The TIBCO BusinessWorks process is started. In the Adapter Tester dialog box, select the FAReader. Click Browse to specify a Working directory. Click Apply. Click Start. The FAReader starts.
11.3 RUNNING THE EXAMPLE USING TIBCO ADMINISTRATOR To deploy and run the example using TIBCO Administrator, create an Enterprise Archive File (EAR) in TIBCO Designer, and use TIBCO Administrator Enterprise Edition to deploy the EAR file. In TIBCO Administrator, make sure all software components needed by the adapter instance is installed on one or more machines that are part of the TIBCO Administration Domain and that the software is registered in the domain. Use the TIBCO Domain Utility to add a machine to a TIBCO Administration Domain. In TIBCO Administrator, use the Resource Management>Machines console to register software. These topics are explained in the TIBCO Administrator documentation set. Perform the following tasks to deploy and run the example.
11.4 Task A Generate the EAR File To generate the EAR file:
Templates Ver. Rev. 1.0 Page 50 of 83
To start TIBCO BusinessWorks, click Start>Programs>TIBCO>TIBCO Designer 5.1>Designer 5.1 and click Open New Project. Click Project > Import Full Project. The Import Project dialog is displayed. Click the Local Repository tab and browse to Teak_TafRepoDefault.dat. Click OK to import the file. The Import Options dialog is displayed. Select Overwrite on name conflict and click Apply. Click the FABW icon in the project panel. The FABW Configuration panel is displayed. Click Browse in the File Location field to specify the folder in which you want to save the EAR file, or use the default file location. Click the Build Archive button. A message informing you that the enterprise archive file is built correctly is displayed.
11.5 Task B Deploy the Example in TIBCO Administrator: Go to Application Management. Click New Application. Upload the EAR file created in the previous section and click OK. On the following screen, clear the Quick Configure check box and then click Save. Click on the top level application name in the Configuration page. Go to the Advanced tab and provide the values for User Name and Password if it is not already provided. Click Save. The Configuration screen reappears. Click the adapter archive (Adapter Archive.aar) and click Add To Additional Machines.
Templates Ver. Rev. 1.0 Page 51 of 83
Select the machine and click OK. In the following screen, click Save. In the Configuration screen click Deploy. Click OK. Once the deployment is complete, click Service Instances under the application. The adapter and TIBCO BusinessWorks are listed. Select both and click Start Selected, if it is not running. The adapter service and the TIBCO BusinessWorks processes are started.
11.6 UNDERSTANDING THE CONFIGURATION For configuration details, see Understanding the Configuration.
11.7 RESULTS Records in the input file are separated by commas. Records in the output file have been formatted to use tabs and semicolons as separators. Item lines in the input file were positioned ahead of the Customer lines. In the output file, the Customer line is positioned ahead of the Item lines.
Templates Ver. Rev. 1.0 Page 52 of 83
12. INSTALLATION OF ADMINISTRATOR 5.6.0
12.1 Double click on application TIB_TIBCOadmin-epe-
ii. Expand the hierarchy and select the check box to the left of the role that you want to use as the parent role for the new role (either Authenticated Users or another role previously created). Do not click the role itself for this task