Wednesday, March 23, 2016

WCS Interview Questions and Answers

We can expect these are the common questions for most of the wcs interviews.

  1. What is mean by optimistic locking?
  2. What is the use of optcounter?
  3. What is controller command and task command?
  4. Difference between task and contoller command?
  5. Is it possible as the stage propagation from prod to stage?
  6.  The commands name you used for these sub system(Order, Member,Catalog, etc.
  7. Can we place a order without doing a payment?
  8. Difference between B2B and B2C?
  9. Difference between Master and Sales catalaog?
  10. Difference between extended site and consumer direct store?
  11. What is the advantage to use extended site?
  12. Can we create multiple pending orders in B2C store?
  13. Have you worked BOD, If Yes then explain the flow?
  14. Have You create a new REST command, If Yes the explain the flow?
  15. What are the tables involved in orders subsystem?
  16. What is the use of acpload?
  17. priority for the cmdreg entries for extended site store?
  18. What are the tables involved for acpload?
  19. Can we publish a new store without creating organization?
  20. Caching
  21. Product and Item mapping
  22. Category and Product mapping
  23. What are the caching tables will be involved, if we are using DOM inventory system?
  24.  How to debug the promotion?
  25. Difference between OrderCalculateCmd and CalculateOrderCmd?

Frequently using commands:

OrderCreateCmd
OrderItemAddCmd
OrderItemDeleteCmd
OrderItemUpdateCmd

OrderCalculateCmd
OrderPrepareCmd
OrderProcessCmd

OrderCancelCmd
OrderDisplayCmd


UserRegistrationAddCmd
UserRegistrationUpdateCmd
AddressAddCmd
AddressUpdateCmd

TopCategoryDisplayCmd
CategoryDisplayCmd
ProductDisplayCmd

PIAddCmd
PIUpdateCmd
PIRemoveCmd


 

Wednesday, March 16, 2016

Install Java Decompiler in Rational Application Developer (WCS).

1.Download the JAD file from the following links.

http://www.softpedia.com/get/Programming/Debuggers-Decompilers-Dissasemblers/JAD.shtml

http://www.varaneckas.com/jad

2.Download the JAD eclipse plugin from the following site.

https://sourceforge.net/projects/jadclipse/

The download file name should be "(net.sf.jadclipse_x.x.x.jar)".

3.Copy the plugin JAR "(net.sf.jadclipse_x.x.x.jar)" and place it in the RAD installed Path "C:\IBM\SDP8\plugins".
4.Restart the RAD
5.After the restart the new JadClipse option will be available in the prefences.

For that:
Click Windows> Preferences>Java then click the JadClipse option, in right side has the option for  Path To Decompiler.

There, we have to specify the JAD file path (Downloaded file in Step 1)
"\C:\IBM\SDP8\jadnt158\jad.exe"





Best Seller And Top Browsed ESpot in Websphere Commerce Server

Follow the steps to mentioned below to show the Best Seller and Top Browsed espot.


  1. Enable the persistent sessions feature and personalization ID feature. These features are required to support behavioral marketing.
    1. Find the <PersonalizationId> element. It looks like the following example:
      <PersonalizationId enable="false"/>
    2. Ensure that the enable attribute is set to true. Depending on your site, this attribute might already be enabled, and require no change.
    3. Find the <PersistentSession> element. It looks like the following example:
      <PersistentSession cookieExpiry="30" display="false" enable="true"/>
    4. Ensure that:
      • The enable attribute is set to true.
      • The cookieExpiry value is a positive number. This number represents the number of days sessions are persisted for a customer.
        To enable persistent sessions, change set the cookieExpiry value to a positive number.
  2. Enable the following marketing listeners: the SensorEventListener and ExperimentEvaluationECEventListener. These listeners must be enabled to support some behavioral marketing features and to gather marketing statistics for marketing experiments:
    1. Find the following string:
      compClassName="com.ibm.commerce.marketing.dialog.trigger.SensorEventListener"
    2. Below the string, ensure that the enable attribute is set to true, as shown in the following example:
    3. <component
    4.     compClassName="com.ibm.commerce.marketing.dialog.trigger.SensorEventListener"
    5.     enable="true" name="SensorEventListener">
    6.     <property display="false">
    7.         <start enabled="true"/>
    8.     </property>
      </component>
    9. Find the following string:
      compClassName="com.ibm.commerce.marketingcenter.events.runtime.ExperimentEvaluationECEventListenerImpl"
    10. Below the string, ensure that the enable attribute is set to true, as shown in the following example:
    11. <component
    12.     compClassName="com.ibm.commerce.marketingcenter.events.runtime.ExperimentEvaluationECEventListenerImpl"
    13.     enable="true" name="Experiment Evaluation Event Listener">
    14.     <property display="false">
    15.         <start enabled="true"/>
    16.     </property>
      </component> 


  3. Create an Emarketing spot to show the best selling/ top browsed items based on the info center link http://www.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.management-center.doc/concepts/csbactdisbestsell.htm?lang=en
  4. Run the RaiseECEvent scheduled job(This might not be required in case top browsed items list) using Admin Console. When a customer places an order, the RaiseECEvent job asynchronously check whether the categories associated with the purchased products match against any of the defined Display Best Sellers Web activities.
  5.  Once a day, when the SendMarketingTriggers scheduled job runs (at the time set in dailyScheduledJobTimeForTriggers parameter), the DMRANKINGSTAT entries are summarized and entries are created in the DMRANKINGITEM table.
  6.  For developer version, Run the SQL query to make sure that SendMarketingTrigger job will take all the DMACTIVITY_IDs those are there in the DMARKETINSTAT table. 

             DELETE FROM DMACTATTR WHERE DMACTIVITY_ID = 0 OR DMACTIVITY_ID =

        (SELECT DMACTIVITY_ID FROM DMACTIVITY WHERE NAME = '')


Create a Order XML in Websphere Commerce

If we hhe inventory system as DOM then the order will goes to external system  and  inventory also process from external system only.

But We have a store in ATP and NON ATP then still if the order goes to external system or generate as a xml file then we have to extend the command
com.ibm.commerce.order.event.ProcessOrderSubmitEventCmdImpl and skip the inventory system check. then automatically the orders goes to external system.

Rest Services Caching in Websphere Commercer

From FEB7 onwards, We are using all the services via rest, So for performance consideration, we can cache the rest service calls also.

Use the following way to cache the rest services.

We have to create a new cachespec.xml and place it in Search-Rest/WebContent/ folder. then after the server restarts,the rest services calls also started caching and monitor from cache monitor tool.

In the XML Contains,

<?xml version="1.0"    ?>
<!DOCTYPE cache    SYSTEM "cachespec.dtd">

<!--
 =================================================================
  Licensed Materials - Property of IBM

  WebSphere Commerce

  (C) Copyright IBM Corp. 2011 All Rights Reserved.

  US Government Users Restricted Rights - Use, duplication or
  disclosure restricted by GSA ADP Schedule Contract with
  IBM Corp.
 =================================================================
-->

<!-- ******************************************************************************************************************** -->
<!-- * RESTful Services cachespec.xml.                                                                                  * -->
<!-- *                                                                                                                  * -->
<!-- * This sample is provided as an example on how to set up caching for the RESTful Services URLs.                    * -->
<!-- *                                                                                                                  * -->
<!-- * The RESTCacheFilter extracts the path parameters and sets it as request attributes.                              * -->
<!-- * The request attributes are then used to build cache-ids.                                                         * -->
<!-- * The cache-id rules are then applied to determine which of the following URLs are cached.                         * -->
<!-- *                                                                                                                  * -->
<!-- * /wcs/resources/store/{storeId}/categoryview/@top                                                                 * -->
<!-- * /wcs/resources/store/{storeid}/categoryview/{categoryIdentifier}                                                 * -->
<!-- * /wcs/resources/store/{storeid}/categoryview/byId/{uniqueID}                                                      * -->
<!-- * /wcs/resources/store/{storeid}/productview/{partnumber}                                                          * -->
<!-- * /wcs/resources/store/{storeid}/productview/byId/{uniqueID}                                                       * -->
<!-- * /wcs/resources/store/{storeId}/productview/byCategory/{category_unique_id}                                       * -->
<!-- * /wcs/resources/store/{storeId}/espot/{espotIdentifier}                                                           * -->
<!-- * /wcs/resources/store/{storeId}/espot/{espotIdentifier}/category/{categoryId}                                     * --> 
<!-- * /wcs/resources/store/{storeId}/espot/{espotIdentifier}/product/{productId}                                       * -->
<!-- * /wcs/resources/store/{storeId}/productview/bySearchTerm/{searchTerm}?pageNumber={pageNumber}&pageSize={pageSize} * -->
<!-- * /wcs/resources/store/{storeId}/productview/bySearchTerm/{searchTerm}?metaData={metaDataValue}                    * -->
<!-- *                                                                                                                  * -->
<!-- * Available request attributes                                                                                     * -->
<!-- * storeId. {storeId}                                                                                               * -->
<!-- * catalogId. {catalogId}                                                                                           * -->
<!-- * productId. product id of the {partnumber}, {productId}, {uniqueId} of product URL                                * -->
<!-- * categoryId. category id of the {groupId}, {categoryId}, {category_unique_id}, {uniqueId} of category URL         * -->
<!-- * espotId. {espotIdentifier}                                                                                       * -->
<!-- * searchTerm. {searchTerm}                                                                                         * -->
<!-- * action. possible values: [productDisplay | categoryDisplay]                                                      * -->
<!-- * urlType. possible values: [topCategories | espot | search]                                                       * -->
<!-- *                                                                                                                  * -->
<!-- * The dependency-ids are generated to match the invalidation scheme defined in other sample cachespec.xmls         * -->
<!-- * This cachespec must be used in conjunction with those cachespecs where the invalidation schemes are defined.     * -->
<!-- * See the cachespec.xml under invalidation/store and invalidation/catalog                                          * -->
<!-- ******************************************************************************************************************** -->

<cache>
 
  <cache-entry>
      <class>servlet</class>
      <name>org.apache.wink.server.internal.servlet.RestServlet.class</name>
     
      <cache-id>
         <property name="ignore-get-post">true</property>
        
         <component id="urlPath" type="pathinfo">
            <required>true</required>
         </component>
         <component id="method" type="requestType">
             <required>true</required>
             <value>GET</value>
         </component>
         <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="catalogId" type="attribute">
            <required>true</required>
         </component>
         <component id="projectId" type="attribute">
            <required>true</required>
         </component>
       
      </cache-id>
      <dependency-id>projectId
        <component id="projectId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
      <dependency-id>storeId:projectId
        <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="projectId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
     
     
     
      <!-- /wcs/resources/store/{storeId}/categoryview/@top -->
      <cache-id>
         <property name="ignore-get-post">true</property>
         <component id="urlPath" type="pathinfo">
            <required>true</required>
         </component>
         <component id="method" type="requestType">
             <required>true</required>
             <value>GET</value>
         </component>
         <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="catalogId" type="attribute">
            <required>true</required>
         </component>
         <component id="urlType" type="attribute">
            <required>true</required>
            <value>topCategories</value>
         </component>
         <component id="responseFormat" type="parameter">
            <required>false</required>
         </component>
         <component id="langId" type="parameter">
            <required>false</required>
         </component>
         <component id="currency" type="parameter">
            <required>false</required>
         </component>
         <component id="locale" type="parameter">
            <required>false</required>
         </component>     
      </cache-id>
      <dependency-id>TopCategoriesDisplay:storeId:catalogId
      <component id="urlType" type="attribute" ignore-value="true">
            <required>true</required>
            <value>topCategories</value>
         </component>
        <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="catalogId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
      
      <!-- /wcs/resources/store/{storeid}/categoryview/{categoryIdentifier} -->
      <!-- /wcs/resources/store/{storeid}/categoryview/byId/{uniqueID} -->
      <!-- /wcs/resources/store/{storeId}/product/byCategory/{category_unique_id} -->
      <!-- /wcs/resources/store/{storeId}/espot/{espotIdentifier}/category/{categoryId}  -->      
       <cache-id>
         <property name="ignore-get-post">true</property>
         <component id="urlPath" type="pathinfo">
            <required>true</required>
         </component>
         <component id="method" type="requestType">
             <required>true</required>
             <value>GET</value>
         </component>
         <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="catalogId" type="attribute">
            <required>true</required>
         </component>
         <component id="espotId" type="attribute">
            <required>false</required>
         </component>
         <component id="categoryId" type="attribute">
            <required>true</required>
         </component>
         <component id="responseFormat" type="parameter">
            <required>false</required>
         </component>
         <component id="langId" type="parameter">
            <required>false</required>
         </component>
         <component id="currency" type="parameter">
            <required>false</required>
         </component>
         <component id="locale" type="parameter">
            <required>false</required>
         </component>
         <component id="pageNumber" type="parameter">
            <required>false</required>
         </component>
         <component id="pageSize" type="parameter">
            <required>false</required>
         </component>
      </cache-id>
      <dependency-id>categoryId
        <component id="categoryId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
      <dependency-id>storeId:categoryId
        <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="categoryId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
       <dependency-id>TopCategoriesDisplay:storeId:categoryId
        <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="categoryId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
       <dependency-id>CategoryDisplay:storeId:categoryId
        <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="categoryId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
      
       <!-- /wcs/resources/store/{storeid}/productview/{partnumber} -->
       <!-- /wcs/resources/store/{storeid}/productview/byId/{uniqueID} -->
       <!-- /wcs/resources/store/{storeId}/espot/{espotIdentifier}/product/{productId} -->
       <cache-id>
         <property name="ignore-get-post">true</property>
         <component id="urlPath" type="pathinfo">
            <required>true</required>
         </component>
         <component id="method" type="requestType">
             <required>true</required>
             <value>GET</value>
         </component>
         <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="catalogId" type="attribute">
            <required>true</required>
         </component>
         <component id="espotId" type="attribute">
            <required>false</required>
         </component>
         <component id="productId" type="attribute">
            <required>true</required>
         </component>
         <component id="responseFormat" type="parameter">
            <required>false</required>
         </component>
         <component id="langId" type="parameter">
            <required>false</required>
         </component>
         <component id="currency" type="parameter">
            <required>false</required>
         </component>
         <component id="locale" type="parameter">
            <required>false</required>
         </component>
         <component id="pageNumber" type="parameter">
            <required>false</required>
         </component>
         <component id="pageSize" type="parameter">
            <required>false</required>
         </component>
      </cache-id>
      <dependency-id>productId
        <component id="productId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
      <dependency-id>storeId:productId
        <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="productId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
       <dependency-id>ProductDisplay:storeId:productId
        <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="productId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
      
       <!-- /wcs/resources/store/{storeId}/espot/{espotIdentifier} -->
       <cache-id>
         <property name="ignore-get-post">true</property>
         <component id="urlPath" type="pathinfo">
            <required>true</required>
         </component>
         <component id="method" type="requestType">
             <required>true</required>
             <value>GET</value>
         </component>
         <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="catalogId" type="attribute">
            <required>true</required>
         </component>
         <component id="espotId" type="attribute">
            <required>true</required>
         </component>
         <component id="urlType" type="attribute">
            <required>true</required>
            <value>espot</value>
         </component>
         <component id="responseFormat" type="parameter">
            <required>false</required>
         </component>
         <component id="langId" type="parameter">
            <required>false</required>
         </component>
         <component id="currency" type="parameter">
            <required>false</required>
         </component>
         <component id="locale" type="parameter">
            <required>false</required>
         </component>
      </cache-id>
      <dependency-id>storeId:spotName
        <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="espotId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
      
      
      <!-- /wcs/resources/store/{storeId}/productview/bySearchTerm/{searchTerm}?pageNumber={pageNumber}&pageSize={pageSize} -->
      <!-- /wcs/resources/store/{storeId}/productview/bySearchTerm/{searchTerm}?metaData={metaDataValue} -->
      <cache-id>
     <property name="ignore-get-post">true</property>
     <component id="searchPath" type="pathinfo">
            <required>true</required>
         </component>
         <component id="method" type="requestType">
             <required>true</required>
             <value>GET</value>
         </component>
         <component id="storeId" type="attribute">
                <required>true</required>
         </component>
         <component id="catalogId" type="attribute">
                <required>true</required>
         </component>
         <component id="searchTerm" type="attribute">
                <required>true</required>
         </component>
         <component id="pageView" type="parameter">
            <required>false</required>
     </component>
     <component id="beginIndex" type="parameter">
            <required>false</required>
     </component>
     <component id="pageSize" type="parameter">
            <required>false</required>
     </component>
     <component id="searchType" type="parameter">
        <required>false</required>
     </component>
     <component id="showResultsPage" type="parameter">
        <required>false</required>
     </component>
     <component id="sType" type="parameter">
        <required>false</required>
     </component>
     <component id="resultCatEntryType" type="parameter">
         <required>false</required>
     </component>
     <component id="metaData" type="parameter">
        <required>false</required>
     </component>
     <component id="orderBy" type="parameter">
         <required>false</required>
     </component>
     <component id="searchTermScope" type="parameter">
        <required>false</required>
     </component>
     <component id="facet" type="parameter">
         <required>false</required>
     </component>
     <component id="filterFacet" type="parameter">
        <required>false</required>
     </component>
     <component id="filterTerm" type="parameter">
         <required>false</required>
     </component>
     <component id="filterType" type="parameter">
        <required>false</required>
     </component>
     <component id="manufacturer" type="parameter">
        <required>false</required>
     </component>
     <component id="minPrice" type="parameter">
        <required>false</required>
     </component>
     <component id="maxPrice" type="parameter">
        <required>false</required>
     </component>
     <component id="catGroupId" type="parameter">
        <required>false</required>
     </component>
     <component id="responseFormat" type="parameter">
              <required>false</required>
         </component>
         <component id="langId" type="parameter">
            <required>false</required>
         </component>
         <component id="currency" type="parameter">
             <required>false</required>
         </component>
         <component id="locale" type="parameter">
             <required>false</required>
         </component>
     <component id="orderBy" type="parameter">
             <required>false</required>
         </component>
      </cache-id>
      <dependency-id>storeId
         <component id="urlType" type="attribute" ignore-value="true">
            <required>true</required>
            <value>search</value>
         </component>
         <component id="storeId" type="attribute">
            <required>true</required>
         </component>        
       </dependency-id>
       <dependency-id>catalogId
         <component id="urlType" type="attribute" ignore-value="true">
            <required>true</required>
            <value>search</value>
         </component>
         <component id="catalogId" type="attribute">
            <required>true</required>
         </component>        
       </dependency-id>
       <dependency-id>storeId:catalogId
         <component id="urlType" type="attribute" ignore-value="true">
            <required>true</required>
            <value>search</value>
         </component>
         <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="catalogId" type="attribute">
            <required>true</required>
         </component>        
       </dependency-id>
       <dependency-id>storeId:categoryId
         <component id="urlType" type="attribute" ignore-value="true">
            <required>true</required>
            <value>search</value>
         </component>
         <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="categoryId" type="attribute">
            <required>true</required>
         </component>        
       </dependency-id>
       <dependency-id>catalogId:categoryId
         <component id="urlType" type="attribute" ignore-value="true">
            <required>true</required>
            <value>search</value>
         </component>
         <component id="catalogId" type="attribute">
            <required>true</required>
         </component>
         <component id="categoryId" type="attribute">
            <required>true</required>
         </component>        
       </dependency-id>
       <dependency-id>storeId:catalogId:categoryId
         <component id="urlType" type="attribute" ignore-value="true">
            <required>true</required>
            <value>search</value>
         </component>
         <component id="storeId" type="attribute">
            <required>true</required>
         </component>
         <component id="catalogId" type="attribute">
            <required>true</required>
         </component>
         <component id="categoryId" type="attribute">
            <required>true</required>
         </component>        
       </dependency-id>
      
       <dependency-id>priceRule:storeId
         <component id="action" type="attribute" ignore-value="true">
            <required>true</required>
            <value>productDisplay</value>
            <value>categoryDisplay</value>
         </component>
         <component id="storeId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
      
       <dependency-id>catalogFilter:storeId
         <component id="action" type="attribute" ignore-value="true">
            <required>true</required>
            <value>productDisplay</value>
            <value>categoryDisplay</value>
         </component>
         <component id="urlType" type="attribute" ignore-value="true">
            <required>true</required>
            <value>search</value>
            <value>topCategories</value>
         </component>
         <component id="storeId" type="attribute">
            <required>true</required>
         </component>
       </dependency-id>
                   
  </cache-entry>
 
  </cache>

In B2B store, To send a temporary password instead of validation code in websphere commerce

In B2B flow, by default the validation code enabled in websphere commerce.
When we reset the password,it will send you the validation code which will be active in 30mins. If you are not using with in that time then we have to generate new one again.

If we want to send the temporary password instead of validation code, then we have to update the following entry in database.

update cmdreg
set properties='validationCode=false'
where interfacename ='com.ibm.commerce.security.commands.ResetPasswordGuestCmd';

update cmdreg set
properties ='validationCode=false'
where interfacename ='com.ibm.commerce.security.commands.ResetPasswordAdministratorCmd';

update cmdreg set
properties ='validationCode=false'
where interfacename ='com.ibm.commerce.security.commands.ResetPasswordCmd';

If you want the validation code logic back update the validationCode=true in that property field.

Create a new custom widget in Websphere Commerce



To Create a new custom widget, we have to follow the below steps.
 
Ø  Start WebSphere Commerce Developer.
Ø  Create a temporary project in your WebSphere Commerce Developer workspace. The project is used as the target location where the Java Emitter Template (JET) package Transformation generates the source code files for creating a widget.
§  Right-click within the Enterprise Explorer view, select New > Project.
§  In the New Project wizard, select General > Project. Click Next.
§  For the Project name field, enter a name for the temporary project. For example, ShippingCalculatorProject.
§  Click Finish.
Ø  In your temporary ShippingCalculatorProject project, create an XML file to use as a pattern input file for the JET Transformation. The JET Transformation uses the pattern input XML file to create the widget source code files. You can copy and edit the input file to use for generating source code of more custom widgets.
§  Right-click the temporary ShippingCalculatorProject project. Select New > File.
§  In the New File wizard, ensure that your temporary project is selected as the parent folder. Enter a File name for the pattern input XML file. For example, Sample.xml.
§  Click Finish.
§  Right-click your Sample.xml file within your temporary project. Select Open With > XML Editor.
<pageLayout vendor="MyCompany">
  <widget>
    <widgetDef identifier="ShippingCalculator"
      UIObjectName="ShippingCalculatorPageWidget"
      displayName="Shipping Calculator widget"
      description="This widget is for Shipping Calculator" >
    </widgetDef>
  </widget>
</pageLayout>
§  Copy the above code into the file.
§  Save and close the file.
Ø  Use the JET Transformation to generate the source code files to use when you create your custom widget.
§  Right-Click your pattern input XML file. Select Run As > Run Configurations
§  In the Run Configurations wizard, right-click JET Transformation in the list of filters. Select New. The configuration options for the JET Transformation displays.
§  Ensure that the value of the Name field is the name of your pattern input XML file.
§  Click the Main tab.
§  Ensure that the value of the Transformation Input field is the file path within your workspace to the pattern input XML file.
§  In the Transformation section, select com.ibm.commerce.toolkit.internal.pattern.pageLayout for the value of the ID field.
§  Optional: Specify the severity level for the Display Message logging. The default value is information.
§  Click Apply > Run.
The JET Transformation generates a set of file directories and files that you can use to help create your custom widget. The generated file directories contain three main folders directly under your project folder. The three folders represent the three WebSphere Commerce components and tools that you must use or customize to create your widget:
§  Management Center - LOBTools
§  Storefront - Stores
§  Data Load utility - DataLoad.
Ø  Copy the generated source code files for your widget storefront assets from your project folder to the appropriate location within the default Stores project.
§  Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
§  Expand your new project directory, go to Stores\WebContent.
§  Right-click the Widgets-MyCompany directory. Select to Copy the directory.
§  Go to the default Stores\WebContent directory.
§ Paste the copied Widgets-MyCompany directory within the default WebContent directory. 


             Ø   Configure the Data Load utility so that you can use the utility to load your widget information.
§  In the DataLoad directory within your new project directory, open the wc-dataload-env.xml file for editing. The wc-dataload-env.xml file is the data load environment configuration file that is generated to help you configure and run the Data Load utility. The configuration file sets the environment variables that the Data Load utility uses, such as the database settings, ID resolver, and data writer.
§  Update the file to match your database and environment settings. Uncomment and update the appropriate setting for your database. Your complete wc-dataload-env.xml file can resemble the following code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Please update the storeIdenttifier and DB information for your environment -->
<_config:DataLoadEnvConfiguration
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config ../../../xml/config/xsd/wc-dataload-env.xsd"
    xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config">
            <_config:BusinessContext storeIdentifier="AuroraB2BStorefrontAssetStore" languageId="-1">
</_config:BusinessContext>
<!-- The database setting for a Derby database in WebSphere Commerce Developer -->
<!--<_config:Database type="derby" name="..\db\mall" schema="APP"/>-->
<!-- The database setting for an Oracle database -->
<!--
<_config:Database name="<database name>" user="<user>" password="<password>"
port="1521" schema="<schema name>" server="<server>" type="Oracle" dbDriverType="thin" />
<!-- The database setting for an AIX/DB2 server -->
<_config:Database type="db2" name="MALL" user="db2admin" password="Cyber2003" server="localhost" port="50000" schema="DB2ADMIN" />
<_config:IDResolver className="com.ibm.commerce.foundation.dataload.idresolve.IDResolverImpl" cacheSize="0"/>
<_config:DataWriter className="com.ibm.commerce.foundation.dataload.datawriter.JDBCDataWriter" />
</_config:DataLoadEnvConfiguration>

           Ø  Run the Data Load utility.
§  Ensure that your WebSphere Commerce Server is stopped before you run the Data Load utility. For more information about stopping your server, see Starting and stopping WebSphere Commerce Test Server.
§      In a command-line utility, go to the WCDE_installdir\bin directory.
§      Run the following command to load the input CSV files to register your widget and have a store subscribe to your widget:

§      Dataload.bat workspace_dir\ShippingCalculatorProject\DataLoad\widget\wc-dataload-widget.xml
           Ø  Copy the generated resource bundle and properties files into your default workspace directory structure.
§  In a File Manager, go to the com directory within your new widget project directory. For example, if your new widget project is at the top-level in your workspace the filepath to the com directory, can be workspace_dir\ShippingCalculatorProject\LOBTools\src\com.
§  Copy the MyCompany directory.
§  Go to the workspace_dir\LOBTools\Java Resources\src directory.
§  Paste your copied MyCompany directory within the LOBTools\Java Resources\src directory.
§  Open WebSphere Commerce Developer. Switch to the Enterprise Explorer view.
§  Right-click the LOBTools directory within your default workspace directory structure. Click Refresh.
§ In the LOBTools\Java Resources\src directory, ensure that the com.MyCompany.commerce.pagelayout.client.lobtools.properties package exists. Within the package, ensure that the PageLayoutLOB.properties and PageLayoutLOB_en_US.properties files exist.
           Ø  Define the translatable text for your new widget.
§  In the Enterprise Explorer view, go to the LOBTools\Java Resources\src directory. Expand the com.MyCompany.commerce.pagelayout.client.lobtools.properties package. Open the PageLayoutLOB.properties and PageLayoutLOB_en_US.properties files for editing. The following generated code is included within the files:

    # Widget properties view
ShippingCalculatorPageWidgetContent=This widget is for Shipping Calculator
§   Define any additional translatable text for your widget by adding code into both files.
§   Save any changes and close the files.
            Ø  Copy the generated resource bundle extension into your default workspace directory structure and register your properties files.
§  In your new project directory, go to the lzx directory. For example, the filepath to the lzx directory, can be ShippingCalculatorProject\LOBTools\WebContent\WEB-INF\src\lzx.
§  Copy the MyCompany directory.
§  Go to the LOBTools\WebContent\WEB-INF\src\lzx directory.
§  Paste your copied MyCompany directory within the LOBTools\WebContent\WEB-INF\src\lzx directory.
§   In the LOBTools\WebContent\WEB-INF\src\lzx\MyCompany\pagelayout directory, open the MyCompanyPageLayoutResourceBundle.lzx file to review the source code. The following generated code is included within the file:
<!-- The following code is created as example. Modify the generated code and add any additional required code.  -->
<library>
<class name="MyCompanyPageLayoutResourceBundle" extends="wcfResourceBundle" baseName="com.MyCompany.commerce.pagelayout.client.lobtools.properties.PageLayoutLOB">
<wcfResourceBundleKey name="ShippingCalculatorPageWidgetContent"/>
</class>
<MyCompanyPageLayoutResourceBundle id="MyCompanyPageLayoutResources"/>
</library>

§  The code defines that the resource bundle is an extended resource bundle. The code sets the name for the text properties to register the text within the resource bundle. Management Center uses the resource bundles to identify the text that is translatable. The translatable text must be retrieved from the properties file for the language that a user is working within.
§  Close the file.
             Ø  Update the default Commerce Composer resource bundle library to include your new resource bundle extension.
§  In your new project directory, go to the directory. For example, the filepath to the lzx directory, can be ShippingCalculatorProject\LOBTools\WebContent\WEB-INF\src\lzx\commerce\pagelayout.
§  Open the PageLayoutExtensionsLibrary.lzx file to view the source code.
§  Copy the generated code that includes your widget resource bundle. For example, the generated code can resemble the following code:
<!--     
The following code is created as an example. Modify the generated
            code and merge the file with the existing PageLayoutExtensionsLibrary.lzx
            file within the LOBTools project.
-->
<library>
<!-- Include the file to add any custom libraries. -->
<include href="../../MyCompany/pagelayout/MyCompanyPageLayoutResourceBundle.lzx"/>
</library>
Go to the LOBTools\WebContent\WEB-INF\src\lzx\commerce\pagelayout directory within your default workspace directory structure.
§  Open the PageLayoutExtensionsLibrary.lzx file for editing.
§  Paste your copied code within the PageLayoutExtensionsLibrary.lzx file.
§  Save and close the file.
            Ø  Define the object definition for widget.
§  In the Enterprise Explorer view, copy the generated object definition files for your widget into your default workspace directory structure.
§  In your default workspace directory structure, go to the LOBTools\WebContent\config\MyCompany\pagelayout\widgetDefinitions\ShoppingCartDetailPageWidget directory.
§      Open the WidgetObjectDefinition.def file for editing. By default the generated code for your widget object definition can resemble the following code:

<?xml version="1.0" encoding="UTF-8"?>

<!-- The following code is created as example. Modify the generated code and add any additional required code.  -->

<Definitions>
<WidgetObjectDefinition package="plm"
definitionName="plmLayoutWidget_ShippingCalculatorPageWidget"
parentDefinitionName="plmBasePageLayoutPrimaryObjectDefinition"
baseDefinitionName="plmBaseLayoutWidget"
objectType="ShippingCalculatorPageWidget"
gridPropertiesDefinitionName="plmWidgetProperties_ShippingCalculatorPageWidget"
iconPath="/images/pagelayouts/widgetIcons/ShippingCalculator.png">
<CreateService baseDefinitionName="plmBaseCreateLayoutWidget" />
<UpdateService baseDefinitionName="plmBaseUpdateLayoutWidget" />
<Xml name="template">
<sequence>0</sequence>
</Xml>
</WidgetObjectDefinition>
</Definitions>
iconPath
        The filepath to the icon that displays for your custom widget within the Add Widgets to Slots window in the Commerce Composer tool. Copy the widget image (ShippingCalculator.png) from the attached zip folder and paste in the following path:
"/images/pagelayouts/widgetIcons/ShippingCalculator.png”.
§  Update the object definition file to change any of the default generated values or add more definition properties for your widget. Ensure that you update the file to specify an icon for your widget. For more information, see Object definitions.
§  Save and close the file.
                Ø  Define the properties view definition for widget
§  In the Enterprise Explorer view, go to the LOBTools\WebContent\config\MyCompany\pagelayout\widgetDefinitions\ShippingCalculatorPageWidget directory within your default workspace directory structure.
§  Open the WidgetPropertiesView.def file for editing. By default the generated code for your widget object definition can resemble the following code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- The following code is created as example. Modify the generated code and add any additional required code. -->
<Definitions>
<GridObjectProperties definitionName="plmWidgetProperties_ShippingCalculatorPageWidget">
<PropertyPane>
<PropertyGroup name="widgetProperties" collapsable="false" groupTitle="${plmPageLayoutResources.widgetPropertiesPrompt}">
<PropertyInputText name="${plmPageLayoutResources.widgetNamePrompt}" propertyName="widgetName"
promptText="${plmPageLayoutResources.widgetNamePrompt}" />
</PropertyGroup>
<PropertyGroup name="contentProperties" collapsable="false" groupTitle="${plmPageLayoutResources.widgetContentPrompt}">
<PropertyStaticText text="${MyCompanyPageLayoutResources.ShippingCalculatorPageWidgetContent}" />
</PropertyGroup>
</PropertyPane>
</GridObjectProperties>
</Definitions>

§      The preceding code sample defines a properties view for the new widget, which consists of only the widget name and the content description.
§      Update the properties view definition file to change any of the default generated configurable properties, or add more configurable properties for your widget.
§      For more information about properties view definition files, see Property definitions. For more information about updating these files, see Adding a tab to a properties view
§      Save and close the file.
§      Start or restart the WebSphere Commerce Test Server.
§      Right-click the LOBTools project. Click Build OpenLaszlo Project.
         Test the new widget, in commerce composer section select any slot, it’s shows all the available   widget to add in the slot. Verify the new widget is available in the section.