Posts

Showing posts from May, 2021

REST – CUSTOM REST CREATION

1. Make entry of your custom handler in resources-ext.properties at below path. Rest\WebContent\WEB-INF\config\resources-ext.properties 2. Create a Rest Handler by extending AbstractConfigBasedClassicHandler only when rest handler invokes a data bean or controller command and use below method to call the resource. executeConfigBasedBeanWithContext( RequisitionListDataBean.class.getName(), profileName, responseFormat, null); 3. Create a Rest Handler by extending AbstractResourceHandler when the logic exist in rest handler, I mean when Rest Handler not using any Data Bean or Commands. 4. Create a Java class which extends AbstractConfigBasedClassicHandler or AbstractResourceHandler as per you need. Also set the @Path and  @Description annotation. @Path("api/test") @Description("This is a simple RESTful service") public class ExMyHandler extends AbstractConfigBasedClassicHandler { ..... ...... ........ .......... } 5. Override t

Websphere Commerce Order Subsystem

  Order Management subsystem is a component of the WebSphere Commerce Server that provides shopping carts, order capture, order fulfillment, inventory, and payment function support. First let us go through concept of Requisition Lists in Websphere Commerce. Requisition Lists Requisition list is created for ordering items frequently .There can be two types of Requisition lists. 1. Private Requisition List  –This can be viewed and modified by the user who creates it. 2. Shared Requisition List -This can be viewed and used by users in the same organization. Requisition lists are stored in ORDERS table. In  ORDERS  table  STATUS  column is used to identify the requisition lists. A value of  Y  indicates that it is a  private requisition list . A value of  Z  indicates that it is a  sharable requisition list.  If you need to change the type of requisition list you must call the RequisitionListUpdateCmd. Users can add items from requisition list to order and requisition list remain unaltered

Calculation Framework in Websphere Commerce.

  OrderCalculateCmd OrderCalculateCmd invokes the Promotion engine. PromotionEngineOrderCalculateCmdImpl implements OrderCalculateCmd class. OrderCalculateCmd is invoked when we add, delete, update or merge item/s in cart. This command calculates the order  total based on the sequence in which calculationUsageId is passed into the command. WebSphere Commerce provides the below predefined calculation usages: Calusage_id    Description -1                         Discount -2                         Shipping -3                         Sales Tax -4                         Shipping Tax -5                         Coupon -6                         Surcharge -7                         Shipping Adjustment   CalculateOrderCommand iterates over the array of Calusageids passed in requestProperties and invokes the below methods accordingly for each calusageid. initialize, apply and summarize methods As a part of InitializeAdjustment and InitializeCoupon commands, respective calmethod and calrule com