Previous Contents Index Next |
iPlanet Process Manager 6.0 (SP2) Process Adminstrator’s and Business Manager’s Guide |
Chapter 6 Databases
Process Manager stores user data in a relational database. The database provides a centrally available repository for user data for each application in a cluster, plus a common set of tables that all applications can share. In addition, there are adapters for each type of database that handle mapping between Process Manager types and the data types used by each kind of database, so process designers can design process definitions that are database independent.
This chapter describes these topics:
Overview
Using Databases With Process Manager
Setting Up Your Database
Overview
Process Manager uses an Informix, Oracle or Sybase database to store process instance data, so you must have a database available to you on your local system or available over a network on another system. If you are using a remote database, you must have the appropriate database client installed on your local system. You need to have enough privileges to create tables, write to tables, and to create views.
Process Manager supports the following databases:
Oracle 8.0.5, 8i (server), Oracle 8.1.6 (client)
Sybase 11.9.2, 12 (server), 11.1.1 (client)
Informix 7.3, 9.1.4 (server), 2.4 (client)
- There are several ways a Process Manager end user and administrator interact with database tables. Sometimes they need read-only access, but sometimes they add new data or update existing data. Note that the database access is transparent to the end user or administrator. They are only aware that they are viewing, adding, or modifying process instance data.
End users are accessing a database when they perform these operations:
Create a new process instance: Adds new data to all tables in the database.
Work on a work item: Adds new application-specific data and updates some of the cross-application tables.
View a process instance detail: Reads from several tables.
View a process instance's history: Reads from the history table.Administrators are accessing a database when they perform these operations:
View a process instance detail: Reads from several tables.
View a process instance's history: Reads from the history table.
Request process instance statistics: Reads from several tables.
Archive data: Updates some tables by flagging the database records that match the archiving criteria.
Delete data through the Archive and Delete page: Updates some tables by removing the database records that match the deletion criteria. This is not recoverable.
Delete data when uninstalling an application: Deletes the application-specific table for the application. This is not recoverable.
Delete data when removing a cluster: Deletes the application-specific and the cross-application tables. This is not recoverable.At each database operation, Process Manager collects data into implicit database transactions to protect application data in the database. Transaction-based processing allows rollbacks and automatic database cleanup if any Process Manager operation fails.
Using Databases With Process Manager
To provide consistency across all applications in a cluster, all applications share a single relational database.
This section includes these topics:
Cross-Application Tables
Primary & Foreign Keys
Database Views
Database Users
Database Adapters
Storing Digital Signatures
Setting Up Your Database
Database ConnectionsCross-Application Tables
The database has six common, cross-application tables that are shared across all applications and one application-specific table for each application (this value is used in the DB Application Table field in the application's definition in Process Builder). The cross-application tables contain standard data for each process instance and work item, while the application-specific tables contain the user data that is unique to each application.
The cross-application tables are:
process_instance table: Maintains process_instance data such as each process instance's state, application, and creation and modification dates. It also tracks who initiated the process instance and who it last worked on it.
work_item table: Tracks work item data such as each work item's expiration date and who it is currently assigned to.
history table: Maintains all historical data for each process instance.
wf_id_range table: Generates a new unique process instance ID whenever an end user initiates a new process instance. This table has a single field,next range
, indicating the next ID to create.
wf-blobs table: Stores digital signatures.
dynamic_group table: Stores entries for groups that are not statically defined in the corporate directory or in the application definition.
Table 6-1    Cross-application tables
Primary & Foreign Keys
The database tables are set up to share the process instance,
wf_instance_id
, as a key. The process_instance table uses thewf_instance_id
field as the primary key. Thewf_instance_id
field in other tables is considered as a foreign key. The work_item table uses a concatenated key ofwf_instance_id
,wf_fork_id
, andwf_node_cn
to precisely identify a work item in a parallel processing application, where there may be several work items for a specific process instance.Database Views
To allow simplified queries, Process Manager provides some standard views into the database information. These offer a predefined subset of the data available in the database.
Process Manager constructs these views:
closed_process: Uses the process_instance table in this query:
Database Users
There are three kinds of database users:
Administrator
Business Manager
- Has create and write access to all cross-application and application-specific tables and views. This is the database user that you identify when creating a cluster. This administrator is responsible for setting up your database.
application-specific user
- Also has create and write access to all cross-application and application-specific tables and views. This business manager is responsible for process instance-specific database issues. See the Business Manager's Guide for more information.
- Has create and write access to their own application's tables and views. Has read-only access to cross-application tables and views. Has no access to other application-specific tables.
- If you have an application-specific database user, the Process Builder designer identifies this as the DB User in the application's properties window when deploying the application.
Database Adapters
Each type of database supported by Process Manager has its own adapter. After the database type is determined, the adapter handles storing data in the database and takes care of such database-specific characteristics as type mapping.
Because type mapping in Process Manager is handled by the database adapters, Process Builder designers can use a single set of types that can be correctly interpreted for each type of database. Designers do not need to concern themselves about how their data types are stored in a given database.
Storing Digital Signatures
Process Manager has a special database table for storing digital signatures, wf_blobs.
Table 6-2    Fields in the wf_blobs database table
You can perform
dbadmin
queries against this table to verify digital signatures as required. For example, you could execute this query:SELECT * from wf_blobs WHERE wf_instance_id = <ID> and wf-field_cn = '<sig-field>'
to obtain the user ID, user name, and digital signature for a specific process instance. Note that to do this, you will need the process instance ID.
Setting Up Your Database
Process Manager requires the use of an existing Informix, Oracle or Sybase database. You can use whatever database server you already have installed, or you can install a new database server for your Process Manager data.
Note that if you are using Informix or Sybase, a database already exists for Process Manager's use. The database administrator of your enterprise should have created this database before creating a cluster. The database administrator must make sure the Process Manager administrative user has create table/create view privileges on that database. Informix and Sybase databases are no longer created during cluster creation.
Information you need to know before you attempt to create a new cluster or to join an existing cluster are:
Database server type (Informix, Oracle or Sybase)
Database server identifier
Database URL (For third party drivers only)
Driver Identifier (For third party drivers only)
Valid database user ID (the administrator's user ID). Note that this user cannot be the same as the database owner for Sybase databases
Password for that user
Database (for Informix or Sybase only)See the Installation Guide and the iPlanet Application Server Administration Guide for more information about setting up your database. You can locate iPlanet Application Server documentation in the following location:
serverRoot
/ias/docs/index.htm
Configuring a Third Party Database Driver
To use Informix, Oracle or Sybase, you need to configure a third party jdbc driver. This must be done before a cluster is created. This is done through the jdbcsetup utility. You can configure up to three third party drivers for use on your system.
To Configure a Third Party Database Driver:
Run the utility jdbcsetup located in
install_directory
/ias/bin.
- The Third Party JDBC Configuration dialog appears.
Figure 6-1    Third Party JDBC Configuration Add Dialog
Fill in the configuration fields for the driver.
Select OK. To add more than one third party driver, select Add instead of OK and repeat steps 2 and 3 for each driver.
- Driver Identifier The unique name for the driver.
- Driver Classname The Classname for the third party driver. For example:
oracle.jdbc.driver.OracleDriver
- Driver Classpath The Classpath to the third party driver. For example:
C:\jdbc\lib\classes111.zip
- Third Party Native Driver Directory The path to the third party native driver directory. This field is only required when using a Type2 driver.
To Edit or Delete a Configured Third Party Database Driver:
Run the utility jdbcsetup located in
install_directory
/ias/bin.
Select the Edit tab.
- The Third Party JDBC Configuration dialog appears.
Figure 6-2    Third Party JDBC Configuration Edit Dialog
Select the driver to edit from the drop-down list.
Edit the configuration fields for the driver selected.
Select Update.
Select Delete to delete a configured driver.
Select OK when you have finished editing or deleting drivers.Database Connections
Database connections are maintained through iPlanet Application Server. You can set connection parameters in iPlanet Application Server (iAS) Administrator.
To set the connection parameters, perform the following steps:
From Netscape Console or the Windows NT Start menu, launch iAS Administrator.
On the iAS Administrator toolbar, click the Database button to open the Database window.
In the left pane of the Database window, click the database for which you want to adjust the timeout parameter.
In the right pane of the Database window, in the Connection Timeout field, enter the number of seconds.
You can also set the minimum and maximum number of threads available for database connections. The thread parameters determine how many threads iAS allocates for asynchronous database queries. Such threads are usually used for queries returning a large number of rows and allowing the application to do other tasks while waiting for the query to finish. Asynchronous database queries are not supported by JDBC 2.0, a Java programming interface used to build on top on database drivers.
The default thread allocations are adequate for most applications. If an application developer uses many asynchronous queries, you might want to increase the maximum number of available threads. Keep in mind that each thread does use a small stack allocation and pulls from the total number of available system threads. Therefore, if an application does not use any asynchronous queries, you can increase performance by setting the maximum available threads to zero.
To set the thread parameters, perform the following steps:
In the right pane of the Database window, in the Minimum Threads field, enter the number of threads.
In the right pane of the Database window, in the Maximum Threads field, enter the number of threads.The database cache is an array used to hold active and recently used database connections. iPlanet Application Server adds database connections to cache when an application creates a database connection.
While the application is using that database connection, iAS marks that connection "in use." Once the database operations are finished, the server marks the database connection "free." The cache then holds the free connection in the cache for a configured period of time. This allows the server to use the free cached connection and quickly handle a new request to the same database. Once a free connection exceeds the timeout, a cleaning thread removes the connection from the cache and opens a slot for a new connection to be cached.
You can adjust the following cache parameters:
the maximum number of connections allowed in the cache
the number of slots held solely for free connections
the timeout limit, in seconds, for free connections
the interval, in seconds, at which the cache cleaner thread removes timed-out free connectionsThe default values are adequate for most applications, so adjustments are not usually required for initial application installations.
iAS dynamically adjusts the cache up to the maximum number of allowable connections. If there are no connections to cache, the array is allocated to zero spaces.
In the right pane of the Database window, under Cache, enter values for the following parameters:
maximum connections
Click Apply Settings to save the changes to iAS.
timeout
free slots
interval
It is perhaps worth noting here that Process Express, Process Administrator, and Process Business Manager also each use a database connection. Whenever you are tracking the number of connections in use at a given time, remember that two connections are always taken by these components.
Copyright © 2001 Sun Microsystems, Inc.
Some preexisting portions Copyright © 2001 Netscape Communications Corp. All rights reserved.