providedscrips unable to resolve in bonita 6.3 connector scripts

1
0
-1

Hi,

I am writing a connector script in bonita 6.3. In the script editor, I am getting message "providedscripts unable to resolve". Tried to use "import providedscripts.BonitaSql.*;". But still facing problem.

Any help will be apreciated.

Thanks, Bhushan

Comments

Submitted by enrico.curiotto on Fri, 06/13/2014 - 18:03

Hi, can you please provide the groovy script to reproduce the issue? where do you get the error, on the log file or inside the groovy script? Thanks

1 answer

1
0
-1

It seems there is no need to import it. You can refer directly to BonitaSql.

I have used the Groovy script below to populate a dropdown and it works fine:

import groovy.sql.Sql;
def host = "localhost";
def port = "3306";
def user = "bonita";
def pass = "password";
def schema = "switcher";
def query = "SELECT CU_CCC FROM CUENTAS,TITULARES_CUENTA,CLIENTES where CL_NIF ='${sNIF}' AND CL_ID_CLIENTE = TC_ID_CLIENTE AND TC_ID_CUENTA = CU_ID_CUENTA";
def list=[];
def sql = BonitaSql.newInstance("jdbc:mysql://${host}:${port}/${schema}",user, pass, new com.mysql.jdbc.Driver());
sql.eachRow(query,{row-> list.add(row.CU_CCC)});
return list;

Hope this helps

Notifications