Topic: Bonita in Win2003/Tomcat6/MySQL5.1: Full guide (Modified)
*/---------------------------------------------------------------------------------------------------
*/ Install and configure Bonita 5.1.0 for Windows 2003 / Tomcat 6 / MySQL 5.1
*/
*/ Modified on: 30/Apr/2010
*/ Reason : WAR file deployment was not mentioned in
*/ 'Adding additional processes' section
*/---------------------------------------------------------------------------------------------------
Before starting, please note that the things explained below are what I have done
to achieve my Bonita installation. The versions specified for various utilities and
Bonita support software are what was available when I installed them. On a later date
these versions may get revised. Also, feel free to change folder names to suit your
naming conventions.
The environment in which I installed Bonita is:
- Bonita was installed in a server machine running
Windows 2003 Server Ent edition / Tomcat 6.0.26 / MySQL 5.1
having IP 101.101.101.101. ( The IP is only for example! )
- Users will access Bonita from their own Windows XP systems using internet browser
through URL http://101.101.101.101:8080/bonita/ in our intranet
User Logins/passwords are defined through Bonita admin user and the data is saved
in MySQL database in the server.
I will explain how I achieved the following:
- Install Bonita 5.1.0 in Windows 2003
- Configure Bonita to use MySQL as database
- Deploy the Bonita process 'MyProcess' and its corresponding application in Tomcat 6
- Define a user/password
- Access the process through another system
I assume that you have already installed Bonita successfully, designed a process and
able to run it through Bonita RUN user experience.
--------------------------
- Before you begin
--------------------------
Create the following folders in your local disk root (eg: c:\ )
- 'Bonita_setup'
- 'Bonita_Process'
This is not necessary. But, this will help us a lot in avoiding references
to long folder paths.
-----------------
- Tomcat 6
-----------------
File : apache-tomcat-6.0.26-windows-x86.zip
Download from: http://www.apache.org/dist/tomcat/tomca … ws-x86.zip
Use the above URL as a direct file downloading link. If you have any problem,
please do as follows:
Go to http://tomcat.apache.org/download-60.cgi.
Towards the end of this page, locate the section '6.0.26'. Below that, you will
see the section 'Binary Distributions'. Click on the link '32-bit Windows zip'.
You may have to wait for sometime to get the download dialog to open up.
- Save the file to the folder 'Bonita_setup' created earlier.
- Unzip the zip file under the Bonita_setup folder.
- You will get the sub folder 'apache-tomcat-6.0.26'
- Copy this folder into your C: drive root with name 'Tomcat_6026'
- (Now, you may delete the 'apache-tomcat-6.0.26' subfolder from 'Bonita_setup' folder).
--------------------------
- Apache ANT
--------------------------
File : apache-ant-1.8.0-bin.zip
Download from: http://ant.apache.org/bindownload.cgi
Towards the end of the URL page, locate the link 'Current Release of Ant'.
In that section click on link saying 'apache-ant-1.8.0-bin.zip'.
- Save the zip file to the folder 'Bonita_setup' created earlier.
- Unzip the zip file under the Bonita_setup folder.
- You will get the sub folder 'apache-ant-1.8.0'
- Copy this folder into your C: drive root with name 'Ant_180'
- (Now, you may delete the 'apache-ant-1.8.0' subfolder from 'Bonita_setup' folder).
This utility is required to create the tables in the Bonita MySQL database.
----------------------
- JAVA EE SDK
----------------------
File : java_ee_sdk-5_08-jdk-6u18-windows.exe
Download from: http://java.sun.com/javase/downloads/index.jsp
- In the above URL page, click on the rectangle showing 'Java EE' (JDK + Java EE Bundle)
- In the next page, select 'Windows' for platform and 'English' for Language.
Click on 'Continue'
- In the next page, click on link showing 'java_ee_sdk-5_08-jdk-6u18-windows.exe'.
In fact, I downloaded EE version because, in other versions, I could not find the
'tools.jar' required by the Ant utility to build the database tables using the
Bonita 'init-db'.
- Save the exe file to the folder 'Bonita_setup' created earlier.
- Run the exe and install Java SDK.
- Installation will ask you to specify a password for admin. Give an appropriate
password and for obvious reasons, do remember that!
- In the 'Installation Options' appearing in a subsequent page, I had un-checked
the 'Enable UpdateCentre Client' option and checked the 'Add bin directory to PATH'
options. If you think otherwise, choose accordingly.
- In the 'Installation Completed' screen, do not click on 'Start Server'.
Directly click on 'Finish' button.
* Usually the SDK gets installed in c:\sun\sdk.
* If you have a JRE_HOME variable, delete that from System Environment variables list
* In 'System variables' section, set environment variable JAVA_HOME to c:\sun\sdk\jdk
* In 'User variables...' section, set environment variable PATH to C:\Sun\SDK\jdk\jre\bin
* See 'Set Environment variables' at the end of this documentation,
if you are in doubt how to set variables.
----------------------------
- MySQL server
----------------------------
File : mysql-essential-5.1.45-win32.msi
Download from: http://www.mysql.com/downloads/mysql/
- Click on 'Download' button shown against 'Windows (x86, 32 bit), MSI Installer'.
There are two files. I downloaded '(mysql-essential-5.1.45-win32.msi)' which
excludes Instance Manager tool, Documentation & Developer Components.
If you want, you may download '(mysql-5.1.45-win32.msi)'.
MySQL site will request you to register. If you do not want to register click on
'No thanks, just take me to the downloads!'.
- You will see 'You are downloading: mysql-essential-5.1.45-win32.msi.
...chose a mirror site close to you'. If you are not sure which is closer,
just click on the first 'HTTP' link. That is what I did!!!
- Save the MSI file to the folder 'Bonita_setup' created earlier.
- Run this file to install MySQL Server
- Select 'Typical' and click 'Next'. Click 'Install'.
- Click on 'Next' button on each screen until you see 'Wizard Completed' screen.
- Make sure that 'Configure the MySQL Server now' is selected (Checked).
- For time being, uncheck 'Register the MySQL Server now'.
You can register later if you want.
- Click on 'Finish'.
- Click on 'Next'.
- Select 'Standard Configuration' and click 'Next'
- 'Install as Windows Service' will be selected by default.
- Click on check box near to 'Include Bin Directory in Windows PATH' to select it.
- If not selected, click on check box near to 'Modify Security Settings' to select it.
- Enter a password for user 'root' (Do REMEMBER this password for obvious reasons!!!)
- Click on check box near to 'Enable Root acccess from Remote machines' to select it.
- In the next screen, click 'Execute'.
- Progress of processes will be displayed.
- When you see 'Press [Finish] to close the wizard', click on 'Finish'.
----------------------------------------
- MySQL Java Connector
----------------------------------------
File : mysql-connector-java-5.1.12.zip
Download from: http://www.mysql.com/downloads/connector/
- Click on 'Connector/J'.
- In next page, click on 'Download' button shown against 'Platform Independent (Architecture
Independent), ZIP Archive (mysql-connector-java-5.1.12.zip)
- Save the zip file to the folder 'Bonita_setup' created earlier.
- Unzip the zip file under the Bonita_setup folder.
- You will get the sub folder 'mysql-connector-java-5.1.12'
--------------------------------------------------------------
- Bonita.BAT file with Environment Variables
--------------------------------------------------------------
In the 'C:\Tomcat_6026' folder, create a batch file called 'BONITA.BAT'
with following contents.
@echo off
echo Setting Bonita Environment variable
echo
set BONITA_OPTS="-Dorg.ow2.bonita.environment=c:/Tomcat_6026/conf/bonita-environment.xml"
set LOG_OPTS="-Djava.util.logging.config.file=c:/Tomcat_6026/conf/logging.properties"
set SECURITY_OPTS="-Djava.security.auth.login.config=c:/Tomcat_6026/conf/jaas-standard.cfg"
set JAVA_OPTS=%LOG_OPTS% %SECURITY_OPTS% %BONITA_OPTS%
echo
echo Starting TomCat...
echo
-----------------------------------------------------------
- Export the Process and its Application
-----------------------------------------------------------
Start Bonita studio and open your process. In my case, it was 'MyProcess'.
- Click on 'Process' and then 'Export...' to generate the BAR file.
- For the save Location, select the 'Bonita_Process' folder created earlier.
Process file 'MyProcess--1.0.bar' will be created in this folder.
- Click on 'Process' and then on 'Export Application' to generate the required
application files of the process.
- Click on checkbox to select 'Export UserXP' and then 'All UserXP'
- Click on checkbox to select 'Export Runtime'
- Click on checkbox to select 'Extract selected War libraries outside......'
This will ensure that all required files will be generated.
- From the process list, click on checkbox to select 'MyProcess'
(Your process name may be different)
- For the save Location, click on Browse to select the 'Bonita_Process' folder created earlier.
- Click on 'Export'
- File 'bonita_application.zip' will be created in the 'Bonita_Process' folder.
- Unzip the file in the same folder. You should get the following folders/file.
- common-war-lib
- conf
- runtime
- wars
- INSTALL.txt
----------------------------------------------------------------------
- Prepare the Configuration files and Environments
----------------------------------------------------------------------
From the C:\BONITA_PROCESS\runtime\conf folder,
Edit the bonita-environment.xml file ( I edited by opening in Windows WordPad ) for
the hibernate-configuration sections for 'core' and 'history'
-----------------------------------------------------------------------------------------
<!-- Description: Configuration of the Hibernate session factory used by Bonita core. -->
<hibernate-configuration name='hibernate-configuration:core' >
<properties file='C:\BONITA_PROCESS\runtime\conf\hibernate-core.properties' />
<mappings resource='bonita.mappings.hbm.xml' />
<cache-configuration resource='bonita.core.cache.xml' usage='read-write' />
</hibernate-configuration>
<!-- Description: Configuration of the Hibernate session factory used by Bonita history. -->
<hibernate-configuration name='hibernate-configuration:history' >
<properties file='C:\BONITA_PROCESS\runtime\conf\hibernate-history.properties' />
<mappings resource='bonita.mappings.hbm.xml' />
<cache-configuration resource='bonita.history.cache.xml' usage='nonstrict-read-write' />
</hibernate-configuration>
-----------------------------------------------------------------------------------------
edit the hibernate-core.properties file. Change only the below given lines.
-----------------------------------------------------------------------------------------
hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect
hibernate.connection.driver_class com.mysql.jdbc.Driver
hibernate.connection.url jdbc:mysql://localhost:3306/bonita_core
hibernate.connection.shutdown true
hibernate.connection.username bonitauser
hibernate.connection.password bonitauser123
-----------------------------------------------------------------------------------------
IMPORTANT: Be sure to remove the line showing 'hibernate.hbm2ddl.auto'.
Otherwise, as per Bonita guide, the migration won't work and you might lose
the data in your database.
edit the hibernate-history.properties file. Change only the below given lines.
-----------------------------------------------------------------------------------------
hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect
hibernate.connection.driver_class com.mysql.jdbc.Driver
hibernate.connection.url jdbc:mysql://localhost:3306/bonita_history
hibernate.connection.shutdown true
hibernate.connection.username bonitauser
hibernate.connection.password bonitauser123
-----------------------------------------------------------------------------------------
IMPORTANT: Be sure to remove the line showing hibernate.hbm2ddl.auto.
Otherwise, as per Bonita guide, the migration won't work and you might lose the data in your database.
From the 'D:\BONITA_SETUP\mysql-connector-java-5.1.12 folder',
copy the file 'mysql-connector-java-5.1.12-bin.jar' into
folder 'D:\BONITA_PROCESS\runtime\lib\server'
----------------------------------------------------------
- Create and initialise the databases
----------------------------------------------------------
- Launch 'MySQL command line client'
through Start -> Programs -> MySQL -> MySQL Server 5.1
- It will ask for the password. Enter the password you specified for the
'root' user when MySQL was installed.
- You will the 'mysql>' prompt.
Now, create the databases
- At the prompt type below command and press Enter
create database bonita_core default character set utf8 collate utf8_bin;
You should see 'Query OK,....'
- At the prompt type below command and press Enter
create database bonita_history default character set utf8 collate utf8_bin;
You should see 'Query OK,....'
Now, define a userid to work with bonita
- At the prompt type below command and press Enter
create user 'bonitauser'@'localhost' identified by 'bonitauser123';
You should see 'Query OK,....'
( Here 'bonitauser123' is the password for this user. You may use your own password.
However, in that case, you should replace all occurances of bonitauser123 with
the password you selected )
Now, grant rights to the user
- At the prompt type below command and press Enter
grant all privileges on bonita_core.* to 'bonitauser'@'localhost';
You should see 'Query OK,....'
- At the prompt type below command and press Enter
grant all privileges on bonita_history.* to 'bonitauser'@'localhost';
You should see 'Query OK,....'
Now, initialise the database (create tables, indexes and default data )
- Open a command prompt and change directory to 'D:\BONITA_PROCESS\runtime' folder.
You should see the command window prompt as
C:\bonita_process\runtime>
- Type the command C:\ant_180\bin\ant init-db and press Enter
( Please note that, in an earlier step, We have installed the ANT utility in ant_180 folder )
When asked for 'Which hibernate file to use...'
Type hibernate-configuration:core and press Enter
You will see the progress in the process
At last, you should see 'BUILD SUCCESSFUL'
- Type the command C:\ant_180\bin\ant init-db and press Enter
When asked for 'Which hibernate file to use...'
Type hibernate-configuration:history and press Enter
You will see the progress in the process
At last, you should see 'BUILD SUCCESSFUL'
-----------------------------
- Deploy in Tomcat
-----------------------------
* Copy ALL files
- from C:\BONITA_PROCESS\common-war-lib TO C:\Tomcat_6026\lib
If asked 'Overwrite?', say yes.
- from C:\BONITA_PROCESS\runtime\conf TO C:\Tomcat_6026\conf
If asked 'Overwrite?', say yes.
- from C:\BONITA_PROCESS\runtime\lib\server folder TO C:\Tomcat_6026\lib
If asked 'Overwrite?', say yes.
* Copy ALL files
- from D:\BONITA_PROCESS\wars TO C:\Tomcat_6026\webapps
-----------------------------------------------
- Modify bonita-environment.xml
-----------------------------------------------
* The bonita-environment.xml file copied to Tomcat in the earlier step has
hibernate path refering to C:\BONITA_PROCESS\runtime\conf folder. This we had
done for initilising the database through 'init-db'.
Now, this path to be edited to refer the Tomcat folder.
* From the C:\Tomcat_6026\conf folder,
Edit the bonita-environment.xml file ( I edited by opening in Windows WordPad )
for the hibernate-configuration sections for 'core' and 'history'
--------------------------------------------------------------------------------------------
<!-- Description: Configuration of the Hibernate session factory used by Bonita core. -->
<hibernate-configuration name='hibernate-configuration:core' >
<properties file='C:\Tomcat_6026\conf\hibernate-core.properties' />
<mappings resource='bonita.mappings.hbm.xml' />
<cache-configuration resource='bonita.core.cache.xml' usage='read-write' />
</hibernate-configuration>
<!-- Description: Configuration of the Hibernate session factory used by Bonita history. -->
<hibernate-configuration name='hibernate-configuration:history' >
<properties file='C:\Tomcat_6026\conf\hibernate-history.properties' />
<mappings resource='bonita.mappings.hbm.xml' />
<cache-configuration resource='bonita.history.cache.xml' usage='nonstrict-read-write' />
</hibernate-configuration>
--------------------------------------------------------------------------------------------
* I know this is a duplication and could have done in one go. But, this will avoid
confusions and keep this walkthrough in a step-by-step manner.
-----------------------------
- Start-up Tomcat
-----------------------------
* Open a command prompt and go to C:\Tomcat_6026\bin folder.
- Type bonita.bat and press Enter.
( you have created this batch file in an earlier step )
- Type startup.bat and press Enter.
( This is the Tomcat startup batch file )
Now, you should see another dos prompt window saying 'Tomcat' in title bar.
Tomcat is running now.
* When the Tomcat starts, it will automatically deploy the war files
we have copied.
You can verify this by checking the contents of C:\Tomcat_6026\webapps folder
You should see two new folders 'MyProcess--1.0' and 'Bonita'.
If these are not shown, wait for a few seconds and refresh the
Windows explorer window.
* Verify that Tomcat is running, open Internet explorer and type in
http://101.101.101.101:8080 and press Enter.
( Replace 101.101.101.101 with the IP of the system in which you have installed tomcat
and deployed bonita application just now)
You should see the Tomcat introductory web page.
-----------------------------------------------------------------------------------
- Access Bonita application through your internet browser
-----------------------------------------------------------------------------------
* Open Internet explorer and type in http://101.101.101.101:8080/bonita/ and
press enter.
You should see the Bonita application login page.
* Enter 'admin' in username and 'bpm' in password and press Enter
or click on Login.
( 'admin' is the Bonita default admin user and 'bpm' is the default password )
You should see the Bonita user experience page for user admin.
-----------------------------------------------------------------------------------
- Install the process itself
-----------------------------------------------------------------------------------
* In the user experience window, click on 'Processes'.
(If you are not seeing this, click on '+' sign near to 'Admin')
- Click on 'browse' and select the file 'MyProcess--1.0.bar' from
'Bonita_process' folder. Click 'Save'
- Click on 'Install'. You will see the install process.
If the process is not appearing in the list below 'Select All None' label,
for a few minutes, click on 'Processes' once again.
You should see the process name listed.
* Confirm the Application URL for the process
- Click on 'Settings' given under 'Admin'.
- Click on the 'Applications' tab.
- In the list, you should see the process name. In the text box shown
near the process name will read 'http://......'
In order to make the Process application available from other systems,
replace 'localhost' with the IP of the system (in which Bonita is installed)
----------------------------------------------------
- Access Bonita within the network
----------------------------------------------------
* After the process is installed successfuly, you should be able to access
bonita application within your intranet through URL
http://101.101.101.101:8080/bonita/
( You will have to change the IP according to your setup )
-----------------------------------------------------------
- Adding additional processes
-----------------------------------------------------------
After completing the design of your new process in the studio
- Click on 'Process' and then 'Export...' to generate the BAR file of new process.
- For the save Location, select the 'Bonita_Process' folder created earlier.
Process BAR file will be created in this folder.
- Click on 'Process' and then on 'Export Application' to generate the required
application files of the process.
- UnSelect the 'Export UserXP' and then 'All UserXP'
- SELECT 'Export Runtime'
- UnSelect the 'Extract selected War libraries outside......'
( This time we need only the WAR file for the new process. )
- From the process list below, click on checkbox near to new process to select it
- For the save Location, click on Browse to select the 'Bonita_Process' folder
created earlier.
- Click on 'Export'
- Application ZIP File will be created in the 'Bonita_Process' folder.
- Unzip the file in the same folder. You should get the following folders/file.
- common-war-lib
- conf
- runtime
- wars
- INSTALL.txt
- From the 'wars' folder, copy the WAR file of your new process into the TomCat webapps folder.
( eg: C:\Tomcat_6026\webapps )
- If TomCat is running (or when you start it), WAR application will be
automatically deployed.
- Install the new process BAR file in Bonita as explained in the
'Install the process itself' section.
Now you can start using your new process
------------------------------------------------------
- 7Zip Compress/Decompress utility
------------------------------------------------------
Download from: http://sourceforge.net/projects/sevenzi … i/download
Use the above URL as a direct file downloading link.
Download and install 7zip in your system.
-----------------------------------------------------
- Set Windows Environmental Variables
-----------------------------------------------------
From the 'Desktop' right click on 'My Computer' and in the displayed menu,
click 'Properties'.
From the displayed page, click on 'Advanced' tab.
Click on 'Environment Variables'.
In the 'System Variables' section,
- search for 'JRE_HOME'. If exists, click on that to select it
and then click on 'Delete' button.
- Click on 'New' button. In the 'New System variable' dialog box,
enter 'JAVA_HOME' for variable name and 'C:\Sun\SDK\jdk' for variable value.
- Click on 'OK' to save it.
- Click on 'OK'.
- Click on 'OK'.
In the 'User Variables...' section,
- Click on 'New' button. In the 'New System variable' dialog box,
enter 'PATH' for variable name and 'C:\Sun\SDK\jdk\jre\bin' for variable value.
(If 'PATH' already exists, add the above path at the end of the existing value)
- Click on 'OK' to save it.
- Click on 'OK'.
- Click on 'OK'.
************* END ***************
New Delhi, India.
HP: 91-93505-95711
