Wednesday 9 November 2011

Commerce business models

A business model provides a commerce solution which includes an organization structure, default user roles and access control policies, one or more starter stores, administration tools, and business processes that demonstrate best practices. A business model can be customized to support business requirements and scenarios.

Following business models are supported by commerce:

1. Consumer Direct
2. B2B
3. Value chain
4. Supply chain
5. Demand chain

Tuesday 11 October 2011

command pattern

Command pattern is a behavioural design pattern. The way I understand command design pattern is the requestor of an action is decoupled from the executor of the requested action through a broker who acts as an intermediate in invoking the requestors action in the executor. The object that is sent to the executor has the relevant properties/attributes and details of the actions that need to be carried out.



http://upload.wikimedia.org/wikipedia/commons/8/8e/Command_Design_Pattern_Class_Diagram.png

Thursday 6 October 2011

something about dynacache..

Caching helps in quick turnaround on pages that donot change that often, the details are either stored in memory or database. Caching happens or can be configured at different places within a web application. Dyanacache provides caching services from the application server. Cache hits and miss, cache item dependancies and cache invalidation are some of the key concepts to understand in caching.

Cache hits and miss is about the caching filter serving the client its request based on its availability in cache db. Cache invalidation is about clearing out the cache db as required and when clearing out taking care of clearing only the relevant data like for instance if an order is cached in check out process and when the order item in an order is changed or removed it is necessary to change the relevant details, this is addressed by cache dependancies wherein a dependancy id of each cache object is maintained in the cache db and during invalidation only the relevand details are invalidated using dependancy ids.

We define caching specification of an application in cachespec.xml. This file contains caching definition and rules. It is a websphere policy file where we define:

1. what is going to be cached (servlets, jsp, commands etc.,)
2. where it is going to be cached (memory or disk)
3. when cache items are evicted (invalidation)
4. how cache entries are related (dependancies)

This file has to be saved in WEB-INF of the web module.

Wednesday 5 October 2011

WCS general

Trying to capture different details on Websphere commerce:

Different subsystems:
Catalog subsystem
Payment subsystem
Member subsystem
Order subsystem
Trading subsystem

Areas of business functionality:
  • catalog
  • merchandising
  • marketing
  • promotions
  • trading
  • user management
  • order management
Frameworks
  • calculation framework
  • reporting framework
  • Tools framework
  • Business policy framework
  • MVC
  • Command framework
  • Runtime framework
Different programming models
Name-value pair command framework
BOD command framework


Framework overview

WCS layers

Monday 3 October 2011

Suspend batch jobs temporarily

You might have some scheduled jobs in your dev environment running which might slow down the performance of your system at times, to temporarily suspend it, here is the SQL:

update schactive set scsprefstart = current timestamp + 12 hours where scsjobnbr in (
select a.SCSJOBNBR from schconfig s , schactive a
where s.SCCJOBREFNUM = a.SCSJOBNBR
and a.scsstate in ('I','R')
and s.sccpathinfo in '<<JOBNAME(s)>>');



Sunday 2 October 2011

WCS orders

Recently we had a requirement to skip the inventory allocation during the order process i.e., when the customer places the order we wanted to skip the allocation. Although overwriting the InventoryAllocation command was an option, we found out that by updating the LASTALLOCDATE in ORDERITEMS table just before calling OrderProcessCmd did the trick. Looks like the orderprocess looks for lastallocated date before actually updating the inventory.