Aras Innovator Platform

Appendix I: AML Template File Samples

This contains some sample template AMLs files for commonly batch loaded ItemTypes. These templates do not have all properties defined, but enough of the common structure to get started.

Warning
If you are using “where” clauses in your template AML, please review Aras Innovator - AML Security Updates document before importing your data.

For adding new Users with a password of ‘innovator’:

<BatchLoaderPrototype>
 <Item type="User” where="login_name='@1'” action="add">
 <login_name>@1</login_name>
 <password>607920b64fe136f9ab2389e371852af2</password>
 <logon_enabled>@2</logon_enabled>
 <first_name>@3</first_name>
 <last_name>@4</last_name>
 <email>@5</email>
 </Item>
</BatchLoaderPrototype>

For a batch job maintaining user status in an external file Users:

<BatchLoaderPrototype>
 <Item type="User” where="login_name='@1' and is_current='1'” action="merge">
 <login_name>@1</login_name>
 <logon_enabled>@2</logon_enabled>
 <first_name>@3</first_name>
 <last_name>@4</last_name>
 <email>@5</email>
 </Item>
</BatchLoaderPrototype>

For adding new Parts:

<BatchLoaderPrototype>
 <Item type="Part” action="add">
 <item_number>@1</item_number>
 <name>@2</name>
 <description>@3</description>
 <owned_by_id>
 <Item type="Identity” action="get” select="id">
 <keyed_name>@4</keyed_name>
 </Item>
 </owned_by_id>
 <managed_by_id>
 <Item type="Identity” action="get” select="id">
 <keyed_name>@5</keyed_name>
 </Item>
 </managed_by_id>
 <classification>@6</classification>
 <unit>@7</unit>
 <make_buy>@8</make_buy>
 </Item>
</BatchLoaderPrototype>

For adding Part BOM relationships to an existing Part:

<BatchLoaderPrototype>
 <Item type="Part” where="item_number='@1' and is_current='1'” action="edit">
 <Relationships>
 <Item type="Part BOM” action="add">
 <related_id>
 <Item type="Part” where="item_number='@2' and is_current='1'” action="get” select="id">
 </related_id>
 <quantity>@3</quantity>
 </Item>
 </Relationships>
 </Item>
</BatchLoaderPrototype>

If you need to add many Part BOM relationships to the same Part, but do not want to version the item after every addition.

<BatchLoaderPrototype>
 <Item type="Part” where="item_number='@1' and is_current='1'” action="edit” version="0">
 <Relationships>
 <Item type="Part BOM” action="add">
 <related_id>
 <Item type="Part” where="item_number='@2' and is_current='1'” action="get” select="id">
 </related_id>
 <quantity>@3</quantity>
 </Item>
 </Relationships>
 </Item>
</BatchLoaderPrototype>

For adding Part Goal relationships to an existing Part:

<BatchLoaderPrototype>
 <Item type="Part” where="item_number='@1' and is_current='1'” action="edit">
 <Relationships>
 <Item type="Part Goal” action="add">
 <goal>@2</goal>
 <target_value>@3</target_value>
 <estimated_value>@4</estimated_value>
 <actual_value>@5</actual_value>
 </Item>
 </Relationships>
 </Item>
</BatchLoaderPrototype>

For adding a new Part with a Part Goal:

<BatchLoaderPrototype>
 <Item type="Part” action="add">
 <item_number>@1</item_number>
 <name>@2</name>
 <description>@3</description>
 <owned_by_id>
 <Item type="Identity” action="get” select="id">
 <keyed_name>@4</keyed_name>
 </Item>
 </owned_by_id>
 <managed_by_id>
 <Item type="Identity” action="get” select="id">
 <keyed_name>@5</keyed_name>
 </Item>
 </managed_by_id>
 <classification>@6</classification>
 <unit>@7</unit>
 <make_buy>@8</make_buy>
 <Relationships>
 <Item type="Part Goal” action="add">
 <goal>@9</goal>
 <target_value>@10</target_value>
 <estimated_value>@11</estimated_value>
 <actual_value>@12</actual_value>
 </Item>
 </Relationships>
 </Item>
</BatchLoaderPrototype>

For adding new Documents:

<BatchLoaderPrototype>
 <Item type="Document” action="add">
 <item_number>@1</item_number>
 <name>@2</name>
 <description>@3</description>
 <owned_by_id>
 <Item type="Identity” action="get” select="id">
 <keyed_name>@4</keyed_name>
 </Item>
 </owned_by_id>
 <managed_by_id>
 <Item type="Identity” action="get” select="id">
 <keyed_name>@5</keyed_name>
 </Item>
 </managed_by_id>
 <classification>@6</classification>
 <authoring_tool>@7</authoring_tool>
 <authoring_tool_version>@8</authoring_tool_version>
 </Item>
</BatchLoaderPrototype>

For adding a new document with an attached file:

<BatchLoaderPrototype>
 <Item type="Document” action="add">
 <item_number>@1</item_number>
 <name>@2</name>
 <description>@3</description>
 <owned_by_id>
 <Item type="Identity” action="get” select="id">
 <keyed_name>@4</keyed_name>
 </Item>
 </owned_by_id>
 <managed_by_id>
 <Item type="Identity” action="get” select="id">
 <keyed_name>@5</keyed_name>
 </Item>
 </managed_by_id>
 <classification>@6</classification>
 <authoring_tool>@7</authoring_tool>
 <authoring_tool_version>@8</authoring_tool_version>
 <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>67BBB9204FE84A8981ED8313049BA06C</related_id> 
 </Item> 
 </Relationships> 
 </Item> 
 </related_id> 
 </Item> 
 </Relationships> 
 </Item>
</BatchLoaderPrototype>