Factories
At runtime, when a new object needs to be created to represent a particular Business Object (instance of a BOM class) or other variable, a factory method needs to be used to create the object instead of using the new keyword that is usually used in JavaScript.
The factory methods for BOM classes can be found in factory classes whose names match the package name of the BOM, for example, for a BOM with a package name com.example.ordermodel the factory class would be called factory.com_example_ordermodel, and there would be methods in the factory called createClassname for each class in the BOM. For example if the BOM contained Classes called Order, OrderLine, and Customer, there would be the following factory methods:
factory.com_example_ordermodel.createOrder() factory.com_example_ordermodel.createOrderLine() factory.com_example_ordermodel.createCustomer()