Biztalk 2010 X12 EDI Parties
I am trying to convert some BizTalk 2006 R2 helper code to BizTalk 2010 and I am running into a peculiar issue. I am trying to unit test a method that had a breaking API change from 2006 R2 -> 2010 and I keep getting the following exception when I try to access the batches of the party:
System.Data.SqlClient.SqlException: Could not find stored procedure 'edi_PartnerBatchScheduleSelect'.
Code:
[TestMethod()]
public void GetPartyBatchStatusTest()
{
Assert.IsTrue(GetPartyBatchStatus("Party1"));
}
public bool GetPartyBatchStatus(string PartyName)
{
if (string.IsNullOrEmpty(PartyName))
{
// Throw Exception
throw new System.ArgumentException("Parameter PartyName cannot be null or empty in the GetPartyBatchStatus method.", "PartyName");
}
bool 开发者_StackOverflowRetVal = false;
Partner objPartner = new Partner(PartyName);
if (objPartner.PartyId != -1)
{
foreach (IPartnerBatch batch in objPartner.Batches.Batches)
{
RetVal = batch.BatchingActivated;
}
}
return RetVal;
}
For this test case, I have set up a Party1 and a Party2 and started a batch between them.
The Party model (aka Trading Partner Management) in BizTalk 2010 has changed considerably from previous versions. Because of this, Microsoft includes a Party Migration Tool as a part of the BizTalk 2010 installer (see here).
I'm sorry to say this, but if you had code that interacted with the BizTalk SQL artifacts directly, then there is very little chance that it will work now, since the entire model has changed. Without seeing what the DSSIBizTalkHelper
actually does, though, it's tough to know that for sure.
That being said, one of the better-documented BizTalk 2010 features is doing X12 EDI. Though it will be difficult without prior BizTalk experience, you may want to check out this walkthrough for Sending Batched X12 EDI Interchanges in BizTalk. They have several other helpful walkthroughs there as well, around the same topic.
精彩评论