Monday, December 20, 2010

Dynamic SMTP Send Port - Unknown Error Description

The other day I was using the Dynamic SMTP port to send an email message after a technical error had occurred in BizTalk.

I used a BRE Policy to configure the Email settings and had set the SMTP.EmailBodyText property.

Although there are a lot of things that can go wrong I was convinced it was rooted in my BRE call and result.

It took me several dreadful minutes before i stumbled on a post of a fellow BizTalk developer who had faced the same issue.

It turns out that when you use the BodyText you MUST set the charset:

EmailMessage(SMTP.EmailBodyTextCharset) = "UTF-8";



Sunday, December 19, 2010

BizTalk 2010 exam review

Hi there, I just finished providing some feedback for the upcoming BizTalk 2010 exam and I hope the input was valuable.

As I am preparing for the SQL Server 70-342 I hope the exam will be finalized early next year so that I can it to my list of exams to take.


Saturday, December 18, 2010

File Adapter quirks

Since I try to have posts for all the adapters I have encountered it can be that this is a post that it not new for all the people already working with BizTalk for a long time. It just wanted to have it on my blog for the sake of completeness;

The FILE adapters requires that the Host Instance account user has FULL Control on the folder it tries to read from.

I was giving a course on security in BizTalk and explained the security modal of BizTalk (like BizTalk operator / BizTalk administrator) and the ability to run Host instances under minimal privileges accounts (BizTalk Application Users member) and had a hard time to explain why the file was not picked up when Read only rights were assigned.

This answer is: because I said so Winking smile



Scheduled Task Adapter

After considering the options for a project where interfacing in a scheduled manner was required i came across the Scheduled task adapter. This thing is so easy to use, I must speak about it!

The following section describes the steps required to implement the scheduled task adapter.

Register the components

To install the Scheduled task adapter download the adapter from ‘Codeplex’ ( Run the setup and follow the steps during the setup.

Note: In the current version the setup does not register the necessary dll’s in the Global Assembly Cache. These steps have to be performed manually.

- Start the Visual Studio command prompt

- Navigate to ‘C:\Program Files\Biztalk ScheduledTask Adapter’

- Run ‘GACUTIL –i Biztalk.Adapter.ScheduledTaskProperties.dll’

- Run ‘GACUTIL –i Calendar.Schedules.dll’

- Run ‘GACUTIL –i ScheduledTaskAdapter.Admin.dll’

- Run ‘GACUTIL –i ScheduledTaskAdapter.dll’

- Run ‘GACUTIL –i ScheduledTaskAdapter.TaskComponents.dll’

Add the adapter

Start the administration console and create a new adapter under ‘Platform settings’.


Select the Schedule adapter and name it as desired, for example ScheduledTaskAdapter


Restart the host instance



The Scheduled task adapter has the ability to fire a trigger based on a regular interval. This trigger can be defined as desired, the most common usage is to use a String trigger which will submit a predefined String (e.g. an Xml message) to the messagebox so that it can be picked up by an Orchestration.

The first step is to create a new Receive port that will contain a receive location using the ScheduledTaskAdapter.

Create a new One-Way receive port


Create a new Receive location and select the ScheduledTaskAdapter, ensure that you choose XMLReceive as the receive pipeline.


Click on Configure and define a name for the schedule


Define a schedule which executes the tasks periodically


Select a task component


This tab allows the usage of implemented Task items. These are the actions performed, you can implement any task as long as it conforms to the API of the ScheduledTaskAdapter. In this case we will use a task type that is included with the Adapter.

Click on ‘FindTask’, this will show the assembly browser


Click on ‘Browse’ and select the assembly ‘ScheduledTaskAdapter.TaskComponents.dll’ (located in the Program Files\Biztalk ScheduledTask Adapter directory).


Double click the XMLStringStreamProvider and click ok


Under taskproperties, configure the XmlString that will be published on the messagebox at the moment the task is executed


Note: this is a xml instance that you can used as the first receive shape in the orchestration that should be started.


Have fun with it!

Thursday, December 02, 2010

BizTalk 2010 Mapper Pros/Cons

I am now using the BizTalk mapper 2010 frequently, I faced 2 changes I don’t appreciate:


- Search elements

When you type in a fieldname, it is highlighted! You can even toggle buttons so that only the highlighted elements are shown. Cool

- Copy Paste

Copy/paste works like a charm, elements can be selected easily and it now works as it should have been a long time…intuitive.


- Replace functoid does not work anymore

It used to be, that when you drag a functoid and drop it over a functoid already on the mapping grid that it would replace the existing functoid. Well, it’s noted, not really what I wanted.

- Create a message from scratch

When I make a new message and I don’t have input for it a Assign a new message using a Message variable of type XmlDoc. Assign it a value with the first element of the schema (e.g. <Error />) and then use the mapper to set all the different elements in the message (using a string concatenate with an empty value).


I am not 100% finished with analyzing this, but it looks like this does not work anymore. The mapper does not overwrite the elements and the original input is passed ==> <Error />

This means that you would have to provide all the elements that you want to use, this the added value of using the XmlDoc approach for creating a message is than quite low.

I will post an update if I have found some more detailed info and will try to make an example solution.