Hi Diksha,
If you add all Parts/Part BOM items within one AML statement, the whole statement will either succeed or roll back. Ex:
<AML>
<Item type="Part" action="edit" id="...">
<Relationships>
<Item type="Part BOM" action="add">
<related_id>
<Item type="Part" action="get">
<item_number>Part-0002</item_number>
</Item>
</related_id>
</Item>
<Item type="Part BOM" action="add">
<related_id>
<Item type="Part" action="get">
<item_number>Part-0003</item_number>
</Item>
</related_id>
</Item>
...
...
</Relationships>
</Item>
</AML>
Eli Donahue
Aras Labs Software Engineer