Using Nested Application Modules
Application modules support the ability to create software components that mimic the modularity of your use cases, for which your higher-level functions might reuse a sub-function that is common to several business work flows. You can implement this modularity by defining composite application modules that you assemble using instances of other application modules. This task is referred to as application module nesting. That is, an application module can logically contain one or more other application modules, as well as view objects. The outermost containing application module is referred to as the root application module.
Any application module can be used as a root application module, but it would usually be one that maps to a more complex use case. When a root application module contains other nested application modules, they all participate in the root application module's transaction and share the same database connection and a single set of entity caches. This sharing is handled for you automatically by the root application module and its Transaction object.
When you nest an instance of one application module inside another, you aggregate not only the view objects in its data model, but also any service methods it defines. This feature of nesting, or reusing, an instance of one application module inside of another is one of the most powerful design aspects for implementing larger-scale, real-world application systems.
The example on the slide shows that the application module InventoryAM contains nested application module instances of StockAM and ProcureAM, in addition to view object instances.