Hi,
In an integration for shippments I get shippments for several orders and when some orders has been processed I get below Concurrency error, and the site restarts.
The error occures within:
delivery.SetDeliveryStatus((short)DeliveryState.Delivered, securityToken);
The delivery status is updated, the Payment is captured, but the orderstatus is not updated to completed.
When running the same order again, it works.
—Error—
Exception in Litium appId=/LM/W3SVC/1/ROOT type=Litium.Foundation.Modules.ECommerce.Data.ConcurrencyException message=Delivery (db9f64c1-1a12-4973-82be-6597aaf420f1) has already been changed in the database. Get a new copy of the object and submit your changes again. stack= at Litium.Foundation.Modules.ECommerce.Data.DeliveryDataProvider.Update(DeliveryCarrier carrier, SqlCommand openCommand) at Litium.Foundation.Modules.ECommerce.Data.DeliveryDataProvider.Update(DeliveryCarrier carrier) at Litium.Foundation.Modules.ECommerce.Deliveries.Delivery.UpdateFromCarrier(DeliveryCarrier carrier, SecurityToken token) at Litium.Foundation.Modules.ECommerce.StateTransitionSystem.FiniteStateMachine1.UpdateDatabase(CarrierType carrier, UpdateFromCarrierHandler updateFromCarrier, SecurityToken token) at Litium.Foundation.Modules.ECommerce.StateTransitionSystem.FiniteStateMachine
1.TransitionAction(StateTransition1 stateTransition, CarrierType carrier, UpdateFromCarrierHandler updateFromCarrier, SecurityToken token) at Litium.Foundation.Modules.ECommerce.StateTransitionSystem.FiniteStateMachine
1.TransitionAction(Int16 nextStateId, CarrierType carrier, UpdateFromCarrierHandler updateFromCarrier, SecurityToken token) at Litium.Foundation.Modules.ECommerce.Deliveries.Delivery.SetDeliveryStatus(Int16 state, SecurityToken token) at Litium.Accelerator.Tasks.FetchShipmentNumberTask.d__5.MoveNext() in C:\projects\posterton\Src\Litium.Accelerator\Tasks\FetchShipmentNumberTask.cs:line 76 — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()