我的項目有一個編排,其中包含非事務性作用域。將可序列化對象返回到biztalk時數據丟失
在該範圍內,爲了獲得帶有值的Hashtable
,需要調用.NET幫助程序。
重要的是要提到它是我在該範圍內執行的事情,意味着範圍只包含調用.NET函數的表達形狀。
返回Hashtable
的函數被標記爲static
。
它看起來像這樣:
public static Hashtable GetKeys(XmlDocument xmlDoc)
{
Hashtable servicesKey = new Hashtable();
//Key1
int keysCounter = 1;
// Add key1
servicesKey.Add("Key" + keysCounter, Constants.Keys.First);
keysCounter++;
// Add key2
servicesKey.Add("Key" + keysCounter, Constants.Keys.Second);
keysCounter++;
// Add key3
servicesKey.Add("Key" + keysCounter, Constants.Keys.Third);
keysCounter++;
return servicesKey;
}
出於某種原因,發送消息的一個巨大的質量,並在同一時間重新啓動主機實例時 - 我得到的結果上一些空Hashtable
消息的。
有人可以幫助我如何改變它,所以在這種情況下消息不會迷路?
我不是專家,但我認爲這裏的問題可能歸結爲持久性。我懷疑數據丟失可能在實例處於GetKeys方法時發生。您可以嘗試通過在.Net幫助程序調用之前調用一個空的Orch來強制執行一個持久性點?請參閱持續點:http://blogs.msdn.com/b/sanket/archive/2006/11/12/understanding-persistence-points-in-biztalk-orchestration.aspx – Rodders 2014-12-01 14:07:05