Академический Документы
Профессиональный Документы
Культура Документы
28/10/10 01:21
In this tutorial, we will use an Oracle database and a BOOK table in that database. Here is
the script to create the BOOK table if you would like to follow along:
http://www.xmarter.com/tibco-training-center/tibco-businessworks-devel…/tibco-designer-tutorial-query-database-table-text.jsp?printerfriendly Página 1 de 2
TIBCO Designer Tutorial - Query Database Table - Xmarter TIBCO Training Center - TIBCO Tutorials - TIBCO Trainer 28/10/10 01:21
jdbc:tibcosoftwareinc:oracle://localhost:1521;SID=XE.
Enter your Oracle database username in the User Name textbox.
Enter your Oracle database password in the Password textbox.
Click on the Test Connection button. If you have entered the correct values in
the JDBC Connection shared resource, you should see a message saying
"JDBC connection test successful."
4. Inside the QueryDBTable folder, create a new process definition called GetBooks.
5. In the GetBooks process definition, add a JDBC Query activity. Configure the JDBC
Query activity as follows:
In the Configuration tab of the activity:
Change the Name of the activity from JDBC Query to Get Books.
In the JDBC Connection field, click on the Browse resources button.
On the Select a Resource dialog box that comes up, select the
JDBCConnection shared resource, and click OK.
In the SQL Statement field, enter: SELECT * FROM BOOK
Go to the Output tab of the activity:
You will see a resultSet warning. Click on the Fetch button below.
This will fetch the resultSet structure of the SQL statement. After you
click the button, the warning should be replaced with a resultSet
structure. If not, check to make sure your SQL Statement in the
Configuration tab does not contain a misspelling.
Click on the Apply button on the activity, and then save the project.
6. Create a transition line from the Start activity to the JDBC Query activity and another
from the JDBC Query activity to the End activity.
7. Validate the resource and make sure there are no errors before testing the process.
To do this, deselect all the activities by clicking on a white space inside the
process definition. Then click on the Validate Resource button on the top
section of TIBCO Designer.
8. Go to the Tester tab on the left-hand side of TIBCO Designer. Click on the Start
testing button. In the dialog box that comes up, click on the Load & Start Current
button.
The process should now execute.
9. To check the output, click on the JDBC Query activity, and go to the Output tab. You
should see three book records in that tab.
Now, wasn't that easy? No coding required! Once you are familiar with the use of TIBCO
Designer, this entire task of connecting to a database and querying a table could've been
accomplished in less than five minutes. The beautiful thing is the fact that you did not need
to know any programming language syntax for database operations. All you had to do was
add and configure a JDBC Connection and a JDBC Query activity, and you're done. As I've
said in previous tutorials, this is one of the reasons why I truly enjoy my work as a TIBCO
consultant. TIBCO Software, Inc. deserves great credit for creating a wonderful tool for
application developers.
[Normal Version]
www.xmarter.com
©2010 Xmarter, Inc. All Rights Reserved.
http://www.xmarter.com/tibco-training-center/tibco-businessworks-devel…/tibco-designer-tutorial-query-database-table-text.jsp?printerfriendly Página 2 de 2