Xog-in fails when trying to update task with custom parameterized MVL attribute
search cancel

Xog-in fails when trying to update task with custom parameterized MVL attribute

book

Article ID: 215798

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

The parameterized Multi-Value Lookup (MVL) attribute of the Task object is not updated by XOG.
The xog-in fails with the following error message:

<ErrorInformation>
<Severity>FATAL</Severity>
<Description>Project Object update failed</Description>
<Exception><![CDATA[
java.lang.NullPointerException
at com.niku.odf.object.xbl.XOGCustomObjectInstanceHandler.populateColumnValuesToObjectInstance

Steps to Reproduce:

  1. Define a custom Parameterized lookup as below.

    Select
    @SELECT:VAL.TID:[email protected],
    @SELECT:VAL.TASK_NAME:[email protected],
    @SELECT:VAL.PROJECT_CODE || '--' || VAL.TASK_NAME:[email protected],
    @SELECT:VAL.TASK_ID:[email protected],
    @SELECT:VAL.PROJECT_CODE:[email protected]
    from 
    (
    SELECT TASK.PRID TID, TASK.PRNAME TASK_NAME, TASK.PREXTERNALID TASK_ID, INV.CODE PROJECT_CODE
    FROM INV_INVESTMENTS INV
    INNER JOIN PRTASK TASK ON INV.ID=TASK.PRPROJECTID 
    INNER JOIN ODF_CA_TASK ODF ON TASK.PRID=ODF.ID
    WHERE INV.ID in (select hier.parent_id from inv_flat_hierarchies hier 
                                   where hier.child_id = @WHERE:PARAM:USER_DEF:INTEGER:[email protected])
         AND TASK.prIsMilestone=1
         AND TASK.PRID != @WHERE:PARAM:USER_DEF:INTEGER:[email protected] 
    ) VAL
    WHERE (1=1)
    and @[email protected]
    ORDER BY VAL.PROJECT_CODE ASC

  2. Create a multi-valued lookup on the Task object with the above lookup.
  3. Execute a xogout Task instance. It works fine.
  4. Execute a xog-in task instance that is created by the above step without any changes.

Results: It will fail with a FATAL error.

Environment

Release : All Supported

Component :  XML OPEN GATEWAY (XOG)

Resolution

Change != to subquery (example below), then both xog-out and xog-in will work as expected


Select
@SELECT:VAL.TID:[email protected],
@SELECT:VAL.TASK_NAME:[email protected],
@SELECT:VAL.PROJECT_CODE || '--' || VAL.TASK_NAME:[email protected],
@SELECT:VAL.TASK_ID:[email protected],
@SELECT:VAL.PROJECT_CODE:[email protected]
from  
(
SELECT TASK.PRID TID, TASK.PRNAME TASK_NAME, TASK.PREXTERNALID TASK_ID, INV.CODE PROJECT_CODE
FROM INV_INVESTMENTS INV
INNER JOIN PRTASK TASK ON INV.ID=TASK.PRPROJECTID
INNER JOIN ODF_CA_TASK ODF ON TASK.PRID=ODF.ID
WHERE INV.ID in (select hier.parent_id from inv_flat_hierarchies hier 
                               where hier.child_id = @WHERE:PARAM:USER_DEF:INTEGER:[email protected])
      AND TASK.prIsMilestone=1
      AND TASK.PRID not in (select a.prid from prtask a
                              where [email protected]:PARAM:USER_DEF:INTEGER:[email protected])
) VAL
WHERE (1=1)
and @[email protected]
ORDER BY VAL.PROJECT_CODE ASC