Hi,
I like to add new documents with attached files. Generally that works. But when a file does not exist I get the Error: File xy.dwg does not exist and the document will not be created.
Is there a possibility that the document will still be created without file?
I am using this AML template with Batch Loader
<Item type="Document" where="pbu_id='@1'" action="merge" version="0">
<pbu_id>@1</pbu_id>
...
<viewable_file>
<Item type="File" action="add">
<actual_filename>@7</actual_filename>
<filename>@8</filename>
<Relationships>
<Item type="Located" action="add">
<related_id>xy</related_id>
</Item>
</Relationships>
</Item>
</viewable_file>
<Relationships>
<Item type="Document File" action="add">
<related_id>
<Item type="File" action="add">
<actual_filename>@9</actual_filename>
<filename>@10</filename>
<Relationships>
<Item type="Located" action="add">
<related_id>xy</related_id>
</Item>
</Relationships>
</Item>
</related_id>
</Item>
</Relationships>
</Item>
I appreciate your comments.
Regards Klaus
Are your Files already available in the File Vault and in the ItemType File? I wonder why you use "add" for the Files instead of "get". You maybe can use a condition rule for the Files.
Hi Klaus,
Since your AML template uses a single AML statement to add the document and create the file(s), the whole statement will fail (including the Document "merge") if either of the File "adds" fail. One option is to add the Documents first, then run a second load to add the Files and Document File relationships. That way your Documents will exist in the database, regardless of whether the Files are added successfully.
Aras Support ([email protected]) may have additional tips or strategies to help with your batch loading scenario.
Eli
Eli Donahue
Aras Labs Software Engineer
Hi Angela, no the files are not yet in the file vault. I have used "add" instead of "get" for no special reason. I am not an experienced AML user. What could be the condition rule for the files?
Eli, thank you for your help.