You are viewing limited content. For full access, please sign in.

Question

Question

Import Agent XML sidecar file: how to specify the target path?

asked on November 24, 2014

We have an XML file successfully directing the import of a PDF into LF via Import Agent. However, IA is ignoring the specified destination path (everything ends up appearing in the repository root). The template applies correctly.

The problem seems to stem from how we name the document and/or specify the path. I can't find any example of how to designate the path in the included sample XML and LST structure sidecar files or help file.

As an example, if we use the following line in the XML sidecar file to name and folder the document:

<LF:document name="Repository/FirstLevelFolder/MyDocumentName.pdf" comment="" language="" template="MyTemplateName">
- <LF:electronic_document content_type="application/pdf" extension="pdf">
<LF:fileref ref="C:\Sousa_Sandra^^5K9STP_201304.pdf" />
</LF:electronic_document>
</LF:document>

Whether I use forward slashes or backslashes, the document always arrives in the root path, named:

Repository/FirstLevelFolder/MyDocumentName.pdf

(exactly as indicated in the XML file's document name element - treating the pathing as the actual name, and forcing all slashes to the same direction). No related error is reflected in the event logs.

How do you indicate a folder destination or target path?

 

 

 

 

 

0 0

Answer

SELECTED ANSWER
replied on November 24, 2014 Show version history

I have a file called SAMPLE.pdf located on the root of the C drive. I want to import it into the repository and have the full path \Files from Import Agent List XML\PDFs\SAMPLE.pdf. The Import Agent profile I'm using is configured to just store documents to the root of the repository. The XML file I would then use is below:

<?xml version="1.0" encoding="utf-8"?>
  <LF:importengine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://laserfiche.com/namespaces/importengine ImportEngine.xsd"
                   xmlns:LF="http://laserfiche.com/namespaces/importengine" version="1.0">

    <LF:toc on_document_conflict="unique" on_folder_conflict="unique">
      <LF:folder name="Files from Import Agent List XML">
        <LF:childentries>
          <LF:folder name="PDFs">
            <LF:childentries>
	      <LF:document name="SAMPLE.pdf" comment="" language="" template="">
        	<LF:electronic_document content_type="application/pdf" extension="pdf">
          	  <LF:fileref ref="C:\SAMPLE.pdf" />
        	</LF:electronic_document>
      	      </LF:document>
            </LF:childentries>
          </LF:folder>
        </LF:childentries>
      </LF:folder>
    </LF:toc>
  
</LF:importengine>

The example XML files that Import Agent installs are a good reference for how to create your own based on your needs.

3 0

Replies

replied on November 24, 2014

Documents imported with Import Agent while using the XML list file will just be stored at the repository path that the Import Agent profile specifies.

What you should do is create a new Import Agent profile specifically for XML list files and then configure it to just store in the root folder. Then in the XML list file, use the Folders attribute to further build out the path where the documents will ultimately end up.

You can refer to the XML schema document (C:\Program Files (x86)\Laserfiche\Import Agent\List File Examples\ImportEngine.xsd) for more information. You can also refer to Folders Example.xml (found in the same location) for an idea of how to use this.

1 0
replied on November 24, 2014

Thank you, Alex.

We're in a bit of  a hurry, and trying to get this working, between various other interruptions.

I found the schema, and it does give each of the possible parameters (which is really great, and opened up a lot for us), but it is typically not exhaustive in explaining how each part works and inter-relates. It is screaming for a contextual help document. 

Yes, it would be ideal if we could walk through each option and test them out in their combinations, but we can't, and I bet others here may face the same constraints.

I think a realistic sample document might be more helpful for everyone.

Could you please have someone that is already very familiar with the XML's sidecar's requirements post us a sample document that is reflective of a typical ECM system capture, along with a short sidebar description of why it is being done that way? For example, how about storing a document with a designated name and extension and mime-type, that must be unique, stored under a two-level folder depth that uses existing folders if either was present, otherwise creating those folders, and specify a metadata template with a date and a text string population. That will save us a lot of time to get started.

Or, if such a document exists, and I missed it, my apologies - please  point me to it.  Otherwise, I need a contact listed, so we can call them and they can explain it to us (and probably others). Thanks so much.

0 0
SELECTED ANSWER
replied on November 24, 2014 Show version history

I have a file called SAMPLE.pdf located on the root of the C drive. I want to import it into the repository and have the full path \Files from Import Agent List XML\PDFs\SAMPLE.pdf. The Import Agent profile I'm using is configured to just store documents to the root of the repository. The XML file I would then use is below:

<?xml version="1.0" encoding="utf-8"?>
  <LF:importengine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://laserfiche.com/namespaces/importengine ImportEngine.xsd"
                   xmlns:LF="http://laserfiche.com/namespaces/importengine" version="1.0">

    <LF:toc on_document_conflict="unique" on_folder_conflict="unique">
      <LF:folder name="Files from Import Agent List XML">
        <LF:childentries>
          <LF:folder name="PDFs">
            <LF:childentries>
	      <LF:document name="SAMPLE.pdf" comment="" language="" template="">
        	<LF:electronic_document content_type="application/pdf" extension="pdf">
          	  <LF:fileref ref="C:\SAMPLE.pdf" />
        	</LF:electronic_document>
      	      </LF:document>
            </LF:childentries>
          </LF:folder>
        </LF:childentries>
      </LF:folder>
    </LF:toc>
  
</LF:importengine>

The example XML files that Import Agent installs are a good reference for how to create your own based on your needs.

3 0
replied on November 24, 2014

Alexander: You're a good man!

We did review the sample files, but they are too isolated and simplified to rapidly understand how the options would work in concert.

Thank you so much. What you have done has helped a lot, and it was very kind of you to put it together for us. Excellent support. We really appreciate the time you invested.

1 0
replied on November 25, 2014

No problem, Lew. Glad I could help.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.