XOG in/out documents associated with projects
search cancel

XOG in/out documents associated with projects

book

Article ID: 55255

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

You would like to XOG in/out documents associated with projects, including their folder hierarchy, both for importing material from another application and for migrating this material from Dev to Test to Prod. You could not see a XOG template to do this.

Resolution

This is the XML script which you can use, based on documents_write_ext.xml

<?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="OS" objectType="document" version="13.3" />
 <Documents>
  <Parent parentObjectId="5000701" parentObjectType="Projects" documentLocation="C:\Temp/ClarityDocsXOGwrite">
   <General addedBy="admin" addedDate="2015-02-20" />
  </Parent>
 </Documents>
</NikuDataBus>

Important points to note:

  • The documentLocation must be on the server.
  • The full path must be used for the documentLocation.
  • parentObjectId is the internal database ID for the project, i.e. the 5000000 series numbers, not the ID by which the end user may recognize the project.
  • The document hierarchy is prepared, beginning with documentLocation, which becomes "Top" in the project documents.
  • It most definitely does not work properly if initiated from the XOG client (PC, WinXP or Linux).
  • The documentLocation cannot be on a mapped network drive. It has to be C:

   
In our example, documentLocation is C:\Temp/ClarityDocsXOGwrite.
On the server:

  • F:\>dir C:\Temp\ClarityDocsXOGwrite
  • Volume in drive C has no label.
  • Volume Serial Number is BC9D-2D3C


Directory of C:\Temp\ClarityDocsXOGwrite

02/20/2015 03:37 PM <DIR> .
02/20/2015 03:37 PM <DIR> ..
02/20/2015 02:18 PM 287 readme.doc
02/20/2015 03:34 PM <DIR> sample 0
02/20/2015 03:38 PM <DIR> sample 1
1 File(s) 287 bytes
4 Dir(s) 4,728,242,176 bytes free

F:\>dir "C:\Temp\ClarityDocsXOGwrite\sample 0"

  • Volume in drive C has no label.
  • Volume Serial Number is BC9D-2D3C

Directory of C:\Temp\ClarityDocsXOGwrite\sample 0

02/20/2015 03:34 PM <DIR> .
02/20/2015 03:34 PM <DIR> ..
02/05/2014 04:53 PM 1,429 samplepic.gif
02/20/2015 02:03 PM 40 sampletext.txt
02/20/2015 02:04 PM 19,968 Sampleword.doc
3 File(s) 21,437 bytes
2 Dir(s) 4,728,242,176 bytes free

F:\>

After running the script, xog -propertyfile dev.properties
where dev.properties specifies the XML source as above, the project identified as 5000701 contained all its original documents, plus the new ones in the hierarchy shown above which is correct.