Clarity: XOG Documents Read Action saves files with an internal ID for the file name

Document ID : KB000050618
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

We performed the XOG Documents Read action and the files that are saved on the application server don't have the original file names and file extensions. We are reading out the files so that people can access the documents directly on a file server and the intention is not to XOG write the documents back into another Clarity application instance. Why are the files being saved with internal ID numbers for the file name?

Steps to Reproduce:

  1. Use the Clarity XOG Client application and the sample XOG 'documents_read.xml' file to read documents that are stored on a project
    <?xml version="1.0" encoding="UTF-8"?><NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd"><Header version="12.1.0" action="read" objectType="document" externalSource="NIKU"><args name="documentLocation" value="\home\clarity1210" /></Header><DocumentQuery><Filter name="parentObjectID" criteria="EQUALS">5001030</Filter><Filter name="parentObjectType" criteria="EQUALS">Projects</Filter--></DocumentQuery></NikuDataBus>
  2. Look at the output xml file generated by the documents_read action
    <?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="NIKU" objectType="document" version="12.1.0.5840"/>  <Documents>  <Parent documentLocation="/home/clarity1210"  parentObjectId="5001030" parentObjectType="Projects">  <Folder allowNonParticipants="0" hasAllParticipants="1" name="myFolder001">  <Document allowNonParticipants="0"  fileCreatedDate="2011-03-14T00:00:00"  hasAllParticipants="1" language="en"  name="SLICES.sql" numCheckoutDays="1" status="0" versioningEnabled="1">  <Version id="5034005" owner="admin" status="0" versionNumber="1"/>  </Document>  </Folder>  <Document allowNonParticipants="0"  fileCreatedDate="2011-03-14T00:00:00"  hasAllParticipants="1" language="en"  name="Stuff To Do.doc" numCheckoutDays="1" status="0" versioningEnabled="1">  <Version id="5034001" owner="admin" status="0" versionNumber="1"/>  </Document>  </Parent>  </Documents>  <XOGOutput>  <Object type="document"/>  <Status state="SUCCESS"/>  <Statistics failureRecords="0" insertedRecords="0"  totalNumberOfRecords="3" updatedRecords="0"/>  <Records/>  </XOGOutput>  </NikuDataBus>
  3. Look at the File Directory where the files are created by the XOG read action.

    Figure 1

  4. If I right-click on file name '5034001' and Open With Microsoft Word ; it opens the file as expected. I was expecting the file name to show as 'Stuff to Do.doc'.

  5. If I right-click on file name '5034005' and Open With Notepad ; it opens the file as expected. I was expecting the file name to show as 'SLICES.sql'.

Solution:

The XOG Documents Read action is working as expected. The files are generated with internal ID values so that the files can be easily referenced when the Clarity XOG user performs a XOG Documents Write action to write the files back into the Clarity application for another project or writes the files into another instance of the Clarity Application.

An Enhancement Request CLRT-59906 has been logged for allowing an option to generate the files with the original file names for the use case described.

Keywords: CLARITYKB, CLRT-59906, erq.