XOG document into project

Discussion created by Endyno on Sep 2, 2013
Latest reply on Sep 3, 2013 by Endyno
Hello all,

I had similar question before, but this one goes deeper.

I need to send document from external tool to clarity. So I will load this file to Clarity server, let's say I will save it in this location: /home/clarity/mnt/filestore/test.txt.

Now I need to associate it with project attribute. For this I need following XOG:
<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">
    <Header action="write" externalSource="NIKU" objectType="project" version=""/>
        <Project entityCode="... (EUR)"           
            name="test upload document" 
            projectID="013326" >
                <ColumnValue name="z_secfit_attach">
                        <Parent documentLocation="E:\niku\8.1\build/xog/test/documentXogLocation/ExternalSystemDocs">
                                language="en" mimeType="text/plain" name="test.txt">
                                <Version id="7219870" versionNumber="1"/>
But if I just load test.txt file to server I don't have such info about the file. I don't have version ID, which I need to xog it into project.

I was thinking about using documents_write_ext.xml to xog file to project. This should somehow give me version id (just quessing).
<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_document.xsd">
  <Header action="write" externalSource="Projects" objectType="document" version="7.5" />
    <Parent parentObjectId="5186533" parentObjectType="KS" documentLocation="E:\niku\8.1\build/xog/test/documentXogLocation/ExternalSystemDocs">
      <General addedBy="admin" addedDate="2003-01-01" />
How can I set the path to file? In documentLocation I used link to database and to specific file.

So is it possible to associate document which is on server with project field?