Geeks With Blogs
Stuart Brierley Integration Management - BizTalk and More

The BizTalk Scheduled Task Adapter is an in process receive adapter that can be implemented on a receive location to execute a prescribed task on a daily, weekly or monthly schedule. 

I have previously talked about the installation of the Scheduled Task Adapter with BizTalk Server 2009, detailed below are details of how this adapter can be configured on a receive port.   

Within the BizTalk Administration console, right click and add a new one way receive location.

BizTalk 2009 Scheduled Task Adpater Receive Location - Add

Select the receive port that your receive location will run under - if you haven't got a port you will need to create one.

BizTalk 2009 Scheduled Task Adpater Receive Location - Select Port

Name the receive location and select the previously installed adapter from the Transport type drop down.  You can also set the receive pipeline at this stage.

BizTalk 2009 Scheduled Task Adpater Receive Location - Properties

Select configure and you will then be able to set the Scheduled Task Adapter transport properties; Name, Schedule and Task Properties.

BizTalk 2009 Scheduled Task Adpater Receive Location - Adapter Properties

After typing in a suitable name, select the Schedule properties and you will then be able to configure the schedule that your receive location will follow.

First up is the start date and time, which will control when the scheduled adapter will start working.  This will also affect when any subsequent attempts will be made.  For instance setting the time to 4pm and the frequency to Daily with a time span of 24 hours will cause a scheduled event at 4pm each day.

BizTalk 2009 Scheduled Task Adpater Receive Location - Start Date and Time

Beneath the start date and time are four tabs that allow you to configure the details of the schedule; Daily, Weekly, Monthly and Time Span.

The Daily Tab allows you to set either how many days there should be between events or which days the event should fire on.

BizTalk 2009 Scheduled Task Adpater Receive Location - Daily Schedule

The Weekly Tab allows you to define how many weeks there should be between events and which days of the week events should occur on.

BizTalk 2009 Scheduled Task Adpater Receive Location - Weekly Schedule

The Monthly Tab allows you to set a number of parameters that affect the monthly schedule of events; either the date in the month or an occurance based day (e.g. first saturday). In both cases you can also set the months that the event will fire in.

BizTalk 2009 Scheduled Task Adpater Receive Location - Monthly Day

BizTalk 2009 Scheduled Task Adpater Receive Location - Monthly Occurance 1

BizTalk 2009 Scheduled Task Adpater Receive Location - Monthly Occurance 2

The Time Span tab allows you to specify the interval between events in either Hours, Minutes or Seconds.

BizTalk 2009 Scheduled Task Adpater Receive Location - Time Span Schedule

My current assumptions are that the order of precedence is most frequent to less frequent, but I have yet to test this extensively.  For example setting Daily to "every 1 days" should override setting weekly to every 1 week.  If I find any interesting combinations when using this adapter I will aim to log these at a later date.

Following the configuration of the schedule properties, the final thing to configure is the Task properties. These define what the event that occurs with your schedule will actually be. 

The Scheduled Task Adapter is capable of working with any code that implements the correct interface, with the following event types provided by default: FileStream, HttpDownload and XMLStrings. 

On the Task Properties windows press Find Task.

BizTalk 2009 Scheduled Task Adpater Receive Location - Task Properties

You should then see the Assembly Qualified Type Name window. Select browse to search for a suitable dll.

BizTalk 2009 Scheduled Task Adpater Receive Location - Assembly Type Name

To make use of the default event types navigate to C:\Program Files\Biztalk ScheduledTask Adapter and select the ScheduledTask.TaskComponents.dll file.  You should now see the updated Assembly Qualified Type Name window which now shows the events available in the dll selected.

BizTalk 2009 Scheduled Task Adpater Receive Location - Assmbly Type Name Updated

In this case we will be trying the XMLStringStreamProvider, select this in the Assembly window and press the select button - this will then populate the Type Name text box.

BizTalk 2009 Scheduled Task Adpater Receive Location - Assembly Type Name Update 2

Pressing okay will return you to the Task Properties windows which will have been updated with the parameters for your chosen task.  In this case we need to set the xml string to be used with the event.  This is done in the xml text editor window.

BizTalk 2009 Scheduled Task Adpater Receive Location - Task Properties Updated

BizTalk 2009 Scheduled Task Adpater Receive Location - XML Text Editor

You have now configured a Scheduled Task Event Adapter receive location to submit your configured xml to the BizTalk message box - with the potential to start any send port or orchestration to your required schedule.

Posted on Wednesday, June 23, 2010 4:15 PM BizTalk Adapters | Back to top


Comments on this post: BizTalk 2009 Adapters - The Scheduled Task Adpater: Receive Location

# re: BizTalk 2009 Adapters - The Scheduled Task Adpater: Receive Location
Requesting Gravatar...
muy buen tutorial de hecho es lo que estaba buscando la configuracion de biztalk pero mi duda es si solo es eso en la configuracion de biztalk o tenemos que configurar a un mas, y como esque puedo comunicarme con visual studio 2010 espero que me puedan ayudar
Left by fidel on Aug 27, 2011 3:11 AM

Your comment:
 (will show your gravatar)


Copyright © Stuart Brierley | Powered by: GeeksWithBlogs.net