Full Open Source setup of Bonita Open Solution - Part 1: Studio
This tutorial is about how to set up Bonita Open Solution on a full Open Source stack, beginning with the installation of Bonita Studio through running a process on the production server. We will use:
- Ubuntu Desktop and Server 12.04 LTS,
- OpenJDK 6 ,
- PostgreSQL 9.1,
- Tomcat 6, and of course,
- the Open Source version of Bonita Open Solution (BOS) 5.10, all in 64 bits.
This tutorial is aimed for beginners, but you will need to have Ubuntu installed and have basic knowledge about using terminals. This first post is about installing BOS 5.10: Bonita Studio. The second part is about installing a basic production server.
To get Bonita Studio working, you will need to have a Java machine. The purpose of this tutorial is to use Open Source software everywhere possible, so we will use OpenJDK. Open a terminal and run:
- sudo apt-get install openjdk-6-jdk
As always when using "sudo", the system will ask for your password. If your system has more than one version of Java, configure which one your system uses by entering the following command in a terminal window:
- sudo update-alternatives --config java
This will present you with a selection that looks similar to the following (the details may differ for you):
- There are 2 choices for the alternative java (providing /usr/bin/java).
- Selection Path Priority Status
- * 0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 auto mode
- 1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
- 2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1051 manual mode
- Press enter to keep the current choice[*], or type selection number: 1
BOS 5.10 should work well with OpenJDK 6.
Download and install Bonita Studio
Go to http://www.bonitasoft.com/products/download/bonita-open-solution-32-or-64-bits-systems-2 If you want, you can register for free on the BonitaSoft corporate website (this is not compulsory). Yur download should start automatically. This package includes both the 32 bits and 64 bits versions of BOS. Once downloaded, just extract BOS in your home directory. In Ubuntu, you can do that simply with a right click on the archive, then choose "Extract here". It is done.
Start Bonita Studio
Open the BOS-5.10 directory with the File Manager, and right click on BonitaStudio.sh. Choose "Properties". In "Permissions", check "Allow executing file as a program".
To start Bonita Studio, double click on "BonitaStudio.sh". Choose "Run" if you have to choose an action for executing this file. Bonita Studio should start.
Remember that when you start using BOS 5.10, don't move its directory. If you do, you will lose your workspace.
Create a shortcut in the menu
Instead of starting BOS Studio with the BonitaStudio.sh file, you can create a launcher in the menu. Using the "Alacarte" menu editor, it should work in Unity, and in other desktop environments as well. First, install "Alacarte":
- sudo apt-get install alacarte
Then, in the application menu, look for "Alacarte" and start it. Select "Programming" section, or another section of your choice, then click on "New item". On the "Create Launcher" window, fill in the following information:
- Type: Application
- Name: Bonita Studio 5.10
- Command: click on "Browse" and go in ~/BOS-5.10/, select "BonitaStudio.sh"
- Comment: can be empty
- Logo: click on the logo, and go in ~/BOS-5.10/studio/, select "icon.xpm"
Then click OK. The menu item is created. You should be able to find it in your menu.
Access Welcome Screen
If you have already used Bonita Studio on Windows, you know there is a useful Welcome screen. On Ubuntu 12.04 LTS it is missing. Bonita Studio needs a version of XulRunner that is not available in the repositories.
To fix that, we will get packages from Debian. Get the three packages below using your local mirror when possible:
Then copy them into your BOS-5.10 directory. Once this is done, open a terminal and follow the steps:
- cd ~/BOS-5.10<br />
- sudo dpkg -i xulrunner-1.9.1_22.214.171.124-20_amd64.deb libhunspell-1.2-0_1.2.11-1_amd64.deb libmozjs2d_126.96.36.199-20_amd64.deb<br />
- sudo apt-get -f install
If you get dependency errors, "sudo apt-get -f install" will fix them and finish the installation of the packages. If you start Bonita Studio now, you should see the Welcome screen.
Test a Process
We need a process to test that everything is working well. Try using one of the processes packaged with BOS. On the Welcome screen, in the "Design" section, choose the "Buy a Mini" example. Once it is open, click on "Run" in the Studio menu. It should open your default Internet browser and start the process with the first form: "Choose a car".
If you can play with the "Buy a Mini" process, it means that Bonita Studio is working. You can now start developing your processes.
Are you having problems installing and running BOS 5.10? You can get support from the community on the forum: http://www.bonitasoft.org/forum/ You will find the log in "~/BOS-5.10/studio/workspace/.metadata/". There are two relevant files:
- "engine.log", the log file of the embeded engine in the Studio, to test yoru processes;
- ".log", the log file of the Studio itself.
Don't forget to provide their content on your forum post.
And of course, as always, we welcome your comments and ideas for other tutorials!