Uploading multiple document revisions with the batchloader

Hi,

I have the following (legacy) structure of documents and files:

  • DOC-0001 Rev 12 State: Superseded
    • File abc_12.dwg
    • File abc_12.pdf
  • DOC-0001 Rev 13 State: Superseded
    • File abc_13.dwg
    • File abc_13.pdf
  • DOC-0001 Rev 14 State: Released
    • File abc_14.dwg
    • File abc_14.pdf

I would like to upload these to ARAS using the batch-loader utility.

Is this possible with AML keeping the revisions and states correct? and how should the AML code look?

Regards,

Frank

Parents
  • Hi Frank,

    I haven´t done this yet, but once had to spend some time for this use case. Do you use automatic versioning for documents? Than Innovator might create the new revisions for you. It´s maybe possible to import all items at one. Your import file just should have the correct order of the items, so your documents don´t get mixed up. You can later overwrite the used major_rev with the different start number and promote the affected Items to the state you need with a seconds batch call (just manipulate the Lifecycle temporary for this task). 

  • Your import file just should have the correct order of the items, so your documents don´t get mixed up.

    Hi,

    Thanks for the answer. I don't know if I fully understand your proposal fully.

    For the documents, we indeed use the ootb automatic versioning.
    For the first fileload, I have some AML code, see below:

    <Item type="Document" action="add">
      <name>@1</name>
      <description>@2</description>
      <classification>@3</classification>
      <amp_subclass>@4</amp_subclass>
      <owned_by_id>
          <Item type="Identity" action="get" select="id">
          <keyed_name>@9</keyed_name>
       </Item>
    </owned_by_id>

    <Relationships>
       <Item type="Document File" action="add">
         <related_id>
             <Item type="File" action="add">
             <actual_filename>@8</actual_filename>
             <filename>@7</filename>
             <Relationships>
                <Item type="Located" action="add">
                   <related_id>67BBB9204FE84A8981ED8313049BA06C</related_id>
                </Item>
              </Relationships>
           </Item>
         </related_id>
       </Item>
     </Relationships>
    </Item>

    How should I add the other files to the newer revision of the document? So, How do I refer back to the newly created Document, create a new revision and add the files?

    And how do I manipulate the Lifecycle temporary with AML?

    Could you hint to some AML code I need for this?

    Regards,

    Frank

Reply
  • Your import file just should have the correct order of the items, so your documents don´t get mixed up.

    Hi,

    Thanks for the answer. I don't know if I fully understand your proposal fully.

    For the documents, we indeed use the ootb automatic versioning.
    For the first fileload, I have some AML code, see below:

    <Item type="Document" action="add">
      <name>@1</name>
      <description>@2</description>
      <classification>@3</classification>
      <amp_subclass>@4</amp_subclass>
      <owned_by_id>
          <Item type="Identity" action="get" select="id">
          <keyed_name>@9</keyed_name>
       </Item>
    </owned_by_id>

    <Relationships>
       <Item type="Document File" action="add">
         <related_id>
             <Item type="File" action="add">
             <actual_filename>@8</actual_filename>
             <filename>@7</filename>
             <Relationships>
                <Item type="Located" action="add">
                   <related_id>67BBB9204FE84A8981ED8313049BA06C</related_id>
                </Item>
              </Relationships>
           </Item>
         </related_id>
       </Item>
     </Relationships>
    </Item>

    How should I add the other files to the newer revision of the document? So, How do I refer back to the newly created Document, create a new revision and add the files?

    And how do I manipulate the Lifecycle temporary with AML?

    Could you hint to some AML code I need for this?

    Regards,

    Frank

Children
  • In your AML I don´t see any item_number. So I assume you use a Sequence for numbering?
    For first imports, you should self-assign an item_number in your import file. This gives you better control over the document numbers.
    Let´s assume you have imported all your generation 1 items of your documents. The item_number is an unique property.
    When you import 2nd, 3rd generations, Innovator should automatically create the new item revisions as soon as a document number exists already.
    But I have not tested this one. If "add" doesn´t work for creating the new revisions, you may have to use an "version/edit" approach.
    The item_number will be your reference. When self-assigning the document number in the import file already, you don´t have to take care for the references by your self later.

    I am not sure if you really have to promote your items for this task. It depends on your own setup.
    In my case I would have to do it, cause I do not allow the creation of new version as long as the previous version wasn´t released.
    You can promote with the batch loader like this:

    <Item type="Manufacturer Part" action="promoteItem" where="item_number='@1'">
    <state>@2</state>
    <comments>@3</comments>
    </Item>

  • Hi,

    Thanks for your elaborate answer. You gave enough clues to start testing this.

    Thanks!