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 requestsAll Parts that are classified bythexClassnamed“Bolt”,wheretheweight is equal to 15 andthexPropertycost is equal to 10.The responseHAS toinclude Parts, which are classified by childxClassesof “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 requestsAll Parts that are classified byxClasswith id “ABCD…..”.

The responseHAS toinclude Parts, which are classified by childxClassesofxClasswith 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>