postgresql bonitasql connection

1
0
-1

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

Comments

Submitted by Sean McP on Fri, 04/29/2016 - 15:18

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

3 answers

1
0
-1

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... :)

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

regards
Seán

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

1
0
-1

Soon as possible for me - I'm stuck.

Let me know

Thanks

Comments

Submitted by Sean McP on Fri, 04/29/2016 - 17:28

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

Submitted by ford.clancy on Fri, 04/29/2016 - 17:44

sent a linkedin request

I'll put my document together

thanks

1
0
-1

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...

Comments

Submitted by Sean McP on Fri, 04/29/2016 - 16:35

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

Submitted by ford.clancy on Fri, 04/29/2016 - 16:47

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

Submitted by Sean McP on Fri, 04/29/2016 - 16:52

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

Submitted by ford.clancy on Sat, 04/30/2016 - 05:47
Submitted by Sean McP on Sat, 04/30/2016 - 06:39

Got it thanks,

will reply off this forum via LI to ensure confidentiality.

regards

Notifications