Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034555Retail ModulesWeb POSpublic2016-11-17 12:182016-11-30 17:24
gorkaion 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
piRR17Q1 
marvintm
No
0034555: [SERQA 2086] transformMessage() of ExternalOrderLoader executed several times on each request
The transformMessage() method is the one in charge of parsing the incoming JSON to be transformed to the OrderLoader format. This method is called in 3 different methods of the ExternalOrderLoader so the method can be executed up to 3 different times.

This behavior has a performance impact as it is processing 3 times the same information and can cause errors in the ExternalOrderLoader. For example if it is set a warehouse in the order line the second execution of the tranformMessage fails.
Put debug log and check how the transformMessage is called several times.

Add the warehouse property to a order line and check that the process fails.
Call the transformMessage() method only once in the code by removing the calls in the exec() methods. Attached a diff.
No tags attached.
diff externalOrderLoader.diff (816) 2016-11-17 12:18
https://issues.openbravo.com/file_download.php?file_id=10059&type=bug
Issue History
2016-11-17 12:18gorkaionNew Issue
2016-11-17 12:18gorkaionAssigned To => Retail
2016-11-17 12:18gorkaionFile Added: externalOrderLoader.diff
2016-11-17 12:18gorkaionTriggers an Emergency Pack => No
2016-11-21 13:11gorkaionResolution time => 1480546800
2016-11-21 13:11gorkaionSummarytransformMessage() of ExternalOrderLoader executed several times on each request => [SERQA 2086] transformMessage() of ExternalOrderLoader executed several times on each request
2016-11-23 13:55ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2016-11-23 13:55ranjith_qualiantech_comStatusnew => scheduled
2016-11-25 11:05hgbotCheckin
2016-11-25 11:05hgbotNote Added: 0091825
2016-11-25 11:05hgbotStatusscheduled => resolved
2016-11-25 11:05hgbotResolutionopen => fixed
2016-11-25 11:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/387ed12b4721ead00467e58ecd686ae29f8550f4 [^]
2016-11-30 17:24marvintmReview Assigned To => marvintm
2016-11-30 17:24marvintmStatusresolved => closed
2016-11-30 17:24marvintmFixed in Version => RR17Q1

Notes
(0091825)
hgbot   
2016-11-25 11:05   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 387ed12b4721ead00467e58ecd686ae29f8550f4
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Nov 25 15:34:43 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/387ed12b4721ead00467e58ecd686ae29f8550f4 [^]

Fixes issue 34555 : Removing unuseful transformMessage call in ExternalOrderLoader

* transformMessage fn previously called in OrderLoader. By Calling again in ExternalOrderLoader, its throwing Exceptions

---
M src/org/openbravo/retail/posterminal/ExternalOrderLoader.java
---