Configuring a Database for On-premises TIBCO BusinessWorks™ App Execution History
When enabling Execution History for on-premises TIBCO BusinessWorks Apps, you must configure a local database to store the data generated by the TIBCO BusinessWorks App. The following databases are supported for storing execution statistics:
- Microsoft SQL Server 2015 and higher
- Oracle Database 12c and higherNote: Oracle Database requires some additional configuration. See Configuring Proxy Mode to Use Oracle Database for Execution History.
- MySQL 5.x
- PostgreSQL 12 and higher
Once you have chosen a database and that database is running, you must create the following tables using the scripts provided in our GitHub repository.
- ActivityLoggingStats
- ProcessInstanceLoggingStats
- TransitionLoggingStats
The scripts to create the database tables are located at the following URLs depending on the database you selected.
- Microsoft SQL Server: https://github.com/TIBCOSoftware/bw-tooling/blob/master/fluentd/MSSQL/mssql_pm_create.sql
- Oracle Database: https://github.com/TIBCOSoftware/bw-tooling/blob/master/fluentd/Oracle/oracle_pm_create.sqlNote: If you are using Oracle Database with enhanced limits, see Using Oracle Database with Increased Column Limits.
- MySQL: https://github.com/TIBCOSoftware/bw-tooling/blob/master/fluentd/MySQL/mysql_pm_create.sql
- PostgreSQL: https://github.com/TIBCOSoftware/bw-tooling/blob/master/fluentd/PostgreSQL/postgresql_pm_create.sql
Configuring Proxy Mode to Use Oracle Database for Execution History
Using an Oracle Database to store the data generated by the TIBCO BusinessWorks App requires a BWCE Mon container that acts as a proxy.
- Configure BWCE Mon to use Oracle Database as described Setting Up TIBCO BusinessWorks Container Edition Application Monitoring on Docker.
- Use the following command to start BWCE Mon container:
docker run -p 8089:8080 -e PERSISTENCE_TYPE="oracle" -e DB_URL="oracle://ehagent:Tibco321@10.97.110.206:1521/orclpdb1" -e DEPLOYMENT="tci" monoracle
- Configure and start the Hybrid Agent as described in Downloading, Configuring, and Running the Hybrid Agent. Use the --spec command when starting the agent to pass one or more connection specs, such as the port and IP address of the local BWCE Mon you configured in the previous step. For example:
./tibagent start agent --spec 8089:10.97.90.49:8089 hybridagent
Using Oracle Database with Increased Column Limits
By default, Oracle Database supports only 4,000 bytes for the varchar2 data type. If you expect the input/output data for your app Execution History to be greater than 4,000 bytes, increase this limit to 32767 bytes as follows:
- Increase the column limit at the Oracle server level using this command:
MAX_STRING_SIZE = EXTENDED
Note: This command is run at the server level not the schema level.Caution: This command is irreversible.For additional information on increasing Oracle Database limits, see Enabling the New Extended Data Type Capability in the Oracle Database documentation.
- When configuring Fluentd as described in Pushing TIBCO BusinessWorks™ App Execution History to a Local Database
- Edit the fluentd.conf file by commenting out lines 9 and 10 and uncommenting lines 11 and 12.
1 <source> 2 @type forward 3 port 24224 4 </source> 5 <filter bw.event.activity.**> 6 @type record_transformer 7 enable_ruby true 8 <record> 9 #activityOutput ${ record['activityOutput'].join('').slice(0..3999) } 10 #activityInput ${ record['activityInput'].join('').slice(0..3999) } 11 activityOutput ${ record['activityOutput'].join('').slice(0..32766) } 12 activityInput ${ (record['activityInput'].join('').slice(0..32766)) } 13 </record>
- Dockerfile - Required to create the Fluentd Docker image based on the fluentd.conf configuration file. Example:
docker build -t fluent:oracle .
- Once you have the Fluentd Docker image created, you can start the Fluentd container. Example:
docker run --rm -p 24224:24224 -e FLUENTD_CONF=fluentd.conf --name fluent_oracle fluent:oracle
- Edit the fluentd.conf file by commenting out lines 9 and 10 and uncommenting lines 11 and 12.
Related Topics
Enabling Execution History for TIBCO BusinessWorks™ Apps Running On-premises
Pushing TIBCO BusinessWorks™ App Execution History to a Local Database
Downloading, Configuring, and Running the Hybrid Agent
Hybrid Agent Command Reference
Configuring a TIBCO BusinessWorks™ App for Execution History