Hi all,
I'm working with CA PPM 14.3, trying to write a custom script to use within a workflow process that will allow me to update the Investment's "Status Indicator" field based on a custom "Lookup - Number" attribute on the Status Report subobject. I have the process set up, and it appears to trigger correctly from the Status Report update. However, the script is not outputting any of my messages, and does not appear to commit the UPDATE statement.
Pretty much flying blind into GEL scripting, I have no experience other than using a few examples found here.
Here's the full script:
<gel:script xmlns:core="jelly.core"
xmlns:gel="jelly.com.niku.union.gel.GELTagLibrary"
xmlns:sql="jelly.sql">
<gel:setDataSource dbId="niku"/>
<core:catch var="sqlException">
<sql:update>
<![CDATA[
UPDATE inv
set inv.status_indicator = sr.abt_advert_status
FROM inv_investments inv
INNER JOIN odf_ca_cop_prj_statusrpt sr
ON inv.id = sr.odf_parent_id
INNER JOIN odf_ca_project prj
ON inv.id = prj.id
INNER JOIN cop_prj_statusrpt_latest_v late
ON late.investment_id = inv.id
WHERE inv.id = ?
AND report_order = 1
]]>
<sql:param value="${gel_objectInstanceId}" />
<gel:log category="XML" level="INFO">Object Instance Id: "${gel_objectInstanceId}"</gel:log>
</sql:update>
</core:catch>
<core:if test="${!empty sqlException}">
<gel:log category="XML" level="INFO">SQL Exception: "${sqlException}"</gel:log>
</core:if>
</gel:script>
Any guidance is extremely appreciated!
Thanks,
Melissa