AnsweredAssumed Answered

Passing parameter in XOG header in a process

Question asked by Veena_Ch on Jun 8, 2017
Latest reply on Jun 8, 2017 by Veena_Ch

This is the first time I am writing the Parameterized Gel script. I need to write a process to update an attribute in Team for both Otherwork and Project. The process is failing for "Otherwork". Can you please help?

Query which is returning ObjectType as either 'otherInvestment' or Project

Data Source Query - 

 

SELECT
DISTINCT
inv.code
, inv.id
,case when odf_object_code='other' then 'otherInvestment' else 'project' end as type
FROM PRTEAM team
JOIN INV_INVESTMENTS inv on inv.id = team.prprojectid
LEFT JOIN inv_projects invproj on invproj.prid = inv.id and invproj.is_template = 0
LEFT JOIN prj_resources res on res.prid = team.prresourceid
LEFT JOIN SRM_RESOURCES srm on srm.id = team.prresourceid
WHERE
inv.odf_object_code IN ('project','other') AND
res.prisrole = 0 and inv.is_active=1
and inv.id not in (select prl.prrecordid from prlock prl where prl.prtablename = 'SRM_PROJECTS')
and resource_type is not null
and resource_type=0

 

Variable declared - 

<core:set value="${project_info_rows.type}" var="OBJ_TYPE"/>

 

 

<Header action="read" externalSource="NIKU" objectType="${OBJ_TYPE}" version="6.0.11">

 

Project Read failed for "Other work" when I run the process

Project Read XOG Status for gap_Infra_Net : FAILURE

 

Read Script - 

<gel:parse var="prj_read">
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
<Header action="read" externalSource="NIKU" objectType="${OBJ_TYPE}" version="6.0.11">
<args name="order_by_1" value="name"/>
<args name="order_by_2" value="projectID"/>
<args name="include_tasks" value="false"/>
<args name="include_dependencies" value="false"/>
<args name="include_subprojects" value="false"/>
<args name="include_resources" value="true"/>
<args name="include_baselines" value="false"/>
<args name="include_allocations" value="true"/>
<args name="include_estimates" value="false"/>
<args name="include_actuals" value="false"/>
<args name="include_custom" value="false"/>
<args name="include_burdening" value="false"/>
</Header>
<Query>
<Filter criteria="EQUALS" name="projectID">${INV_CODE}</Filter>
</Query>

Outcomes