Posts Tagged ‘ Failed ’

Using Scheduled Task Adapter with BizTalk Server 2010

There is absolutely no documentation or may be very little associated with the Scheduled Task adapter on codeplex.  I will try to provide some tips and gotchas when using this adapter.  This is a very powerful adapter and I have used it in couple of my applications and used it to put raw xml in message box.

To use this adapter you will obviously have to install the adapter.  Unfortunately, it does not GAC a couple of assemblies even when you choose “everyone” on the install page.  To solve that problem I have created a MSI for installing the required assemblies into GAC.  You can download the installer from here.  Once the adapter is installed and the assemblies are GAC’d, you will have to follow general instructions on adding “ScheduledTask” as an adapter.  

Once the adapter is added, there are a couple of Gotcha to get the adapter working

1) After you have created the port, select the adapter, and click configure.  Provide a name.  This will be displayed as part of the URI on the port configuration page. 

2) Set the schedule

3) On the Task Tab, click Find Task.  #1) This page, if you are using the adapter for the first time, will be blank.  Click Browse and locate the directory where the adapter was installed (usually :<system drive:>\Program Files (x86) \ Biztalk ScheduledTask Adapter) and choose “ScheduledTaskAdapter.TaskComponents.dll” and click open.  Double click on the required stream provider (should populate the “Assembly Qualified Type Name” textbox and hit Ok.

4) This should populate the Class Text Box and would have “Task Properties” Populated with various properties.  Specify your text (in my case it was XML Stream and I put in raw XML) and hit ok.

5) You would think you are done. but no – #2) You will also have to add the “Biztalk.Adapter.ScheduledTaskProperties.dll” as a resource to your application and select the Gac’ing options.

6) Occasionally you might see an exception in the event long

The adapter “Schedule” raised an error message. Details “Exception has been thrown by the target of an invocation.”

This indicates that the the assemblies are not gac’d or they are not picked up. If you have already run the MSI and have added the dll as a resource, you need to restart the Host Instance.  Another reason why you might see this error is because your host instance might be running in 64 bit mode.  Ensure that the host instance is running as 32 bit.

 

 

 

 

Advertisements