Populate select widget from a DB with Bonita Open Solution 6.4.2


hi i'm looking to populate widget from a database just like the tutorial in this link which use the bonita 5.* https://www.youtube.com/watch?v=is6vpnQFq6A thanks a lot


Submitted by yannick.lombardi on Thu, 04/02/2015 - 09:07

I can't see the video because of my company proxy.

To populate a form with a database you need 2 task. In the first one, you add a database connector to select the data you need. In the second task, you use the data that you get to set the initial values in your form.

Submitted by wannes.fedi on Thu, 04/02/2015 - 14:38

i have tried to do this but it doesn't work i have a database called 'produits' i have used mysql connector and when i try to test my query there is an error "java.lang.reflect.InvocationTargetException org.bonitasoft.engine.bpm.connector.ConnectorExecutionException: USERNAME=install | org.bonitasoft.engine.core.connector.exception.SConnectorException: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.ConnectorException: java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver" you can see captures of the steps that i have done in this link http://imgur.com/fK76HBf&QijBN6g&CwClY5C&KNahj4g&aCyPRx1&NcAtgux&celHNTu#0

Submitted by yannick.lombardi on Thu, 04/02/2015 - 14:56

Did you use java 1.8 ? I read here that it doesn't contains theJdbcOdbcDriver class. Bonita BPM doesn't support java 1.8, you need to use java 1.7.

Also the task "select data" needs to be a Service Task with no form if you want to be BPMN compliant.

Submitted by wannes.fedi on Thu, 04/02/2015 - 15:06

yes i'm using java 8 so i have to uninstall it ? and the in the tasks the first step have to be a service task with connector and the second task is human which contains a form . how can i take the data selected in the first step ?

Submitted by yannick.lombardi on Thu, 04/02/2015 - 15:23

You don't need to uninstall it. You just need to install java 1.7 (if you don't have it) and change Bonita configuration. You can change the configuration in "Preferences", choose "Java" and add your java 1.7.

Like this

If the user need to choose a value before the connector, you need to create two distincts task. A first one where he choose the value. A second one where you use the connector. Using data will be your third task.

Submitted by wannes.fedi on Thu, 04/02/2015 - 16:53

thanks i have installed java jre 7 and i have configured bonita on it but the problem still existing just i want in the form that the select widget is completed by a list from my database "produits" in the table "tech" thats all still showing me the error message

No answers yet.