Tutorials > Sales Center > Add an editable column to the Order Items table by creating a new widget manager

< Previous | Next >


Determine which BOD is used to communicate from the server to the client

In this step, you determine what BOD is used to communicate with Sales Center and which class needs to be extended on the server side.

Sales Center relies on BOD to communicate with WebSphere Commerce. Since BOD messages are event-driven, after each action, a BOD might be created depending on what the action entails. You can run Sales Center and see instantaneously what BOD messages are created. By default, tracing of BOD messages is turned off.

To turn it on, do the following steps:

  1. Within the IBM Sales Center development environment, click Run > Run.

  2. In the Arguments tab, make note of the Workspace Data Location. By default the location is WCDE_INSTALL\mscworkspace\runtime-workspace. This is the location in which to store the BOD files.

  3. In the Tracing tab,

    1. Select Enable tracing for the selected plug-ins.

    2. In the Plug-ins that support tracing list, select com.ibm.commerce.telesales.core.impl plugin.

    3. Click Run.

  4. When the IBM Sales Center client opens, follow the previous instructions to test the changes by searching for a manufacturer part number.

  5. In the file system, navigate to the Workspace Data Location that you examined. By default, the location is WCDE_INSTALL\mscworkspace\runtime-workspace. Within this directory, navigate to the debug\bodmessages directory. All BODs exchanged between the client and the server are stored in this directory.

There might be existing BODs in this directory.

To make it easier to track, you can delete existing BODs before doing any actions in Sales Center.

For the purpose of this tutorial, you have to determine in which BOD it makes sense to store information about the fulfillment centers. created for Sales Center. Look at the default BODs, keeping in mind that fulfillment centers are dependent on stores. Suppose you are selecting a store, as shown here:

In the directory where the BOD messages are kept, two BODs are created as a result of this:

The GetStore BOD is what Sales Center sends to WebSphere Commerce to get store information, and ShowStore is what WebSphere Commerce sends back to Sales Center as a result. So, from this data, it makes sense to include fulfillment centers information in the ShowStore BOD. Open this BOD to study its contents and attempt to match it with the APIs found in the next section.


Determine which class to extend

Now to see how the ShowStore BOD is created. Specifically, you want determine which class creates this BOD.

To do this, refer to ShowStore in the information center.

Because you potentially need to send information to many fulfillment centers, you have to create the own custom section in the BOD to incorporate this data. You also have to extend the client side to let Sales Center know that this data is in that BOD. After going through the methods, you can see that the createStoreElement method is probably the best method to create the ShowStore BOD. Typically, you can tell by the name, but in cases where you are uncertain, you can also look at the method that calls createStoreElement. In this case, buildDataArea explains how the createStoreElement method is invoked. You can conveniently add the custom tag in this BOD and populate it with the fulfillment center information.

< Previous | Next >


+

Search Tips   |   Advanced Search