AnsweredAssumed Answered

Gel Script BPM-0704: An error occurred while executing custom script

Question asked by Garrett-S on May 25, 2018
Latest reply on May 30, 2018 by roland.parrotte

We have process with a step that includes a gel script that is supposed to:

1. Copy the % value from the custom % Complete field on the Status report object to the % Complete field on the Project object.

2. Copy the date from the OOTB Report Date field on the Status Report object to the As of Date field on the Project Object.

 

When we run the process, it errors at this gel script.  We can't seem to figure out what this issue is.

 

BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:6:29: <sql:update> UPDATE INV_PROJECTS SET PERCENT_COMPLETE = (select msu_sr_per_complete FROM odf_ca_cop_prj_statusrpt where id = 5061043), prAsOf = (select cop_report_date FROM odf_ca_cop_prj_statusrpt where id = 5061043) where id = (select odf_parent_id FROM odf_ca_cop_prj_statusrpt where id = 5061043): [CA Clarity][Oracle JDBC Driver][Oracle]ORA-00904: "ID": invalid identifier 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:67) at com.niku.union.gel.GELController.invoke(GELController.java:74) at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:207) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLSyntaxErrorException: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-00904: "ID": invalid identifier at com.ca.clarity.jdbc.oraclebase.ddcr.b(Unknown Source) at com.ca.clarity.jdbc.oraclebase.ddcr.a(Unknown Source) at com.ca.clarity.jdbc.oraclebase.ddcq.b(Unknown Source) at com.ca.clarity.jdbc.oraclebase.ddcq.a(Unknown Source) at com.ca.clarity.jdbc.oracle.ddam.t(Unknown Source) at com.ca.clarity.jdbc.oraclebase.dde3.y(Unknown Source) at com.ca.clarity.jdbc.oraclebase.dde3._(Unknown Source) at com.ca.clarity.jdbc.oraclebase.dde3.executeUpdate(Unknown Source) at com.ca.clarity.jdbc.oraclebase.dde5.executeUpdate(Unknown Source) at sun.reflect.GeneratedMethodAccessor338.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:68) at org.logicalcobwebs.cglib.proxy.Proxy$ProxyImpl$$EnhancerByCGLIB$$63c8359c.executeUpdate(<generated>) at org.apache.commons.jelly.tags.sql.UpdateTag.doTag(UpdateTag.java:103) ... 11 more Root cause java.sql.SQLSyntaxErrorException: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-00904: "ID": invalid identifier at com.ca.clarity.jdbc.oraclebase.ddcr.b(Unknown Source) at com.ca.clarity.jdbc.oraclebase.ddcr.a(Unknown Source) at com.ca.clarity.jdbc.oraclebase.ddcq.b(Unknown Source) at com.ca.clarity.jdbc.oraclebase.ddcq.a(Unknown Source) at com.ca.clarity.jdbc.oracle.ddam.t(Unknown Source) at com.ca.clarity.jdbc.oraclebase.dde3.y(Unknown Source) at com.ca.clarity.jdbc.oraclebase.dde3._(Unknown Source) at com.ca.clarity.jdbc.oraclebase.dde3.executeUpdate(Unknown Source) at com.ca.clarity.jdbc.oraclebase.dde5.executeUpdate(Unknown Source) at sun.reflect.GeneratedMethodAccessor338.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:68) at org.logicalcobwebs.cglib.proxy.Proxy$ProxyImpl$$EnhancerByCGLIB$$63c8359c.executeUpdate(<generated>) at org.apache.commons.jelly.tags.sql.UpdateTag.doTag(UpdateTag.java:103) 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:67) at com.niku.union.gel.GELController.invoke(GELController.java...

 

 

Here's the Gel Script:

 

<gel:script xmlns:core="jelly:core" xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary" xmlns:sql="jelly:sql"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<core:set value="${gel_thisstatus}" var="objID"/>
<gel:log level="info" message="Object ID: ${objID}"/>
<gel:setDataSource dbId="niku"/>
<sql:update var="results">

UPDATE INV_PROJECTS

SET PERCENT_COMPLETE =
(select msu_sr_per_complete
FROM odf_ca_cop_prj_statusrpt
where id = ${objID}),

prAsOf =
(select cop_report_date
FROM odf_ca_cop_prj_statusrpt
where id = ${objID})

where id =
(select odf_parent_id
FROM odf_ca_cop_prj_statusrpt
where id = ${objID})

</sql:update>
</gel:script>

Outcomes