Openbravo Issue Tracking System - Retail Modules
View Issue Details
0046256Retail ModulesWeb POSpublic2021-04-13 11:002021-04-19 07:28
marvintm 
rqueralta 
normalminoralways
closedfixed 
5
 
RR21Q3 
approved
OBPS
No
0046256: JSONProcessSimple class exec method fails if there is no request in RequestContext
In some cases we want to use the WebPOS webservices programatically, and in some of those cases there is no actual HTTP request as the code is coming from a process or integration.

In all the cases inside JSONProcessSimple class, there are checks for the existance of the request, so that the relevant code is not executed if request is null. However, there is one case missing this check: the getParameterMap in the MobileCoreKernelUtils class is not doing this check, and fails if the request is null.
Use the ExportOrder class programatically from an ImportEntryProcessorHook. Realise that the exec method fails because the request inside RequestContext is null
Add the following lines to the getParameterMap in the MobileCoreKernelUtils class:

if(request == null) {
  return parameterMap;
}
No tags attached.
Issue History
2021-04-13 11:00marvintmNew Issue
2021-04-13 11:00marvintmAssigned To => Retail
2021-04-13 11:00marvintmOBNetwork customer => OBPS
2021-04-13 11:00marvintmResolution time => 1619733600
2021-04-13 11:00marvintmTriggers an Emergency Pack => No
2021-04-16 18:20rqueraltaAssigned ToRetail => rqueralta
2021-04-16 18:20rqueraltaStatusnew => scheduled
2021-04-16 23:38hgbotMerge Request Status => open
2021-04-16 23:38hgbotNote Added: 0127334
2021-04-19 07:28hgbotMerge Request Statusopen => approved
2021-04-19 07:28hgbotResolutionopen => fixed
2021-04-19 07:28hgbotStatusscheduled => closed
2021-04-19 07:28hgbotFixed in Version => RR21Q3
2021-04-19 07:28hgbotNote Added: 0127348
2021-04-19 07:28hgbotNote Added: 0127349

Notes
(0127334)
hgbot   
2021-04-16 23:38   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/211 [^]
(0127348)
hgbot   
2021-04-19 07:28   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: a1b79ad879c96bee082354c5735d8575cdf63127
Author: Rafael Queralta <rafaelcuba81@gmail.com>
Date: 2021-04-16T17:37:13-04:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/a1b79ad879c96bee082354c5735d8575cdf63127 [^]

Fixed BUG-46256: Check if request is null from the beginning of the getParameterMap function to avoid fails if there is no request in RequestContext

---
M src/org/openbravo/mobile/core/MobileCoreKernelUtils.java
---
(0127349)
hgbot   
2021-04-19 07:28   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/211 [^]