Dear members of the Group;
Please I need you to help me with the following problem I am doing a select to a table in oracle, but I get the following error when testing:
java.lang.reflect.InvocationTargetException
org.bonitasoft.engine.bpm.connector.ConnectorExecutionException: org.bonitasoft.engine.core.operation.exception.SOperationExecutionException: org.bonitasoft.engine.expression.exception.SInvalidExpressionException: Declared return type is not compatible class java.lang.Integer EVALUATED with type java.math.BigDecimal class for expression estado_resultset
Thanks in advance,
Hi San,
Seems that you are trying to put a BigDecimal (that oracle returns) into an Integer variable. You didn’t posted your code, however, in your groovy code (assuming that exists one), you should set a .toInteger() to your value before it enters the groovy variable.
Something like
sql.sqleachRow “select my_number from my table”, {my_variable += my_number.toInteger()}
return my_variable
Hope it gets you a light about your problem.
Apology not clear to the solution, I have a select count (*) as counter from table, as I can do to capture the value (counter).
Regards,
Sorry, but I can not get the number of result grovvy my code in the query is:
def result
sql.sqleachRow “select count (*) as id from mc_insumos”, {result + = id.toInteger ()}
return result
But I get the error: there is much in this line markers, sql can not be resolved and can lead to errors at runtime
Thanks