Clarity

 View Only
  • 1.  How to XOG in attachments while changing the Filename

    Posted Feb 29, 2016 10:07 AM

    Hi all,

     

    I am wondering if it is possible to XOG-In attachments while changing their file names?

    I successfully XOG-In PDF-Documents with the XML below.

    My only problem is that the documents are stored  in my file source with a wrong document name (e.g. "WrongDocumentname.pdf").

    In Ca PPM, I need the attachments to be stored with their real name ("RealDocumentname.pdf").

     

    With the code below, I can only store the PDF-Files in Clarity with their original Filename (WrongDocumentname.pdf)

     

     

    <?xml version="1.0" encoding="UTF-8"?>

    <NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <Header version="14.3.0.298" externalSource="NIKU" action="write" objectType="customObjectInstance">

      <args name="overrideAutoNumbering" value="true"/>

      </Header>

      <customObjectInstances objectCode="z_airport_it_contrac">

      <instance instanceCode="AIRPORIT_AUT_IMP588" objectCode="z_airport_it_contrac">

      <CustomInformation>

       <ColumnValue name="z_anlagen">RealDocumentname.pdf<Documents>

      <Parent documentLocation="..\Vertraege">

      <Document name="WrongDocumentname.pdf" language="en" mimeType="application/pdf">

      <Version id="-1" versionNumber="1"/>

      </Document>

      </Parent>

      </Documents>

    </ColumnValue>

    </customObjectInstances>

    </NikuDataBus>



  • 2.  Re: How to XOG in attachments while changing the Filename

    Posted Mar 22, 2016 07:19 AM

    Hi,

     

    I have never tried to change the name of a document through xog, but i would assume that it would be possible.

     

    Below is a xog that i use have used when xogging in document to idea object. In the documents part you have the option to xog in a name for the document, which in turn would create a new instance in the db with the specified name.

     

                <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_idea.xsd">

                   <Header action="write" externalSource="NIKU" objectType="idea" version="8.0" />

                   <Ideas>

                      <Idea active="true" name="${row[1]}" objectID="${row[2]}" openForTimeEntry="1" pageLayoutCode="pma.ideaFrame">

                         <CustomInformation>

                            <ColumnValue name="obj_fast_track">false</ColumnValue>

                            <ColumnValue name="obj_request_category"></ColumnValue>

                            <ColumnValue name="obj_request_type"></ColumnValue>

                            <ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>

                            <ColumnValue name="obj_work_status">REQUESTED</ColumnValue>

                            <ColumnValue name="z_bifoga">

                              <Documents>

                                <Parent documentLocation="C:\CA\Clarity\filestore">

                                  <Document fileCreatedDate="${row[9]}" language="${row[8]}" mimeType="${row[7]}" name="${row[6]}">

                                    <Version id="${row[10]}" versionNumber="1"/>

                                  </Document>

                                </Parent>

                              </Documents>

                            </ColumnValue>

                         </CustomInformation>

                      </Idea>

                   </Ideas>

                </NikuDataBus>

     

    Other information that might be good to have if you are inserting a document through attachment attribute and then transfering the document between instances or objects are the CLB_DMS_FOLDERS, CLB_DMS_FILES and CLB_DMS_VERSIONS tables in the db.

     

    CLB_DMS_FOLDERS has information on the path of the attachment attribute and its objects association.

     

    CLB_DMS_FILES has information of the files, for example the name of the while.

     

    CLB_DMS_VERSIONS has information of the file size and version.

     

    When reading documents through xog, remember to use the document location argument: <args name="documentLocation" value="C:\CA\Clarity\filestore"/>

     

    I hope this information help and i hope the xog posted solves your problem.

     

    /Emre



  • 3.  Re: How to XOG in attachments while changing the Filename

    Posted Dec 08, 2016 02:18 AM

    Hi all

     

    I want to do this with a remote call. I mean, when creating an idea an integration will insert the idea and the document all will come via integration. so somehow I think that we have to copy the file to the ppm application server first. Then using this XOG we may insert the file into the idea object. Am I write? And one more question, is the "documentLocation" is the location to store the file or the location to fetch the file?