Batchloading multiple Document items - but some reference/link to others via template_file_container. Possible to batchload all documents and their dependent items in one go?

Hey all,

I am developing a batchloading schema for uploading template files. Pretty straightforward, here is my AML for a simple document load:

     <Item type="Document" action="add">
               <Item type="Document File" action="add">
                         <Item type="File" action="add">

However, I am trying to utilize template file containers for office connector templates. Template file container is a property on the document itemtype that lets a template document item to reference another template document item in order to reference and "use" its file. Useful if you want to have templates across multiple document classifications without adding the file individually to all those differently classified template doc items. 

I have about 10 templates and about 20 document classifications, so wanted to create around 200 document items (templates) but have only 10 hold the actual files, and 190 just reference the 10 via template_file_container property.

A few questions:

  • Am I able to accomplish this in one batchload procedure/one AML script?
  • How do I write the AML for the latter document items to reference the file-holding document items? I imagine it is something like:<template_file_container></template_file_container>, but will the code require the actual item code (BFA3BE03444448F5916133D874712CF4 or something similar) or is there a way to use the name/item numbers? Or is there a way to easily find the item code of the created template-holding document items from earlier in the "batchloading process"? And if so, how would I go about writing that?
  • What would be the most robust and simplest script I can write to accomplish my goals?
  • You can create some GUIDs and assign them to first 10 template documents. So your new AML will look like

         <Item type="Document" id="BFA3BE03444448F5916133D874712CF4 " action="add">


    Now use these ids as temolate_file_container properties for other documents which will be referencing these first 10 templates.

  •   And just to confirm, I will be utilizing the template file container property like:


    Also, is there any particular format or method to creating GUID's, or do I just need to create 32 randomized characters for each of the 10 base templates? How do I create GUID's that, unlikely as it may be, are unique from other GUID's in the Aras environment. or other Aras environments that the batch load procedure will be deployed to?


    Yes you are right about use of property template_file_container.

    Regarding GUID generation you can use action generateNewGUIDEx and pass simple AML with quantity of GUIDs you wish to generate. One of the ways will be using NASH tool to apply this AML with action. Please refer screenshot below.

    To launch nash tool, you can use URL 


  •  This question might just come down to me not understanding how unique GUID's are handled - but can I use this to generate GUIDs that will be unique in other environments? I have multiple environments I will deploy this to and want to make sure it won't overlap with any other GUID's 

  • Yes, you can use on different environments as well. They will be unique.