How to Call a Database From a Process
You can implement a call to a database from a business process application, and then deploy and test that application.
Prerequisites
You should be familiar with the basics of designing, implementing and deploying process-based applications using TIBCO Business Studio. If you are not familiar with these things, you should run through the following tutorials before attempting this one:
You should work through each section in turn to complete the tutorial.
You can use a service task to establish a JDBC connection to an external database and execute a database operation - either a stored procedure, or a SQL query (a SELECT, INSERT, UPDATE or DELETE statement).
For simplicity, this tutorial runs a very simple query against the BPM runtime database.
- Importing the GetUserLoginName Analysis Project
To avoid having to build the process from scratch and to focus just on the steps involved in communicating with a database, this tutorial provides a "work in progress" project as a starting point. - Creating a Database Service Task
To call a database from a process, you use a Service task of type Database. - Setting up Data Inputs to and Outputs from the Database
Each input and output parameter defined in a SQL query must be mapped to a corresponding data field or formal parameter in the process. - Creating a JDBC Resource Instance
A JDBC resource instance must exist in the BPM runtime before you can deploy the GetUserLoginName application. This resource instance defines the connection information used by the BPM runtime to contact the database. - Creating a System Participant
A system participant must be defined and assigned to the database service task. The system participant must be configured to identify the BPM runtime JDBC resource instance that defines the connection to the database. - Deploying the Application
As part of the deployment process, you map the system participant used by the database service task to the appropriate JDBC resource instance. - Testing the Application
You can test the application by running an instance of it in Workspace.