Try our conversational search powered by Generative AI!

Workflow exception after upgrade to Commerce 11



After upgrade this exception has occured several times:

2017-09-17T23:43:55,Error,scdomstr012im9nprod,943134,636412886352348485,0,3024,70,"EPiServer.Global : 1.2.5 Unhandled exception in ASP.NET
System.ApplicationException: Workflow generated an exception, please look at the previous error for more details. ---> System.ArgumentException: Item has already been added. Key in dictionary: 'rejectedinventoryduetoinsufficientquantity'  Key being added: 'rejectedinventoryduetoinsufficientquantity'
   at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
   at Mediachase.Commerce.Workflow.Activities.Cart.AdjustInventoryActivity.RequestInventory(OrderForm orderForm, Shipment shipment, LineItem lineItem)
   at Mediachase.Commerce.Workflow.Activities.Cart.AdjustInventoryActivity.Execute(ActivityExecutionContext executionContext)
   at Mediachase.Commerce.WorkflowCompatibility.Activity.Execute()
   at Mediachase.Commerce.Engine.ActivityFlowRunner.<>c__DisplayClass15_0`1.b__0()
   at Mediachase.Commerce.Engine.ActivityFlowRunner.Execute()
   at Mediachase.Commerce.Engine.ExecutionManager.ExecuteActivityFlow(String name, ActivityFlowContext context)

Any ideas?



Sep 18, 2017 9:14

This is a probably a bug in our side. I'll file a report for it. Thank you for bringing it to our attention.

Sep 18, 2017 9:23

Looks like it only happens when there are more than one product in the cart, but I'm sure.

Sep 18, 2017 9:37

Yes, it happens when two or more items in cart does not have enough quantity in store. We are working on the bug fix and it should be available soon-ish

Sep 18, 2017 9:40

For me, this happens when there is enough quantity in the store. It happens when an editor tries to release order hold in the Commerce Manager.

The order contains two products where one has quantity 2 and the second has quantity 1. And the first product has inventory quantity 38 and the second product has inventory quantity 48.

Is there any workaround? Our customer needs this order to be released as soon as possible.

Edited, Sep 20, 2017 9:11


Do you have a complete steps to reproduce? Or it simply happens with all purchases?

We'll make sure this get resolved ASAP.



Sep 20, 2017 9:15

I am not sure how to reproduce it. It is happening for a single order now (at least customer reported only one).

Sep 20, 2017 9:18

Can you check that order - probably via my direct mail - to see how the inventory looks like on database level?

Sep 20, 2017 9:19
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.