How to use MYSQL connector in BonitaSoft?

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)

Choose Database

  • Name the connector and give it a description

Give name of connector

  • 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))

Give Database name, username and password

  • Click on Next button and define the query.
  • Test the configuration by clicking on the Test configuration button

Define Query

  • Click Next and give the variable name to store the result.

Output variable and function used

  • Click on Finish button.

RowSet methods

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:

List<List<Object>> getValues()

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.

About Priyanka Kapoor

Simple, Hardworking & friendly.....
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to How to use MYSQL connector in BonitaSoft?

  1. Tushar says:

    Thanks a lot

  2. Max says:

    Priyanka. Nice post.

    So does toList(1).get(0) mean list 1 column 0?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s