Hi All,
I'm having one issue with XOG in attachment to project because of missing project ID in XOG write XML file.... I was able to XOG read attachments from my project, however couldn't XOG in to project then.
Overview: I have a process which XOG read some project, change some attributes, then creates new project and put those attributes there. That works fine for me.
The problem comes when source project (call it proj1) contains also attachment (We have some custom attachment attributes on project). I have just found it's not possible to XOG read those attachments within a standard XOG project read. I've used your article and was able to XOG read attachments then:
Attachments XOG read:
<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
<Header action="read" externalSource="NIKU" objectType="customObjectInstance" version="13.3">
<args name="documentLocation" value="/home/clarity/mnt2/filestore"/>
</Header>
<CustomObjectInstanceQuery>
<Filter name="objectCode" criteria="EQUALS">project</Filter>
<Filter name="instanceCode" criteria="OR">022249</Filter>
</CustomObjectInstanceQuery>
</NikuDataBus>
XOG read output then was:
<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd">
<Header action="write" externalSource="NIKU" objectType="customObjectInstance" version="13.3.0.286"/>
<customObjectInstances objectCode="project"> <!-- MISSING Project Code/ID for me there -->
<instance objectCode="project">
<CustomInformation>
<ColumnValue name="hen_chargeable_stat">1</ColumnValue>
.
<!-- Some attributes were also there, deleted for better view.. -->
.
<ColumnValue name="hen_proj_brief_uploa"> <!-- ATTACHMENT 1 -->
<Documents>
<Parent documentLocation="/home/clarity/mnt2/filestore">
<Document fileCreatedDate="2016-03-29T10:52:28" language="en" mimeType="image/pjpeg" name="dsds.jpg">
<Version id="8425049" versionNumber="1"/>
</Document>
</Parent>
</Documents>
</ColumnValue>
<ColumnValue name="z_del_fit_attachment"> <!-- ATTACHMENT 2 -->
<Documents>
<Parent documentLocation="/home/clarity/mnt2/filestore">
<Document fileCreatedDate="2016-03-29T11:06:17" language="en"
mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" name="Shared UserID Activity Log_2016.xlsx">
<Version id="8425056" versionNumber="1"/>
</Document>
</Parent>
</Documents>
</ColumnValue>
</CustomInformation>
<OBSAssocs complete="false"/>
<Security/>
</instance>
</customObjectInstances>
</NikuDataBus>
Question is how can I update my new project (call it proj2) with those attachments? In XOG write (returned from xog.client) is not mentioned any Project ID,
where I'd like to put my new project ID (proj2).
Thanks for your advices,
Matej