Starting with Bonita, database and tutorial


Hi everyone,

I have to say I read a few (bonita documentation, tutorials, videos...) but I am still not sure I clearly understood the functioning.
It looks like most of tutorial (videos) I am interested in use Bonita 5 or 6. Tutorials about Bonita 7 often talk about dummy data or Json but rarely against a database.

According to the Bonita BPM 7.0 getting started documentation:

  • design application pages (with dummy data)
  • create the data model
  • create the process definition (diagram, business variables, contracts, business objects)
  • create forms
  • build the application

Ok, but if you already have business data :
- do you have to use the zip package version and modify the ?
- do you have to follow these steps : ?
- do you always have to use the 'business data model' ?
- do you always have to create a 'context' variable in the UI Designer ?

Sorry if my questions are simple but more I read and more questions I have ;-)
I see all the potential of the solution, thanks to help me get off on the right foot !


ps : I read french if it is easier to answer

1 answer


Use of Business Data Model (BDM) is not mandatory. One of the advantage of using BDM is that it is well integrated with Bonita components. For example Bonita REST API allow a user interface created with the Bonita UI Designer to access and update the data easily.

As you already have data you have two main options:

  • Define a data model using the BDM that it the sames as your current database and migrate the data. That can be achieved by a process that will get the data from your existing database using a connector and use operation on tasks to store the object in the BDM. An alternative would be to insert directly data in the BDM database tables. PERSISTENCEID column in BDM is auto-incremented and PERSISTENCEVERSION value is always 0 in current Bonita version.
  • If migrating data to the BDM is not an option using you will have to use a REST API extension (e.g. rest-api-sql-data-source). The page or form created with the Bonita UI Designer will call the REST API extension and the extension will call your database and return the data. To update the data the page or form send the data to the process using process or task contract. You can then use contract value when running a database connector to send the data to your database.

It is currently not supported to "plug" the BDM on an existing database with some data. So modify the to use your existing database is not a valid option.

When you create a form from a task in the Studio the 'context' variable should be automatically created for you. If you manually create the form using the UI Designer you can define it manually. Note that context variable does not exist for process instantiation form (form used to start a process instance) as the instance is not yet created so we don't have any context information. Context variable also does not exist when you create applications pages as pages are independent of process instances.

Hope that can help.


Submitted by yann.goff on Fri, 09/14/2018 - 17:10

Thanks a lot for your answer Antoine. I did'nt find the time to experiment your proposals but I'll do next week and will give you a real answer.
Bon week-end