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.