DehydrationFailedException occuring in an Atomic orchestration

Have you seen the below error? If yes, may be this post helps.

My customer was receiving below error and the strange thing was that though we receive this error in the event log, but we do not see any suspended or dehydrated orchestration in the BizTalk Group which would mean that it got processed successfully.

Event Type: Error
Event Source: XLANG/s
Event Category: None
Description:
Suspending due to exception occurring during dehydration of instance a09542e6-ebe5-489d-af31-ece26de13cf4.
Exception type: DehydrationFailedException
Additional error information:
Exception from HRESULT: 0xC0C01B05
Exception type: COMException
Source: mscorlib
Target Site: Void ThrowExceptionForHRInternal(Int32, IntPtr)
The following is a stack trace that identifies the location where the exception occured
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.PrepareForActivationComplete(Boolean wait)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.PerformDehydration(Boolean wait)
at Microsoft.XLANGs.Core.Service.Dehydrate()

On further investigation, it was found that this is an transactional orchestration with type atomic (not an atomic scope but complete orchestration is atomic). Also, we found that there is a Send Shape in the end which has got delievery notification to transmitted. Once we changed delievery notification to none, it resolved the error.

I tried to repro this issue only on BizTalk 2006 R2 box. I was able to repro this only when the orchestration is atomic not when we put a send shape with delivery notification under an atomic scope.

Atin Agarwal