Workflow exception after upgrade to Commerce 11

Vote:
 

Hi!

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?

Thanks!

/Kristoffer

#182389
Sep 18, 2017 9:14
Vote:
 

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

#182390
Sep 18, 2017 9:23
Vote:
 

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

#182391
Sep 18, 2017 9:37
Vote:
 

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

#182393
Sep 18, 2017 9:40
Vote:
 

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.

#182464
Edited, Sep 20, 2017 9:11
Vote:
 

Hi,

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

We'll make sure this get resolved ASAP.

Thanks,

/Q

#182465
Sep 20, 2017 9:15
Vote:
 

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

#182466
Sep 20, 2017 9:18
Vote:
 

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

#182467
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.