Configuring Java CAPS Business Processes

Persisting Reporting Data for Business Processes

When the BPM Engine is configured for persistence, general information about all Business Processes running on the engine is stored in the database. You can store and monitor additional information about a Business Process by configuring it for reporting persistence. You need to configure reporting persistence for each Business Process individually; the detailed information is only stored for those processes that are configured for it. This information can be accessed from the Enterprise Manager.

When you configure a Business Process for reporting persistence, a database script is generated that creates one database table for the Business Process. This table is populated with data from attributes of the WSD Object that are simple types (such as strings, integers, and so on). Data corresponding to complex attributes is not persisted, and a Business Process must include at least one simple attribute in order to be configured for persistence.

After you create your Business Processes, perform the following steps for each Business Process you want to enable for reporting persistence.

Scripts are also provided for you to uninstall the database components created for a Business Process.

Configuring a Business Process for Reporting Persistence

Reporting persistence for a Business Process is configured in the properties of the Business Process.

ProcedureTo configure a Business Process for reporting persistence

  1. In the Project Explorer of NetBeans, right-click the Business Process and then click Properties.

  2. On the General page of the Business Process Properties window, select Yes for the Persistence for Reporting option.

  3. Repeat the above step for each Business Process you want to configure for reporting persistence.

  4. Select Save All.

    A folder named Database Scripts appears under the Business Process.

Configuring Database Connection Information

In order to connect with the database to run the scripts, you need to specify the database connection information for the scripts.

ProcedureTo configure database connection information

  1. Right-click the Database Scripts folder under the Business Process, and then click Properties.

  2. Enter the properties.

  3. Click OK.

    Property

    Description 

    Database Type

    The database vendor and version you are using. 

    JDBC URL

    The URL to connect with the database. Enter one of the following: 

    • For Oracle: jdbc:SeeBeyond:oracle://<host>:<port>;SID=<SID>

    • For Sybase: jdbc:SeeBeyond:sybase://<host>:<port>

    • For SQL Server: jdbc:SeeBeyond:sqlserver://<host>:<port>;DatabaseName= <dbname>

    • For DB2: jdbc:SeeBeyond:db2://<host>:<port>;DatabaseName=<SID>;collectionId=JDBCPKG;packageName=JDBCPKG;embedded=true;createDefaultPackage=FALSE

      where <host> is the machine on which the database resides, <port> is the port number on which the database is listening, and <SID> and <dbname> are the name of the database.

    User

    The login ID of the user created by the monitoring and recovery database scripts. You can find the user name in the scripts in the Project Explorer under CAPS Components Library > Sun Business Process Manager > Run Database Scripts > Database Scripts.

    Password

    The password for the user created by the monitoring and recovery database scripts. 

Creating a Business Process Database Table

Once you configure the database connection information, you can run the database script. This procedure creates the table required for reporting on the Business Process. The name of the table created is unique to each Business Process, and begins with the first few characters of the Business Process name followed by a series of numbers and a version number.


Note –

Before you can perform this step, the monitoring and recovery database must be created and running. The BPM Engine must be configured for persistence in order for information to be stored in the Business Process table. Both of these procedures are described earlier in this chapter.


ProcedureTo create a Business Process database table

  1. In the Project Explorer, expand the Business Process.

  2. Expand the Database Scripts folder.

  3. From the Database Scripts folder, right-click the database install file appropriate to your database vendor, and then click Run.

Dropping a Business Process Database Table

BPM provides a simple way to uninstall the database tables created by the Business Process database installation script.

ProcedureTo drop a Business Process database table

  1. In the Project Explorer, expand the Business Process.

  2. Expand the Database Scripts folder.

  3. Right-click the appropriate uninstall script, and then click Run.