Clarity

 View Only
  • 1.  XOG document into project

    Posted Sep 02, 2013 06:00 AM
    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="12.1.1.1208"/>
        <Projects>
            <Project entityCode="... (EUR)"           
                materialExchageRateType="AVERAGE"
                name="test upload document" 
                projectID="013326" >
                      <CustomInformation>
                    <ColumnValue name="z_secfit_attach">
                        <Documents>
                            <Parent documentLocation="E:\niku\8.1\build/xog/test/documentXogLocation/ExternalSystemDocs">
                                <Document
                                    fileCreatedDate="2013-09-02T00:31:37"
                                    language="en" mimeType="text/plain" name="test.txt">
                                    <Version id="7219870" versionNumber="1"/>
                                </Document>
                            </Parent>
                        </Documents>
                    </ColumnValue>
                </CustomInformation>
            </Project>
        </Projects>
    </NikuDataBus>
    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" />
      <Documents>
        <Parent parentObjectId="5186533" parentObjectType="KS" documentLocation="E:\niku\8.1\build/xog/test/documentXogLocation/ExternalSystemDocs">
          <General addedBy="admin" addedDate="2003-01-01" />
        </Parent>
      </Documents>
    </NikuDataBus>
    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?

    Thanks


  • 2.  RE: XOG document into project

    Broadcom Employee
    Posted Sep 03, 2013 08:18 AM
    Hi ...

    You can try the following

    <?xml version="1.0"?>
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
    <Header version="7.5" action="read" objectType="document"
    externalSource="NIKU">
    <args name="documentLocation" value="c:\xog/test/documentXogLocation"/>
    </Header>
    <DocumentQuery>
    <Filter name="parentObjectID" criteria="EQUALS">5000019</Filter>
    <Filter name="parentObjectType" criteria="EQUALS">Projects</Filter>
    </DocumentQuery>
    </NikuDataBus>


    The project id is the actual internal ID from the SRM_PROJECTS table...

    Please note that the files will be placed on the app server, same procedure has to be done while XOG in the documents, you have to copy the files into the server then XOG in.

    Regards
    Suman Pramanik


  • 3.  RE: XOG document into project

    Posted Sep 03, 2013 09:32 AM
    Hello,

    not sure if I understood correctly. You did mean to copy file into server, to the path where project documents are stored (in my case path to project is: /home/clarity/mnt/filestore/Files/219/007)?

    I did copy file there, than I used xog you gave me, but in output there was nothing about this document. XOG you gave me XOG-out just documents which are on collaboration tab.

    Andrej