Saving a basket is not handled in a single transaction -> REST service may fail
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.
#1 Updated by Blatti Yves about 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 >