Introduction

The purpose of this document is to provide a Guide to Programming Aras Innovator. It covers key aspects of programming Aras Innovator for implementing your own business logic within the Aras Innovator Enterprise Application Framework.

This document is intended to be used as a Desktop Reference and User Guide covering the following topics:

  • The AML (Aras Markup Language), which is the language that drives the Aras Innovator server.
  • The IOM (Innovator Object Model), which is the Object API for the AML.
  • How Methods work and the Methodology for implementing your own business logic.
  • A Cookbook of recipes for performing common tasks.
  • The .NET controls the API that the Aras Innovator Client is built on.

Everything in Aras Innovator is an Item, which is an instance of an ItemType, which itself is an Item; illustrating that Aras Innovator is a self-describing system. Don’t get hung up on the self-describing nature of Aras Innovator and focus on the simplicity that everything eventually is an Item.

Items may have relationships to other Items illustrating that Items have structure. Relationships are defined by RelationshipType, which is an Item that has three properties to define the RelationshipType rule for the:

source (parent) Item.

related (child) Item.

relationship Item.

When you create the RelationshipType you also create an ‘is_relationship’ ItemType which has the same name as the RelationshipType. Its id is the value of the relationship_id Property on the RelationshipType. This can get a bit confusing but simply put there is a RelationshipType/ItemType pairing to define the RelationshipType rule and an ItemType to store the relationship Items.

Relationship Items have a related_id Property of type Item, which is the related (child) Item for the relationship. The related_id Property is a link that points to an Item. The relationship Item also has a source_id Property of type Item and is the source (parent) Item for the relationship.

So, in Aras Innovator everything is an Item, and Items may have relationships, which are Items that have source and related Item Properties forming an Item configuration.

For example, an ItemType Item has Property relationships, and this Item configuration maps directly to the relational database for persistent storage of the Item instances. Every ItemType has a matching relational TABLE where the Property names are the COLUMN names.

The Aras Markup Language (AML) is an XML dialect that follows the simple /Item/Relationships/Item/Relationships repeating pattern to describe Item configurations. Clients submit AML documents to the Aras Innovator server and receive an AML document back.

An AML document contains data (Items), structure (Relationships, which are hierarchical Items), and logic (an action to perform some business logic on the Item). Each Item in the AML document has an action attribute, which is the name of an Aras Innovator Method that performs business logic on the Item. The Aras Innovator server interprets AML documents in a similar way to scripting languages. AML documents are often referred to as AML scripts.

This is an example of a BOM in AML language:

<Item type="Part” action="add">
 <item_number>999-888</item_number>
 <description>Some Assy</description>
 <Relationships>
 <Item type="Part BOM” action="add">
 <quantity>10</quantity>
 <related_id>
 <Item type="Part” action="add">
 <item_number>123-456</item_number>
 <description>1/4w 10% 10K Resistor</description>
 </Item>
 </related_id>
 </Item>
 </Relationships>
</Item>

The IOM (Innovator Object Model or Item Object Model) is an Object Model on top of the AML. It provides the ability to build and submit AML documents to the Aras Innovator Server using a simple Object API.

There is the ‘Method’ ItemType, which is used to implement user defined business logic. Methods are written in JavaScript, C#, or VB.Net and use the IOM API to implement the business logic.

The following is a Method in JavaScript using the IOM that is the same as the AML BOM example in the previous section:

var innovator = new Innovator();
var partItem = innovator.newItem(“Part”,"add”);
partItem.setProperty(“item_number”, “999-888");
partItem.setProperty(“description”, “Some Assy”); 
var bomItem = innovator.newItem(“Part BOM”,"add”);
bomItem.setProperty(“quantity”, “10");
var relatedItem = new Item(“Part”,"add”);
relatedItem.setProperty(“item_number”, “123-456"); 
relatedItem.setProperty(“description”, “1/4w 10% 10K Resistor”); 
bomItem.setRelatedItem(relatedItem);
partItem.addRelationship(bomItem) ;
var resultItem = partItem.apply();