Select a table in oracle

1
0
-1

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,

Comments

Submitted by santillanh on Sat, 04/12/2014 - 05:39

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,

Submitted by santillanh on Mon, 04/21/2014 - 17:28

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

1 answer

1
0
-1

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.

Notifications