In my current project we have integrated order with our financial system and also we are using third party tool to generate order line items. After some time in production we started getting issue “Order is edited by multiple users” , and we were getting this issue only some times. After doing lot’s of testing what I found my order update plugin is called multiple times. After doing lot’s debugging what I found in my plugin context.depth is 1 but ever time correlationId was different. So I solved this issue by including below code in my plugin
if (_CorrelationID == Guid.Empty)
_CorrelationID = Context.CorrelationId;
if (_CorrelationID != Context.CorrelationId)
// rest of the code
This piece of code fixed my issue
I am same infinte loop error for plug-in update.Can you please let me know where to use this above code
you need to write this code in the beginning of the Execure method.
Thanks for you fast response.But I am still getting the same issue and assume each time the correlationId is initialzed the value is empty and thus causing infiniteloop.
did you try to check context.depth property ??