Monday, March 31, 2008

70-235 Exam: Developing Business Process and Integration Solutions Using Microsoft BizTalk Server

Just passed Microsoft MCTS 70-235 exam. I can tell you that the preparations you have to take for this exam are very different from other Microsoft exam because there's almost no references from Microsoft (except MSDN).

It's seems that the team is checking the candidate knowledge about various of BTS-related technologies such as BAM and BRE, so in the single question in the exam with some code - you don't really need to know what you're coding, you need to identify the correct object to use (It's a question about invoking BRE policy).

If you're going to take the exam I can assist you with those tips:

  • Spend time on the samples that ships with BizTalk and the Walk-through scenarios - spastically the BRE and BAM stuff. - Pay attention to the order of the actions you perform in those's sample.
  • Choose the right answer even if it's seems so clear (remember that no one is trying to fool you)
  • Read the documentation in the MSDN - this way you'll know that for example "BizTalk Editor" is the way Microsoft is calling the Schema Editor in Visual-Studio 2005 BizTalk 2006 extensions.
  • Prepare yourself with BizTalk references other then Microsoft (I read "Professional BizTalk Server 2006" from Wrox).

Monday, March 24, 2008

BizTalk Host-Instances selection

Choosing the right Host-Instance for BizTalk artifact (like a send port) is one of the basics to a successful project. This is one of the points where development and test/prod environment are so different.

Scenario 1:

All BizTalk Host-Instances queues have a table under MsgBobDb with the prefix:<HostName>Q. when the adapter is committing a message into BizTalk MsgBox it means that the message was committed into this queue. afterwards a process of de-queue will be fired. just imagine what will happened if you have two services one is batch process with thousands of messages, and the second is on-line. the first process will flow the queue and the second on-line process will suffer from badly performance (and not like Message queuing like WMQ and MSMQ there's no way to configure priority within BizTalk queuing).

Scenario 2:

If I have two BizTalk Servers with one MsgBox (this usually increase performance), I need to run a Receive Location or Send Port on one of those Servers - the only way is to create separated Host Instances - one on each server and then to configure the port to be hosted within the correct Host Instance.

Scenario 3:

We need to collect files from a directory, then we need to send the content of the files to a web-service. The web-service processing is taking a long time - mach more then collecting the files from a file-system directory. the results of this is that while BizTalk is busy to commit the incoming messages into the MsgBox the Send process is waiting. also, if the incoming messages are very big - the processing is likely to use a lot of the BTSNTSvc process free memory and the sending process will wait to this memory to be freed before processing.

Scenario 4:

The Send Port must run under specific user to grand access permissions.

Monday, March 10, 2008

Microsoft.BizTalk.ParsingEngine.FFReader ReadToFollowing Issue

Have you ever worked with Microsoft.BizTalk.ParsingEngine.FFReader object to parse Flat-File contant in Pipeline component? be aware not to use ReadToFollowing() method within this object.

I've wrote a custom PPLC to parse and modify Flat File. Hers the Code snippet:

//Get the messge stream

Stream inStream = inMsg.BodyPart.GetOriginalDataStream();


//Get FFDocumentSpec and parse content from FF to XML with FF Anotation

IFFDocumentSpec docSpec = (IFFDocumentSpec)context.GetDocumentSpecByName("MyPoject.Schemas.MySchema_FF");


//Prepare Stream reader

StreamReader streamReader = new StreamReader(inStream);


Microsoft.BizTalk.ParsingEngine.DataReader dataReader = new Microsoft.BizTalk.ParsingEngine.DataReader(streamReader);


//start parsing the message

reader = (Microsoft.BizTalk.ParsingEngine.FFReader)docSpec.Parse(dataReader);


//start reading the message

reader.ReadToFollowing("nodeName", "http://node.Namespace");

The FFReader class is derived from System.Xml.XmlReader I read the content of the stream with the System.Xml.XmlReader.ReadToFollowing(String) method. and was very surprised to run into some NullReferenceException runtime exception. The Exception was thrown at ReadToFollowing() method.

After checking all the member initialization, I decided to search a little deeper inside the framework.

I find out that FFReader doesn't implements it's own ReadToFollowing() method so, the method is executing as in the base XmlReader Class.

The FFReader doesn't initializing the 'TableName' object and this member is remaining Null.

Unfortunatlly, the base XmlReader uses this object in the ReadToFollowing() method so it was cousing NullReferenceException.

Conclusion: manually create your own ReadToFollowing() method and don't use the one under FFReader.

public bool ReadToFollowing(string localName, string namespaceURI, FFReader reader)

{

while (reader.Read())

{

if (reader.Name.Equals(localName) && reader.NamespaceURI.Equals(namespaceURI))

return true;

}

return false;

}


 
Copyright © 2007 | Diseñado por Blog and Web