Page 1 of 1

Custom Task and Rowset

Posted: Tue Feb 23, 2016 10:48 am
by gfrench
I'm struggling to set a rowset in Custom Task. I have a jdbc resultset rs

project.createOrReplaceVariable("db.rows", rs.getString(1)));

I get:- The value must be a Collection or a Rowset, but found 'java.lang.String'

project.createOrReplaceVariable("db.rows", rs);

gives me: -The value must be a Collection or a Rowset, but found 'oracle.jdbc.driver.OracleResultSetImpl'

Any clues or help appreciated on how to translate an rs to db.rows?

Thanks

Re: Custom Task and Rowset

Posted: Thu Mar 03, 2016 1:27 pm
by Support_Rick
gFrench,

The forum is not usually a place for support on Custom Tasks. It's about general usage of the product.

This is a business specific issue which would be a billable service or training.

Please contact our Support Desk for additional guidance at [email protected].

Thanks!

Re: Custom Task and Rowset

Posted: Fri Mar 04, 2016 4:48 am
by gfrench
Hi,

I was hoping the community could help where Linoma can not. That is one of the reasons for having a forum is it not?

As for "general usage of the product", do you mean this forum is just for the most popular parts of the product?

Building a custom task is part of the product. There are features like "install custom task" under the System menu in MFT and there is a product manual "Go Anywhere MFT Custom Task Guide", so although maybe less used its still part of the product and the use base can help. There are already posts on the beanInfo.xml which where useful.

I've actual fixed the issue now. Its a case of using a string array to return the results out of the custom task, then the variable can be used in a "forItem" loop.

ArrayList<String[]> resultSet = new ArrayList<String[]>();
resultSet.add("Hello World);
resultSet.add("Goodbye Planet");
project.createOrReplaceVariable(resultVariableAttribute, resultSet);

I hope that helps anyone else who stumbles on this forum.

Thanks

Re: Custom Task and Rowset

Posted: Fri Mar 04, 2016 10:56 am
by Support_Rick
You are absolutely correct, and that's why we approved this for the community ... in case someone has options or suggestions that can help, they are more than welcome to reply!

My apologies if it appeared we weren't going to support the product, we just have to make a determination between product support and specific business need.

Thank you for the reply!