Follow the following steps to do it:
Start by clicking on a step where the connector is to be added.
Go to the Details Panel > General > Connectors
Click the Add button to open the Connector Wizard
In the list of Connectors, expand Database
Select MySQL– Execute a query on a MySQL DB (or any other connector appropriate to your database type)
Name the connector and give it a description
Select the event use to trigger the connection execution (e.g. Finish by default)
Define the settings for the database (i.e. Database, Username, Password, Hostname and Port (default: 3306))
- Click on Next button and define the query.
- Test the configuration by clicking on the Test configuration button
- Click Next and give the variable name to store the result.
Click on Finish button.
Note: the RowSet class is specific to Bonita Open Source and is not the same as a Java RowSet. The Bonitasoft Rowset is Serializable, whereas Java Rowset is not.
Here is a list of public methods provided by the RowSet class:
returns the values of a SELECT query as a list of list. First list includes one entry for each row result, for each entry in the first list another list is associated with value for each column.
List<Object> toList(String columnName)
returns the list of values for a specific column.
rowSet.toList(1).get(0) will get a single value from database and it will also without [] brackets.