If you use Dojo Diagrammer layer files in an asynchronous
AMD application, you must make sure the layer files are loaded before
the loader tries to resolve any Dojo Diagrammer module: enclose the require call
that loads the modules in a second require call
that loads the layers.
The following code example shows part of the same application
modified to use layer files.
require([ "ibm_ilog/diagram/ibm_diagram_base", "ibm_ilog/graphlayout/ibm_graphlayout_base", "ibm_ilog/graphlayout/ibm_graphlayout_hierarchical" ], function(){ require([ "dojo/parser", "dojo/ready", "ibm_ilog/diagram/widget/Diagram", "ibm_ilog/graphlayout/hierarchical/HierarchicalLayout", "dojo/data/ItemFileReadStore ], function( parser, ready, Diagram, HierarchicalLayout, ItemFileReadStore){ ... }); });
You do not need to make other changes to your code.