Decision table


I asking about the possibility of making script lines in the decision table for making a transition or it is only a comparison test?
if yes, can I, in the groovy script, make controls on information of organisation actors (country, job,..) and also access to data in MySQL database?

1 answer


Actually when defining decisions tables you have the option to use Groovy Script.

But based on what you are trying to achieve I would rather create a custom connector that use Bonita Engine APIs and also a data source to get information from your external MySQL database and provide as output maybe a set of boolean describing which transition(s) should be taken (or maybe code that on an integer).


Submitted by asmahassani on Wed, 01/30/2019 - 21:01

thank you for your reply,
for my case, after a Xor gateway I have three activities.
the transition to these activities are dynamic and according to some information (information of the actor who runs the instance and other data).
so the transition is based on the control over this information if it is satisfied the transition will be taken, if no other transition is taken.
I don't understand the idea to do a connector for that purpose if the decision table will meet the need.

Submitted by antoine.mottier on Mon, 02/11/2019 - 11:00

If all information are available in Bonita (actor who runs the instance, business data values...) you don't need to create a custom connector. A Groovy script in the transition condition or in the descision table should do the job just fine.

Submitted by asmahassani on Thu, 02/14/2019 - 14:49


some information is retrieved from the organization, for each actor I detect his age and his job title.

after that, I retrieve from an association rule base (MySQL) that if age has a specific value as well as the job title, another data has a specific value. according to this value, I guide the actor to the activity with the same data value. (sorry if the idea is not clear but I make it as much as simple).

so I don't how to proceed to do that.

first, i should import that:

import groovy.sql.Sql
import org.bonitasoft.engine.identity.User;
import org.bonitasoft.engine.identity.UserCriterion;

I'm soo newbie with groovy and the Bonita script.

Submitted by antoine.mottier on Mon, 02/25/2019 - 18:21

Based on the information (age, job title, information in the MySQL database) do you want to:

  1. assign one task to an appropriate user
  2. or based on the same information you want the process to go to different tasks?

For 1. you want to create a custom actor filter, for 2. you want to create a custom connector.

Basically for both you need to know Java language. Are you familiar with Java? If yes you can start creating actor filters or connectors directly from the Studio.

Submitted by asmahassani on Tue, 02/26/2019 - 12:43

it is the second point!! based on some information I want the process to go to different tasks (after an Xor Gateway).

I'm not good at java. have you any directions to begin with or some ideas to create a connector with this objectif?

Submitted by antoine.mottier on Tue, 02/26/2019 - 14:33

Connector can be created from Studio ("Development" menu "Connectors"). You need first to create a connector definition then you will create a connector implementation based on the definition.

As a connector is a piece of Java code you need to have Java knowledge in order to create one. As you plan to connect with a database you also need to have some knowledge about JDBC.

As you don't have knowledge in Java I can only recommend to get in touch with Bonita professional services or one of our partners.