Page 1 of 1

Updating OrderItems within AddItemWorkflow

Posted: Fri May 15, 2015 2:14 pm
by Joel
Hi there,

I have a situation where, during the AddItemWorkflow, I need to modify the quantity of an OrderItem that is not the same item as is referenced from the current ProcessContext's OrderItemRequest. Is there a way to either

a) modify two different OrderItems during a single the AddItemWorkflow process

or

b) execute or schedule an inner or subsequent UpdateItemWorkflow for the other OrderItem, from within custom Activity code in the AddItemWorkflow?

I should note that when I try to simply change the quantity on the OrderItem the FulfillmentGroups get out of sync and it breaks the cart.

This is using the 4.0.0-RC1 codebase.

Thanks for any pointers!

Re: Updating OrderItems within AddItemWorkflow

Posted: Wed May 20, 2015 12:29 am
by phillipuniverse
Great question, I think the answer is no but I would be interested to hear a few more details about your specific case.

I think that the best answer might be to subclass and override the OrderService.addItem() method, finish the add and then build a CartOperationRequest and send that through the updateItemWorkflow.