Wednesday, October 5, 2016

Process Automation : e-Commerce : Order Management : Issue in 'Bulk Order loading Process' is Resolved, with Batch processing automation.


e-Commerce Business Order Management

:: Order Loading ::

Batch processing automation in 'Bulk Order loading Process'.

e-Commerce B2B online application:  
Enduser can select the items; and place the orders by online.  Application is having two possible ways of order processing.  (i) Manual Order Process, (ii) Bulk Order loading Process.  
In 'Manual Order Process', enduser can choose the items selectively at front-end system, while placing the order.  This process is helpful if the order is having very less/limited number of items.  
In 'Bulk Order loading Process', B2B client has to provide prior inform about the order(s) to the 'Application Administrator' in the form of specific TXT format.  Then the TXT formatted orders would be loaded in to the System.  The successful loaded orders would appear at front-end system.  Now, enduser can place the order with (selected) items, at front-end system.  This process is helpful for bulk orders; and also, if the order is having bulk number of items.  
Issue & Risk: 
While loading Bulk orders, the process is getting terminated after sometime by showing (DB CURSOR) ERROR, without loading all the Orders.  Very few Orders are getting loaded in this case.  Due to this, 'Application Administrator' has to restart the process all the time.  It's very hectic.

Problem Statement:
*) The issue is arising in only live System.  (1) Because, lakhs of Orders would be loaded in live system at a time.  (2) It's very difficult to reproduce the issue at Development environment.  (3) It's very difficult to verify the Resolution.

*) No documentation available.  So, every step is a 'trail and make' process.  
*) Each process is the combination of multiple customizations; those are related to different Clients.  So, I need to take care about impact analysis while taking a decision at each level.  

Root Cause Analysis (Q&A): 
*) Is the issue reoccurring ?
No. The issue is occurring only when loading the bulk (lakhs of) orders at a time.    
*) Is it possible to load the specific amount of Orders based on Scheduler ?
No.  In general, Scheduler initiates the process at specific time.  But, in this 'Bulk Order loading Process' scenario, the number of Orders are variable; and, the number of Items in each Order is also variable.  The availability of Orders is not time based.  So, the Time based Scheduler may not be helpful to resolve the issue.  
*) Try for a solution at Google and Forums ?
Suitable solution is not available.

*) It is required to load the specific (configured) amount of Orders, at a time.
*) The 'Bulk Order loading Process' has to be continued till all the Orders are loaded.
*) Time based Scheduler is not suitable.  
*) There is a provision to enable/disable this particular customization.

Concept for Issue Resolution: 
*) I thought about Batch processing automation in 'Bulk Order loading Process'.  
*) Whenever the 'Bulk Order loading Process' is initiated, the process selects the specific amount of Orders for loading.  Once the orders are loaded, the process reinitiates itself automatically, for next iteration of same loading process.  The process continuous till all the (available) Orders are loaded into the System.  A configuration element is required to enable/disable this particular customization.  

Concept Implementation: Simple change for Greater impact: 
*) Based on Requirements,  
Present Scenario:  Select all the Orders & Load the Orders.
Proposed Scenario: Select the specific amount of Orders & Load the Orders.  Make this process automatic till END.  A configuration element to enable/disable this.   
*) Application Changes are implemented as follows: 
-> Step 1: Instead of selecting all the Orders at a time, Application would select specific amount of Orders for loading, based on configuration.
-> Step 2: Reinitiate the Step 1 automatically, till all the (available) Orders are loaded into the System.      
-> Step 3: Make a configuration to enable/disable the Steps 1 & 2.
*) 'Bulk Order loading Process' is a Java Application program.  It is the combination of hierarchical of many Classes.  The Base Class is having the selection of Orders for loading.  The Derived Classes are having completely customized Order loading process, configured differently for different Clients.  Steps 1 & 2 are implemented at Base Class.  Reinitiating method has been overridden in Derived Classes.  So, the Concept implementation became simpler with OOP (Object Oriented Programming) Concepts, Inheritance and Polymorphism.
*) The impact analysis (to verify the concept for all the Clients' scenarios) is a major task here. 
Finally, the Issue Resolution is created a greater impact.

The specified issue has been resolved completely.  'Application Administrator' work became simple.  
The Results created excitement in everyone.
Thus, the concept (Batch processing automation) is very much helpful to improve the accuracy with rapidness, in 'Bulk Order loading Process' without any issues.  

The Bulk Order loading Process is completely automated, with the Batch processing automation.
In fact, 'Batch processing automation' is an everlasting load balancing concept.

Kudos to my Team Member Mr. Niraj Kumar for his sincere involvement.