Change default database of Bonita 6.5


Hello, I am using bonita 6.5 and I would like to change the organizational database : users , roles , tasks , permissions...(not data) of bonita to my mysql database. I've followed the documentation but then I realised that it's maybe for data and I wonder if that's true ! 1) If it's for data then how can I change the oraginzational DB ? 2) Otherwise , how can bonita "know" that I have users ... in that DB ? And what are the changes that I have to make ? Thanks.


Submitted by Sean McP on Sun, 06/28/2015 - 17:34

What do you want to change in the Org DB?

By the way there isn't one, its Org Tables in the Bonita DB...

In Studio you will have to change the tables in the H2 Database. There are many ways to do this, pick your H2 Database editor....

In portal you would then have to update your chosen database, not necessarily compatible with the definitions in H2...

Before you ask, nope I don't know the tables specifically.

You would then need to create/rebuild portal and Studio to have your specific requirements for defining Users, or Processes that would populate these updated tables.

Note however that with every upgrade you would have to migrate this code every time. This may not be considered optimal use of the system.

You may find it easier to use Custom Fields, which partially work in Community edition...

regards Seán McP

2 answers


Yep, it's clear...

What you have here is the "original" holiday request problem.

Every employee can request a holiday, and Employees managers can approve a holiday request. What happens when a manager requests a holiday? He is both Employee and Manager.

Right then here we go:

Yes this is perfectly possible in BonitaSoft using Actors.

for my example the holiday request...

Step 1 - Actor = Everyone: Everyone asks for a holiday. (Bonita Actor Filter Initiator)

Step 2 - Actor = Employee Manager: The employees manager is the dis/approver of the holiday. (Bonita Actor Filter Initiator-Manager)

this will solve your problem of the User Can Request/User can Approve issue.

You can also create your own Actor Filters for special circumstances such as these.

Hope that solves your problem, regards


The Organization tables for Bonita are stored in the same database as everything else. There is no separate database.

If you installed Bonita first, got it running and then want to change it to mySQL, Bad luck this is not really possible, or at least not easy.

It is much, much easier to do while installing.

Hang-on, what are you installing? If you are installing Studio. NOT POSSIBLE to change the database. Yes that's in capitals for a reason. It is not possible to change the Studio database.

If you are talking about a Tomcat/JBoss Portal Bundle then you can do this by following the instructions here:

These instructions work and work well as I've done it many times.

That answers your direct question re the database - how do i store the database in mySQL.

For the other questions...see comments above...

regards Seán McP


Submitted by KnowledgeSeeker on Sun, 06/28/2015 - 17:52

Thanks for your answer , actually I want to make a database where I can specify conflicting rules in a table , conflicting tasks in another ... So I can enforce constraints on users according to that database , so for example , if a user want to execute 2 tasks that are in the conflicting table , I wouldn't allow that . But I don't know where I am supposed to write these conditions . I am working with community edition and Tomcat bundle .

Submitted by Sean McP on Sun, 06/28/2015 - 17:55

See other question...

Submitted by KnowledgeSeeker on Sun, 06/28/2015 - 18:06

I am not sure I understand it , I think it's studio but I have Tomcat bundle , does this make a sense ?

Submitted by Sean McP on Sun, 06/28/2015 - 19:26

If you are developing processes in it then it is Studio...

The tomcat bundle is for production use after you develop processes etc...

Submitted by Sean McP on Sun, 06/28/2015 - 19:30

What do you mean by

  • if a user want to execute 2 tasks that are in the conflicting table , I wouldn't allow that*

A user can or cannot execute a task based on Role, Manager, Employee etc. or Group as shown in the previous question...

Can you give a specific example of what you want to achieve? I'm sure it is possible using just the normal Organization. I think the question needs to be laid out better...

Possibly a truth table?


Submitted by KnowledgeSeeker on Sun, 06/28/2015 - 22:16

Let's suppose that a user x has both the permission to make a request and to approve it. When we create the process in bonita we can specify ,using the actor filter , that the one who does the approval task has to be the admin of the one who sent the request. X can open a session with the role of making a request , send a request and then switch to the other role and approve it . To prevent this , I thought that I have to use a new database where I have the history of all tasks executed by a user , and a table for conflicting tasks for example in that case , before allowing him to make the second task , I have to do a query in the DB to make sure that he hasn't already done a conflicting task with the one he wants to perform. I hope it's clear now .

Submitted by KnowledgeSeeker on Sun, 06/28/2015 - 23:38

I am using studio , so what would you suggest as an alternative to changing the tables ? Thanks

Submitted by KnowledgeSeeker on Mon, 06/29/2015 - 07:15

Thanks for your answer but I am working on a project where I have to extend the functionalities of access control in bonita . If everytime someone creates a process has to make an actor filter , then I didn't add anything . And about travel request , even if initiator log out and open a new session with manager role , he would be unable to approve the request ?

Submitted by Sean McP on Mon, 06/29/2015 - 11:34

how do you need to extend the functionalities of access control? Not details just a head line to say what you are trying to do...

changing the tables etc. is not the way to go. If you do you will really screw up future upgrades to 7, 8 etc...

The best "Add" is to keep things simple and proceed on to the next issue, not create one so big it becomes a problem...

You also haven't fully understood the concept of how a process interacts with Organization, Actors, Groups and Roles.

A user CANNOT sign in with roles they do not have, you don't sign on with a role, it is assigned in the organization. That's it.

An initiator always has a manager. even the CEO, so he can never approve his own request if the process is defined to be initiator starts and initiator-manager approves...

And that's the thing...the process Actors must be defined properly, if you can't do this then the process is possibly wrong...


Submitted by KnowledgeSeeker on Mon, 06/29/2015 - 14:05

I agree with you but my supervisor in that project is insisting that I must have my own database with the following tables : conflicting roles , conflicting users... and that she has already supervised the same project 2 years ago and the solution was to change the database and that was successful (but she doesn't know how because her speciality is security..). Also I found that topic :

Is it possible because it's an old version ? wasn't it bonita studio ?

Let's make things simple ,if 2 users friends and I want that one cannot approve the request of the other (conflicting users or conflict interest) .If I want to realise that with an actor filter (is it possible ?) .Then everytime , I have to create an actor filter . I think it would be better if I can define all the conflicting users I have in a table , at the administration time .


Submitted by Sean McP on Mon, 06/29/2015 - 14:51

I'll be blunt as no-one else will be...if your supervisor knows about security and doesn't know about Actors, Groups and Roles etc then they need to read a bit more.

Bonita 6/7 security is built on the same security model as that used by Active Directory, if you are using that in house then, then user, operational unit and roles etc will be familiar. This is what Bonita 6/7 security is designed on.

Bonita 5 security is nothing like Bonita 6/7 security and has been completely rewritten from ground up. Actors, Groups and Roles didn't even exist in version 5...that is why you probably had to write your own tables - to implement an Actor, Group, Role function. this is now inbuilt.

I would urge you to get them to review and understand the new security mechanisms first before changing anything within BonitaSoft...

If they are security minded then I would also challenge them on the fact that their Change Management is not up to scratch and that the documentation should be available in house to confirm what you want to do. If they scoped and designed the solution then there has to be documentation for it somewhere...if not then i would ask security why not... :0 The thought of challenging security....oh dear.

Please feel free to share my thoughts by printing this exchange with them. this way you don't get the blame and I do.

Right them, from what you've want to change the database as per the post you've identified.

Like I said before:

If you are installing Studio. NOT POSSIBLE to change the database. Yes that's in capitals for a reason. It is not possible to change the Studio database. However you can use an external database for your business data...

If you are talking about a Tomcat/JBoss Portal Bundle then you can do this by following the instructions here:

These instructions work and work well as I've done it many times.

You can also use this database for your Business data too!

However. If these are process tables and you are not actually changing the login method etc. then they are simply business data tables and you do not need to change the database at all, and you can run he system against Studio or the Tomcat Bundle (production).Just install a separate database and use it to run your connectors against.

This is what I have:

For Development:

x Studio workstations 1 test database = mySQL 1 test database = PostgresQL

All my personal (BUSINESS) tables go into either (or both if my testing requires I test mySQL and PostgreSQL databases).

In my process I read a file that says useMySQL or usePostgreSQL and it reads the appropriate database with the right SQL, I'm trying to get Hibernate working for ease of use... :)

In production I have:

1 x Tomcat bundle (usually based on PostgreSQL in my case for Bonita) 1 production database = whatever I need

I transfer the tables from Devel to Prod and then transfer the process...

Everything works.

But seriously I don't understand what security want that the current (new) security system can't already do. People, Roles and Responsibilities...all covered.

If Security want to reply, no problem, I'll try to help. But v5 is very different from 6. They need to understand that and using Actor, and Actor Filters is a much easier method of implementing what they had (conflict tables and self built rules).

We saw that with the Travel Request example previously given...once you set the correct actors for a task then that's it. No need to change anything. Just assign people to that Actor and viola, everything in order.