Aras Innovator Platform

Working with the Classification Data Model in AML

This section contains examples of working with the classification data model.

The following example requests all Parts that are classified by the “Bolt” xClass.The Response to this request does NOT have to include Parts, which are classified by child xClasses of “Bolt”.

<AML>
 <Item type="Part” action="get">
 <Relationships>
 <Item type="Part_xClass” action="get">
 <related_id>
 <Item type="xClass” action="get">
 <name>Bolt</name>
 </Item>
 </related_id>
 </Item>
 </Relationships>
 </Item>
</AML>

The following example has to include Parts, which are classified by child xClasses of “Bolt”.

<AML>
 <Item type="Part” action="get">
 <Relationships>
 <Item type="Part_xClass” action="get">
 <related_id>
 <Item action="getxClassAndAllDescendants">
 <name>Bolt</name>
 </Item>
 </related_id>
 </Item>
 </Relationships>
 </Item>
</AML>

The following example requests All Parts that are classified by the xClass named “Bolt”, where the weight is equal to 15 and the xProperty cost is equal to 10. The response HAS to include Parts, which are classified by child xClasses of “Bolt”.

<AML>
 <Item type="Part” action="get">
 <Relationships>
 <Item type="Part_xClass” action="get">
 <related_id>
 <Item action="getxClassAndAllDescendants">
 <name>Bolt</name>
 </Item>
 </related_id>
 </Item>
 </Relationships>
 <xp-cost>10</xp-cost>
 <weight>15</weight>
 </Item>
</AML>

The following example requests All Parts that are classified by xClass with id “ABCD…..”. The response HAS to include Parts, which are classified by child xClasses of xClass with id “ABCD…”.

<AML>
 <Item type="Part” action="get">
 <Relationships>
 <Item type="Part_xClass” action="get">
 <related_id>
 <Item action="getxClassAndAllDescendants">

<id>ABCD…..</id>

 </Item>
 </related_id>
 </Item>
 </Relationships>
 </Item>
</AML>