MarcL: PLM solutions should have an application programming interface (API) for integrations between the PLM platform and other enterprise systems. APIs should allow the user to access and store PLM-managed data from within the originating system. The APIs should be fully XML Web services and should be function-oriented (e.g., to store a new item into the PLM solution should require only a single call to a store function, not many calls for a set-up, then a call for the store function).
Rob McAveney:
The XML syntax of Aras Innovator (the tag set and structure) is very lean compared to most enterprise systems. Aras Innovator is fundamentally a metadata architecture with open published API’s, fully capable at the web services layer.
Aras was an early innovator of XML/SOAP messaging, and we have a very efficient Web services engine that leans-out the overhead of typical Web services deployments.
The Aras Innovator XML tag set is called AML (Adaptive Markup Language). The same tag set is used for both transactions and data, creating a very simple dictionary to learn.
To get started, there are really only a few tags that you need to know:
<AML> tag: serves as the top level of an AML document, and may contain one or more <Item> tags.
<Item> tags may contain one or more property tags (named after the properties) and a <Relationships> tag, which in turn may contain one or more <Item> tags.
Got it? Okay, let’s cover some examples. Keep in mind that everything in Aras Innovator is an Item and every Item has a type (its ItemType name).
Permissions are also checked on every request and an error will be returned if the requested operation is not valid for the current user.
The following AML will retrieve a Part Item with a known id:
<AML>
<Item type=”Part” action=”get” id=”F48DB69482994831BC26314A1586B39E”/>
</AML>
Breaking this down, the <Item> tag has three attributes: type, action and id. In this case, the type is “Part”, but it could just as easily have been “Document” or “Process Plan” or even “ItemType”.
In other words, you can get any Item in Aras Innovator with this form of AML. The action attribute is set to “get” in this case.
Other actions include “add”, “update” and “delete”. By specifying an id, we know that this transaction is for a single item with a unique id.
When this AML is submitted, the Aras Innovator server will return AML with more detail (including the properties of the requested item), like this:
<Item type=”Part” typeId=”4F1AC04A2B484F3ABA4E20DB63808A88″
id=”F48DB69482994831BC26314A1586B39E” page=”1″ pagemax=”1″ itemmax=”1″>
<state>Preliminary</state>
<name>Widget Assembly</name>
<item_number>1000</item_number>
… (more properties)
</Item>
If you don’t happen to know the id of the item you’re looking for, property values in the request can be used as search criteria, like this:
<AML>
<Item type=”Part” action=”get”>
<item_number>1000</item_number>
</Item>
</AML>
This AML will return the same as above, assuming there is only one Part with an item_number of “1000”.
Let’s say you want to get both the Part item and its BOM (Bill of Materials). You would use the <Relationships> tag to specify the relationships you’re looking for, like this:
<AML>
<Item type=”Part” action=”get”>
<item_number>1000</item_number>
<Relationships>
<Item type=”Part BOM” action=”get”/>
</Relationships>
</Item>
</AML>
The structure of the response from the server would then look like this (properties removed for clarity):
<Item type=”Part” id=”F48DB69482994831BC26314A1586B39E”>
<item_number>1000</item_number>
<Relationships>
<Item type=”Part BOM” id=”0A2746E857BA4BFCB606FF447919A9E0″>
<quantity>10</quantity>
<related_id>
<Item type=”Part” id=”DF3822B9D0CD4C6991F5800161D9B48D”>
<item_number>1001</item_number>
</Item>
</related_id>
</Item>
<Item type=”Part BOM” id=”6F5E747AC2F84108B41E0576F73E9466″>
<quantity>2</quantity>
<related_id>
<Item type=”Part” id=”E2B9A29631074C8F94F25FC93C74AAB6″/>
<item_number>1002</item_number>
</Item>
</related_id>
</Item>
</Relationships>
</Item>
Note that the top-level Part item contains a <Relationships> tag, which contains 2 Part BOM items. Each Part BOM item then has a related_id property, which contains the child Part item.
So, the response is telling you that Part 1000 has a BOM that includes Part 1001 (quantity 10) and Part 1002 (quantity 2).
This response is showing a single-level BOM, but a multi-level one would simply have relationships under Parts 1001 and 1002.
The repeated Item / Relationships / Item / related_id pattern is a hallmark of AML.
Other actions, like “add”, work similarly. Example:
<AML>
<Item type=”Part” action=”add”>
<item_number>1003</item_number>
</Item>
</AML>
Simply creates a new Part and sets its item_number to “1003”. The response from the server is similar to that of a “get” request, and includes data that is set automatically by the server, like id and state:
<Item type=”Part” typeId=”4F1AC04A2B484F3ABA4E20DB63808A88″
id=”57D2BD8E6BC34A8C85E54242C88FD205″ page=”1″ pagemax=”1″ itemmax=”1″>
<state>Preliminary</state>
<item_number>1003</item_number>
… (more properties)
</Item>
There are multiple instances where you could use this type of AML like writing your own Aras Innovator client, connecting Aras Innovator to another web service, use XSLT to transform AML to another dialect.
If you have an instance of Aras Innovator running and would like to work with its AML, then there’s a basic tool included (located at /Client/scripts/nash.aspx), as well as, an open source IDE called AML Studio Editor that was developed by GENTEX Corporation.
For additional information on the Aras Innovator architecture see ‘Aras Innovator, High Level Architecture Description’ or check out the Posts Tagged ‘Integration’ and ‘Web services’.
Like this:
Like Loading...