This documentation is about a version that is out of support, here is the latest documentation version.

How about downloading a newer, supported version?

How to install Bonita as a service on Windows

In this tutorial we show how to install Tomcat with Bonita configured as a windows service.

Software needed

For this tutorial you will need the following softwares:

  • Tomcat

  • Bonita deploy Bundle

  • Postgresql Database (or another database supported by Bonita)

Please verify the supported version from the Support page

Download and installation

  • Download apache-tomcat-x.y.exe from Tomcat website:

  • Install apache-tomcat-x.y.exe. From now on we’ll call the installation path as %TOMCAT_INSTALL_FOLDER%

  • Verify that Tomcat is well installed browsing the following URL: http://localhost:8080

Tomcat home page
  • Download the bundle (or for the community edition)

  • Unzip the bundle in a folder that we’ll call: %BONITA_DEPLOY%

  • Move the setup tool %BONITA_DEPLOY%/setup into another folder, for example %TOMCAT_INSTALL_FOLDER%/setup This last step is not mandatory since the setup tool is independent from Tomcat, you can place it wherever you want.

Get the license (In case of Subscription edition)

  • Execute %BONITA_DEPLOY%/request_key_utils/generateRequestKey.bat

  • Use the generated key to get a license from the customer portal. The license shouldn’t be a development license.

  • Move the license file into the folder %TOMCAT_INSTALL_FOLDER%/setup/platform_conf/licenses

Database configuration

  • Configure the file %TOMCAT_INSTALL_FOLDER%/setup/ to point towards the suited database (engine and BDM)

database-properties file
  • Add the database driver here: %TOMCAT_INSTALL_FOLDER%/setup/lib Check your Database provider documentation in order to get the proper driver version.

  • Execute the command "%TOMCAT_INSTALL_FOLDER%/setup/setup.bat init" in order to initialize the Bonita database with the default configuration.

  • Verify that the tables in the engine database are properly created.

database tables

Server configuration

  • Move the folder %BONITA_DEPLOY%/Tomcat-x.y.z/server/lib to %TOMCAT_INSTALL_FOLDER%/lib

  • Add your database driver to %TOMCAT_INSTALL_FOLDER%/lib

  • Move the folder %BONITA_DEPLOY%/Tomcat-x.y.z/server/conf to %TOMCAT_INSTALL_FOLDER%/conf

  • Move the folder %BONITA_DEPLOY%/Tomcat-x.y.z/server/webapps to %TOMCAT_INSTALL_FOLDER%/webapps

  • Configure %TOMCAT_INSTALL_FOLDER%/conf/

bitronix configuration
  • Configure %TOMCAT_INSTALL_FOLDER%/conf/Catalina/localhost/bonita.xml

datasource configuration

Configure JVM properties

  • The file %BONITA_DEPLOY%/Tomcat-x.y.z/server/bin/setenv.bat contains all JVM parameters to use in the new installation.

  • Update this file to change the database provider (for example postgresql).

  • In this file update all the references to %CATALINA_HOME% with %TOMCAT_INSTALL_FOLDER% In this example %TOMCAT_INSTALL_FOLDER% = C:\Program Files\Apache Software Foundation\Tomcat x.y

  • Extract all the JVM properties of the file %BONITA_DEPLOY%/Tomcat-x.y.z/server/bin/setenv.bat

  • The properties should be the following ones:

    • -Dorg.bonitasoft.platform.setup.folder=C:\Program Files\Apache Software Foundation\Tomcat x.y\setup

    • -Dorg.bonitasoft.engine.incident.folder=C:\Program Files\Apache Software Foundation\Tomcat x.y\logs

    • -Dsysprop.bonita.db.vendor=postgres

    • -Dsysprop.bonita.bdm.db.vendor=postgres

    • -Dbtm.root=C:\Program Files\Apache Software Foundation\Tomcat x.y

    •\Program Files\Apache Software Foundation\Tomcat x.y\conf\

    • -Dfile.encoding=UTF-8

All these configurations should be realized in the file %TOMCAT_INSTALL_FOLDER%/bin/TomcatXw.exe (Where X is the Tomcat major version), more precisely in the java tab.

tomcatw configuration
  • Setup %TOMCAT_INSTALL_FOLDER%/bin/Tomcat8w.exe -> Java -> "Initial memory" with a proper value based on your hardware and project requirements.

  • Do the same with "Maximum Memory pool" property. As an example, if your Operating system has 8 GB of ram you could setup Initial Memory Pool = Maximum Memory Pool = 4096.

  • Verify that in the Startup tab the "Mode" property is set to "Jvm".

tomcatw startup tab

System restart and test

  • Restart the Tomcat service to take in account the new updates.

  • Verify that the Bonita portal is available at the following address: http://localhost:8080/bonita

  • Connect with the technical user (default install/install) and do some tests:

    • Add an organization.

    • Assign profiles to users.

    • Deploy a simple process and test its execution.