Friday, November 20, 2009

Sending E-Mails with multiple attachments with BizTalk 2006

If you want to send an email with several attachments using the SMTP Adapter of BizTalk, you have to set the following context properties:
  • SMTP properties of the message: Subject, From, ...
  • MIME properties of each bodyparts: FileName and IsMIMEEncoded
The latter could look like this:
inmsg.BodyPart.PartProperties.Write("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", "file.html");
inmsg.BodyPart.PartProperties.Write("IsMIMEEncoded", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", false);

Thursday, November 19, 2009

Errors exist for one or more children

After changing an orchestration only little, the build process sometimes throws an exception that says "Erros exist for one or more children". This message seems a bit random, since I couldn't find a real problem, like a missing assembly, definition, or port.

In my case, it helped to recreate the construct shapes from the orchestration by deleting the shape, creating a new one, and adding the code of the deleted one. After that, the error disappeared.

PS: You can even find the error message also inside the orchestration file. It might help to watch the changes inside the code, while you modify the orchestration in the orchestration designer. This way, you get a feeling of how BizTalk creates the code from the designer, and you can also observe when the error disappears.
 
3 years later... If you open the orchestration code, for example in an XML editor, and remove everything below row #endif // __DESIGNER_DATA. Then close file and rebuild project. BizTalk will now recreate the implementation code and compiles without that problem.

Friday, November 6, 2009

Is the Convoy Pattern Orchestration getting slow?

In our team, we discussed whether our orchestrations that implement the convoy pattern are getting slower while processing message by message. A small test showed that this is not true, even if you call a sub-orchestration for each message. The time line moved like this in our test:



There is just one exception where processing needs longer, but the mean duration is not increasing.