enesh

GEL script object is null?

Discussion created by enesh on Oct 26, 2010
Latest reply on Oct 27, 2010 by fpena
Hi,
I'm trying to learn GEL scripting and just for test trying to make some sort of "Hello world".
So, in a process I have a new action "run custom script" and it's the following script:

<gel:script xmlns:core="jelly:core" xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:sql="jelly:sql">
<gel:setDataSource dbId="Niku"/>

<sql:update>
insert into test..test (ProcessID) values (${gel_objectInstanceID})
</sql:update>
</gel:script>

Unfortunately, I get following error message:

BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:6:13: <sql:update> insert into test..test (ProcessID) values (): [CA Clarity][SQLServer JDBC Driver][SQLServer]Incorrect syntax near ')'. at org.apache.commons.jelly.tags.sql.UpdateTag.doTag(UpdateTag.java:116) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) at com.niku.union.gel.tags.ScriptTag.doTag(ScriptTag.java:20) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) at com.niku.union.gel.GELScript.run(GELScript.java:80) at com.niku.union.gel.GELController.invoke(GELController.java:20) at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727) at java.lang.Thread.run(Thread.java:595) Caused by: java.sql.SQLException: [CA Clarity][SQLServer JDBC Driver][SQLServer]Incorrect syntax near ')'. at com.ca.clarity.jdbc.base.BaseExceptions.createException(Unknown Source) at com.ca.clarity.jdbc.base.BaseExceptions.getException(Unknown Source) at com.ca.clarity.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source) at com.ca.clarity.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source) at com.ca.clarity.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source) at com.ca.clarity.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source) at com.ca.clarity.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source) at com.ca.clarity.jdbc.base.BaseStatement.postImplExecute(Unknown Source) at com.ca.clarity.jdbc.base.BaseStatement.commonExecute(Unknown Source) at com.ca.clarity.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source) at com.ca.clarity.jdbc.base.BaseStatement.executeUpdate(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:68) at org.logicalcobwebs.cglib.proxy.Proxy$ProxyImpl$$EnhancerByCGLIB$$ece0275d.executeUpdate(<generated>) at org.apache.commons.jelly.tags.sql.UpdateTag.doTag(UpdateTag.java:103) ... 10 more Root cause java.sql.SQLException: [CA Clarity][SQLServer JDBC Driver][SQLServer]Incorrect syntax near ')'. at com.ca.clarity.jdbc.base.BaseExceptions.createException(Unknown Source) at com.ca.clarity.jdbc.base.BaseExceptions.getException(Unknown Source) at com.ca.clarity.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source) at com.ca.clarity.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source) at com.ca.clarity.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source) at com.ca.clarity.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source) at com.ca.clarity.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source) at com.ca.clarity.jdbc.base.BaseStatement.postImplExecute(Unknown Source) at com.ca.clarity.jdbc.base.BaseStatement.commonExecute(Unknown Source) at com.ca.clarity.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source) at com.ca.clarity.jdbc.base.BaseStatement.executeUpdate(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:68) at org.logicalcobwebs.cglib.proxy.Proxy$ProxyImpl$$EnhancerByCGLIB$$ece0275d.executeUpdate(<generated>) at org.apache.commons.jelly....

What am I doing wrong?

Outcomes