Defect #1252

Saving a basket is not handled in a single transaction -> REST service may fail

Added by Blatti Yves almost 3 years ago. Updated about 1 year ago.

Status:ClosedStart date:02/01/2016
Priority:HighDue date:
Assignee:-% Done:

100%

Category:SHOP
Target version:4.4.0
Affected version:4.3.0

Description

Saving a basket is not handled in a single transaction, so when the REST extraction service gets the orders, it may have a partial order, or have missing elements (like pricing).
I have joined an example of a curl client accessing the service on short interval while an order is saved, it shows:
- 1) no new request
- 2) request being saved (XML validation fails)
- 3) request pricing being saved (XML validation fails)
- 4) a new request is served
- 5) no new request

Steps 2 & 3 should never happen.
I see two ways for resolving it:
- save the order in a single transaction (complete model/controler rewrite)
- use a sort of flag, the the service would check, or the sent date for example

Note: the WPS may be affected too. Not tested yet.

multiple_call_to_rest_service.log (56.7 KB) Blatti Yves, 10/27/2017 08:32 AM

History

#1 Updated by Blatti Yves almost 3 years ago

  • Status changed from New to Affected
  • Target version set to 4.4.0

Will use the second method proposed: set the time at 0000-00-00 00:00:00 on order creation, then correct it in finalizeSave().
The WPS and REST then get orders only with sent date > 0000-00-00 00:00:00

#2 Updated by Blatti Yves almost 3 years ago

  • Status changed from Affected to Resolved
  • % Done changed from 0 to 100

fixed at rev. 9445

(also fixed a small string error in Easysdi_shopHelper : MOD_EASYSDI_LASTORDERS_TIME_NOW -> COM_EASYSDI_SHOP_TIME_NOW )

#3 Updated by Blatti Yves almost 3 years ago

  • Status changed from Resolved to To merge

#4 Updated by Blatti Yves almost 3 years ago

  • Assignee changed from Blatti Yves to Van Hoecke Hélène

#5 Updated by Van Hoecke Hélène almost 3 years ago

  • Status changed from To merge to Closed

#6 Updated by Van Hoecke Hélène over 2 years ago

  • Assignee deleted (Van Hoecke Hélène )

#7 Updated by Blatti Yves about 1 year ago

  • File deleted (multiple_call_to_rest_service.log)

Also available in: Atom PDF