Get information from a SQL Data Base and insert it into Bonita h2 DataBase automatically
Hi everyone, what i need to do is to get information from an external Data base in SQL and with an atuomatic Task, get that info and insert it in bonita h2 data base.
This is what i have:
SQL EXPRESS 2008 Data Base:
I create an automatic task that runs a connector to the SQL getting the information and insterting it in a ProcessVariable of type ImportsBO, but when i run a query to ImportsBO, it comes empty.
No because you've not shown us any code...it might just help a little... :)
I think what you need is:
On the SQL Connector in the dialog box "Output Operations" select Scripting Mode.
Click the Pencil
Change the return type to Boolean // just because
add a piece of Groovy to do something like the following (not complete, not tested):
myBDM newBDO = new myBDM();
newBDO.setId = resultset.getInt("Id");
newBDO.setDescription = resultset.getString("Description");
newBDO.setStatus = resultset.getint("Status");
PS: If this reply answers your question, please mark a resolved