Management Center framework

The Management Center for HCL Commerce framework is the foundation for HCL Commerce business user tooling. The business objects that are managed with Management Center are defined by the individual components that make up Management Center. The Management Center framework uses these definitions to provide the features that you can use to find, create, modify, and delete the defined business objects. If you plan to customize the Management Center, ensure that you understand the framework and all of the components that make up Management Center.

Management Center is a rich graphical web-based tool that business users interact with to manage their store and business objects. Management Center is developed by using dynamic HTML technology, specifically the Dojo Asynchronous Module Definition (AMD) loader. For more information about this Dojo AMD loader, see Dojo AMD modules.

Management Center is supported by the Spring framework. The Spring Framework is a programming and configuration model for Java based enterprise applications. For more information about the Spring framework, see Spring framework

Overview of the Management Center framework

The following diagram shows the components and high-level interactions within the Management Center framework

Management Center architecture

When a business user accesses the Management Center application through their browser, the application Dojo AMD loader loads the AMD modules and configuration information, which are called definitions, from the Management Center web application. These definitions are XML files that the Management Center framework uses to understand how to display all of the tools, business objects, properties views, and list views in Management Center.

As the user manages objects with Management Center, the Management Center application makes name-value pair HTTP requests to the Management Center web application. These requests communicate through web services within the HCL Commerce server to send and retrieve data.

When the HCL Commerce server receives data from the Management Center application of the business user's browser, the server processes the actions on the business objects.

In between the Management Center application in the client browser of the business user and the HCL Commerce server, is the Management Center web application. The web application mediates the name-value pair HTTP requests into service requests.

The Management Center model

When a business user is accessing Management Center and is working with a business object, they are interacting with an instance of the Management Center and an instance of the business object. The instance, or model, of the Management Center is created when the framework loads the application and remains until the business user closes the application. The model is responsible for invoking services that create new objects, read existing objects, save changes to objects, and delete objects.

When the Management Center framework loads a business object into Management Center, an instance, or model object, of the business object is created. If a unique business object is loaded more than once, the Management Center model ensures that there is only a single model object of that business object. This model object is a representation of the business object. A model object of a business object is created when a business user requests that Management Center create a business object or load a business object from the server. The characteristics for the object are defined within the object definition for the object. When a business user is working with an object in Management Center, they are working with only model objects.

When a business user is working within Management Center, the Management Center model maintains the list of objects that the business users has open for managing. These objects display under the Active work node within the explorer view. An object is moved to open state if the business user explicitly opens the object, or if the user changes an object. Objects can be explicitly closed by the user.

When a business user selects an object in the explorer view or selects to open an object, user interface widgets are used to display information, or properties, about the object. If the object that the user selected includes child objects, a user interface widget can display the child objects within a list view widget. One or more user interface widgets can be bound to an object or an object property. If a user updates the object or object property in one widget, the changes are reflected in all other widgets, or views, for the object. For example, if a user changes a promotion name in the properties view for the promotion, the updated name displays for the promotion in any list view, properties view, or calendar view.

When the Management Center framework loads the property information for a business object, an instance, or model of the property is created. When a business users is managing an object, the properties that the user is viewing and managing are model properties for the object. The model objects and model properties that a user is managing exists only within the Management Center model that the user is accessing. New objects and properties, and changes to objects and properties, exist only within the model until the objects and properties are saved to the server and database. Business users can create and change several business objects before they save their work. It is possible that other business users can be working on the same objects at the same time in different Management Center models, which can cause save conflicts. These conflicts can be reduced by ensuring that component services are as granular as possible. Only the properties that are changed by the business user are sent back to the server. Then, when two business users change different aspects of the same object, none of their changes conflict. Business users can explicitly refresh the model to ensure that any changes that are made by other business users are visible in their Management Center model.

When a user is working within Management Center, the model maintains model objects and properties for only the objects that have an active navigation path that is available to the user. For example, open objects, objects that are displaying in an active list, and objects that are displaying in the explorer view have an active navigation path. Objects that do not have an active navigation path, such as objects from a discarded set of search results, are purged from the model.

Note: A user can interact with only a single Management Center model with their user log in credentials. Users cannot open the same Management Center model in different browser tabs. If a user attempt to open a second Management Center instance in another tab, the user is logged out of the first instance.

Explaining customization points for CMC

Follow the high level steps given below explaining customization points for CMC.

You can create your own tools using the new programming model for Management Center. The steps for creating a new tool can be divided into two parts:
  1. Create the new tool components in the tooling SPA
    • The tooling SPA is loaded into Management Center in an IFrame. It doesn't matter where the application assets are loaded, hence auth and live share the same instance.
    • The SPA can be asked to find the transaction server by Management Center - using window.postMessage.
    • If you load the auth version of Management Center, then the SPA is told to use the auth transaction server.
    • If you use the live version of Management Center, then the SPA is told to use the live transaction server.
  2. Add the new tool to Management Center

The new tool must have a single landing page route configured with the tooling SPA. The new tool can contain additional pages that can be accessed after the landing page has been loaded. The source for the tooling SPA is made available for customization.

The new tool is defined by creating a new instance definition that extends the IFrameTool class. This new instance definition must be defined in an xml file located in a directory located in LOBToools/WebContent/WEB-INF/src/xml.

For example, the account management tool is defined using the new programming model. The account management IFrameTool instance definition is defined in LOBTools/WebContent/WEB-INF/src/xml/commerce/account/AccountManagementToolDefinition.xml:
	<IFrameTool definitionName="cmc/account/AccountManagement" displayName="${shellResources.accountManagementDisplayName}" src="/accounts" respectWorkspaceContext="false">
		<dependency localName="shellResources" moduleName="cmc/shell/ShellResources"/>
  • definitionName is the name of the definition. It must be a unique.
  • displayName is the name of the tool that will be displayed to the user. This can be a hardcoded string or a resource bundle string.
  • src is the relative URL of the route to the landing page in the SPA.
  • respectWorkspaceContext indicates if the tool requires workspaces.

    To make the new tool available to Management Center users, a new menu item must be added to ApplicationMenuItems.xml (LOBTools/WebContent/WEB-INF/src/xml/commerce/shell/ApplicationMenuItems.xml).

    The following code defines the menu item for the Account Management tool:
    <ApplicationMenuItem actionName="openBusinessObjectEditor" 
    id="accountManagement" package="cmc/shell" 
    toolDefinition="cmc/account/AccountManagement" usage="HCL_AccountTool">
Note: The toolDefinition attribute is set to the definitionName of the IFrameTool instance definition.