postgresql bonitasql connection

I’ve moved on - using postgres, stock, in a new, clean 7.2.2 studio

script looks like this:

import groovy.sql.Sql;

def result=[];


Sql sql = BonitaSql.newInstance("jdbc:postgres://172.17.0.2:5432/HFDataProd", "bonita_db_user", "bpm", new org.postgresql.Driver());

Trying to do this as simply and straightforward, stock, out-of-the-box as possible.

Problem is:

Ambiguous method overloading for method groovy.sql.Sql#.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[interface java.sql.Connection]
[interface javax.sql.DataSource]

Can I scream?

Thanks

Sean, I worked on this… new script accesses data properly. Now just to get it where I want it.

import groovy.sql.Sql;
import java.sql.Driver;
def list=;
Sql sql=BonitaSql.newInstance(“jdbc:postgresql://172.17.0.2:5432/HFDataProd”,“bonita_db_user”,“bpm”, new org.postgresql.Driver())
sql.eachRow(“select * from customer”) {
list += it.customerid;
list += it.customer;
list += it.password_open;
list += it.password_encrypted;
list += it.buyfor1;
list += it.buyfor2;
list += it.buyfor3;
list += it.buyfor4;
list += it.buyfor5;
list += it.lastchanged_date;
list += it.created_date;
};
return list;

Thanks

Ford

Your about a 12 hours time-zone differential from me but I’d love to pick your brain…

Soon as possible for me - I’m stuck.

Let me know

Thanks

This is a better way of moving a db table to a BDM:

import myBDM;

//get the data into a resultset from the db of your choice

while(resultset.next()){

myBDM newBDO = new myBDM();
newBDO.setId = resultset.getInt(“Id”);
newBDO.setDescription = resultset.getString(“Description”);
newBDO.setStatus = resultset.getint(“Status”);

}

From a post I forgot about… :slight_smile:

http://community.bonitasoft.com/node/22542#node-22572

regards
Seán

PS: If this reply answers your question, please mark a resolved

Absolutely,

I’ve submitted a bug report. I can’t get it to work either…

https://bonita.atlassian.net/browse/BBPMC-380

regards
Seán

not a problem, 12 hours? That’s a long way - Hawaii?

was being a bit facetious - I’m in Ontario, Canada. Are you available for a call?

Ah only 7 hours…sure we can talk next week I can’t today as I’m off to an Embassy for a well earned beverage. Something that doesn’t happen very often in this country which is dry. Hope that’s OK.

regards

Sean - folder Sean in my shared drive.

https://drive.google.com/open?id=0B7ig1ZvVKJMid3BObkdSYkxkMWM

Got it thanks,

will reply off this forum via LI to ensure confidentiality.

regards

Not a problem,

to help things quickly, can you write something in a word document (or whatever you use) add it to a share somewhere and I will work on it over the weekend.

regards

sent a linkedin request

I’ll put my document together

thanks