AnsweredAssumed Answered

Script Problems

Question asked by davidesky on Apr 17, 2012
Latest reply on Apr 17, 2012 by Dave
Good Morning,

We have created this scripts and when we validated them on Sql we have no problems, but when we try to insert them in a process we have an error...
Which is the error?

<gel:script xmlns:core="jelly:core"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="jelly:sql" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<gel:setDataSource dbId="niku"/>
<core:set value="${gel_objectInstanceId}" var="ideaID"/>
<sql:update>
update odf_ca_idea
set confronto_start=idea_start_period,
idea_st_per_date = substr(idea_start_period,7,2) || '-' ||substr(idea_start_period,1,3) || '-01'
where id=${ideaID}
and idea_start_period is not null
</sql:update>
</gel:script>

<gel:script xmlns:core="jelly:core"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="jelly:sql" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<gel:setDataSource dbId="niku"/>
<core:set value="${gel_objectInstanceId}" var="ideaID"/>
<sql:update>
update inv_investments q
set q.schedule_start=(select b.idea_st_per_date
from odf_ca_idea b
where q.id=b.id)
where q.id=${ideaID}
</sql:update>
</gel:script>

<gel:script xmlns:core="jelly:core"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="jelly:sql" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<gel:setDataSource dbId="niku"/>
<core:set value="${gel_objectInstanceId}" var="ideaID"/>
<sql:update>
update inv_investments q
set q.schedule_start=(select to_date('b.idea_st_per_date','yy-mon-dd')
from odf_ca_idea b
where q.id=b.id)
where q.id=${ideaID}
</sql:update>
</gel:script>

Thanks and Regards

Outcomes