Develop > Controller layer > Management Center Web application > Customize the Management Center Web application > Create new objects


Define process services for a custom Management Center object

Define the authoring services such as create, save, and delete for the Management Center object to the WebSphere Commerce OAGIS service consists of first defining the URL parameter mapping to the Noun in the BOD request, then configuring the Struts action to indicate the Verb and additional processing information.

To map a Management Center object to a business object document request:


Procedure

  1. Open WebSphere Commerce Developer.

  2. Navigate to the LOBTools web application project.

  3. In the WebContent/WEB-INF/config/serviceModuleName directory, (where serviceModuleName is the name of the service module, such as com.ibm.commerce.catalog) create a XML file that will define the mapping between elements of the Noun to properties of the Management Center object. IBM recommends to use the name of the tool as part of the file name. For example, if the Management Center object is used for the catalog tool, name the file mycompany-catalog-clientobjects.xml where catalog represents the catalog tool and mycompany indicates this file is provided by the organization.

    1. In the Noun element, add the Noun to the list of Nouns. If this Noun has any parts that can be modified, indicate those elements under the Noun and specify the part attribute as true. If the Noun has a UserData field that should be mapped to the Management Center object, the property name should begin with x_ and proceeding is a location pointer of the UserData field in the Noun that property represents.

    2. In the URL element, add the mapping of the Management Center object to the Noun. For each property of the Management Center object, specify the XPath location of the Noun that property represents.

    3. In the ValidationErrorMapping element, specify the resource bundle that will be used to override the error messages returned by the server. A mapping of validation reason codes can be mapped to properties of the each Management Center object.

  4. Open the struts-extension.xml file and add the new XML file to the list of files specified in the config property of the BusinessObjectDocumentPlugin.

  5. In the same file, create new BusinessObjectDocument Struts actions for each authoring service supported by the Management Center object. These Struts actions will define the verb and additional information required to invoke the Business Object Document service.

    • If the Management Center object represents the Noun, the Create and Delete services correspond to the Process business object document request with an action code of Create or Delete.

    • If the Management Center object represents a part of the Noun, the Create and Delete services correspond to the Change business object document request with an action code of Add or Delete.

    • Update services will always correspond to the Change business object document with an action code of Change.

  6. Save the struts-extension.xml file.

  7. Restart the WebSphere Commerce Server and test the changes.

  8. Deploy the changes to the production environment.

Related reference

Transforming URL requests into Process BODs


+

Search Tips   |   Advanced Search