Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036536
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Retail Modules] Web POSmajorhave not tried2017-07-27 10:062017-08-04 15:07
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in VersionRR17Q4
StatusclosedFix in branchFixed in SCM revision64587bc76040
ProjectionnoneETAnoneTarget VersionRR17Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036536: Store response for external order loader and resend if duplicate message is received

DescriptionWhen using the external order loader it is possible that the response is not received by the caller.

The caller can then decide to repeat the order request (as no response was received).

However this can result a duplicate message, creating orders twice or more times for example.
Steps To ReproduceSimulate a simple duplicate request:
Put a breakpoint in the orderloader
Run tomcat in debug mode
Run one of the simple test cases [1] to call the external orderloader
The system stops at the breakpoint
Run the same test case again
Breakpoint is hit second time

Although this is not strictly a duplicate request it provides the idea.

[1]
https://code.openbravo.com/tools/automation/pi-mobile/file/0451be809da3/src-test/org/openbravo/test/mobile/retail/pack/webservice/tests/orderloader/RetailOrderLoaderTest.java [^]
Proposed Solution- store the response for each request in the c_import_entry table in a new column. Do this at generic level as other calls can also benefit from this.
- also store the error response
- in the externalorderloader detect if a message was already processed/error, if so return the response
- in the externalorderloader detect if a message is already being processed, if so wait a certain amount of time and then return the response. Make this wait time configurable. If after this time no response was generated throw an error.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 00365373.0PR17Q4 closedmtaal Openbravo ERP Store the response of an action also in c_import_entry 
related to defect 0036323 closedmtaal Retail Modules When the server is processing a message still then do not execute success or failure on the client 
related to feature request 0036538 closedmtaal Retail Modules MultiServerJSONProcess: When a message from the webpos is duplicated send the original response 

-  Notes
(0098316)
hgbot (developer)
2017-08-01 18:55

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: e3cb74a79b0d55d8717b040b0ea2294d96676679
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Aug 01 18:54:41 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e3cb74a79b0d55d8717b040b0ea2294d96676679 [^]

Related to issue 36536: Store response for external order loader and resend if duplicate message is received
Move the success/error response code to separate method to make them overridable by external order loader

---
M src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java
---
(0098317)
hgbot (developer)
2017-08-01 18:58

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 64587bc76040df4e005363f22f566a6dff1e8bbf
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Aug 01 18:57:38 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/64587bc76040df4e005363f22f566a6dff1e8bbf [^]

Fixes issue 36536: Store response for external order loader and resend if duplicate message is received
Before executing external order loader check if there is already a result. If so then return previous
result. If the system is still processing then wait a specific time before proceeding.

Added a preference to control the processing wait time.

Also provide an error handler to store the correct error result.

---
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/retail/posterminal/ExternalOrderLoader.java
M src/org/openbravo/retail/posterminal/ExternalOrderLoaderErrorHandler.java
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0098318)
hgbot (developer)
2017-08-01 18:58

Repository: tools/automation/pi-mobile
Changeset: 720084ebb29f3fe4bdada841a949a50e4e358ada
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Aug 01 18:58:15 2017 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/720084ebb29f3fe4bdada841a949a50e4e358ada [^]

Related to issue 36536: Store response for external order loader and resend if duplicate message is received
Added testcases for the external order loader duplicate message handling

---
M src-test/org/openbravo/test/mobile/retail/pack/webservice/tests/orderloader/BaseRetailOrderLoaderTest.java
M src-test/org/openbravo/test/mobile/retail/pack/webservice/tests/orderloader/RetailOrderLoaderTest.java
M src-test/org/openbravo/test/mobile/retail/pack/webservice/tests/orderloader/message-order-multiorder-1.json
---
(0098319)
mtaal (manager)
2017-08-01 19:06

Documentation:
http://wiki.openbravo.com/wiki/Retail:Order_Loading_WebService#Handling_duplicate_messages [^]

- Issue History
Date Modified Username Field Change
2017-07-27 10:06 mtaal New Issue
2017-07-27 10:06 mtaal Assigned To => mtaal
2017-07-27 10:06 mtaal Triggers an Emergency Pack => No
2017-07-27 10:11 mtaal Relationship added related to 0036537
2017-07-27 10:13 mtaal Relationship added related to 0036323
2017-07-27 10:19 mtaal Relationship added related to 0036538
2017-08-01 18:55 hgbot Checkin
2017-08-01 18:55 hgbot Note Added: 0098316
2017-08-01 18:58 hgbot Checkin
2017-08-01 18:58 hgbot Note Added: 0098317
2017-08-01 18:58 hgbot Status new => resolved
2017-08-01 18:58 hgbot Resolution open => fixed
2017-08-01 18:58 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/64587bc76040df4e005363f22f566a6dff1e8bbf [^]
2017-08-01 18:58 hgbot Checkin
2017-08-01 18:58 hgbot Note Added: 0098318
2017-08-01 19:06 mtaal Review Assigned To => migueldejuana
2017-08-01 19:06 mtaal Note Added: 0098319
2017-08-04 15:07 marvintm Review Assigned To migueldejuana => marvintm
2017-08-04 15:07 marvintm Status resolved => closed
2017-08-04 15:07 marvintm Fixed in Version => RR17Q4


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker