AnsweredAssumed Answered

XOG in custom object with Autonumber using Gel

Question asked by N.P on May 17, 2012
Latest reply on Feb 19, 2014 by samos2
Hi,

I have created GEL script to XOG in custom object in clarity. Custom Object has autonumber on ID and I used overrideAutoNumbering="false" in xog file.

When I push file using xog.client on application it works fine and create new instances, but from GEL script I am getting error.

XOG File:
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd">

<Header action="write" externalSource="NIKU" objectType="customObjectInstance" overrideAutoNumbering="false" version="12.1.0.5840"/>

<customObjectInstances objectCode="cusobj1">


<instance instanceCode="-1" objectCode="cusobj1" parentInstanceCode="J06704" parentObjectCode="project">



<CustomInformation>




<ColumnValue name="name">ES</ColumnValue>



</CustomInformation>


</instance>

</customObjectInstances>
</NikuDataBus>
Invoke code for GEL:
<core:catch var="xog_error">




<soap:invoke endpoint="${XOGURL}/niku/xog" var="runresult">





<soap:message>






<soapenv:Envelope
                                    xmlns:soapenv="http://schemas.xmlsoap..org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">







<soapenv:Header>








<xog:Auth>









<xog:SessionID>${sessionID}</xog:SessionID>








</xog:Auth>







</soapenv:Header>







<soapenv:Body>








<gel:include select="$object_instance_xml_root/NikuDataBus"/>








<!--this variable contains the XOG xml -->







</soapenv:Body>






</soapenv:Envelope>





</soap:message>




</soap:invoke>



</core:catch>
Ouput with GEL:
<XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">

<Object type="customObjectInstance"/>

<Status state="SUCCESS"/>

<Statistics failureRecords="5" insertedRecords="0" totalNumberOfRecords="5" updatedRecords="0"/>

<Records>


<Record>



<KeyInformation>




<column name="cusobj1">-1</column>



</KeyInformation>



<ErrorInformation>




<Severity>FATAL</Severity>




<Description>com.niku.union.odf.exception.ODFServiceException: &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;insertService type="xbl" componentId="odf" description="custom/customInsertService.xbl" transaction="dbTransaction" xmlns="http://schemas.niku.com/2002/objectTypes"/&gt; </Description>



</ErrorInformation>


</Record>

</Records>
</XOGOutput>
Anything I am missing??

Thanks in Advance
-NP.

Outcomes