Introduction
The BizTalk Scheduled Task Adapter is an in-process receive adapter that executes a prescribed task on a daily, weekly or monthly schedule. The adapter is configured entirely within BizTalk, all configurations is stored within the SSODB and can be exported and imported via binding files.
The schedule capabilities are similar to those available with the Windows Scheduled Task Service.
Four simple tasks are included in this version:
- XmlStringStreamProvider – generates a BizTalk message from a configured Xml string
- FileStreamProvider – generates a BizTalk message from the contents of a file
- HttpDownload – generates a BizTalk message from data downloaded from a web site
- SQLStreamProvider – generates a BizTalk message from the contents of a SQL Query (similar to the old SQL adapter)
Custom tasks can be created. Any .NET class that implements the appropriate interface can be scheduled.
Release History
This adapter is available since BizTalk Server 2004.
- Release 1.02: last release in Apr 20 2008 by Greg Forsythe, this adapter works with BizTalk Server 2004, BizTalk Server 2006 and BizTalk Server 2006 R2. Compiled in .NET Framework 1.1
- Release 2.0: last release in Apr 20 2008 by Greg Forsythe, this adapter works with BizTalk Server 2006 and BizTalk Server 2006 R2. Compiled in .NET Framework 2.0
- Release 3.0: release in Aug 10 2010 by Greg Forsythe, this adapter was tested to work on BizTalk Server 2009. Compiled in .NET Framework 2.0
- Release 4.0: release in June 12 2012 by Sandro Pereira, this adapter was tested to work on BizTalk Server 2010. Compiled in .NET Framework 4.0
Requirements
The Scheduled Task Adapter v4.0 will work with:
- BizTalk Server 2010
- .NET Framework 4.0
Installation Process
To install the adapter run "ScheduledTaskAdapter.msi".
- In the “Welcome” screen press “Next”.
- In the “Select Installation Folder” screen you must set the installation locations were you what to install the adapter.
- The following screens are very straightforward – In the “Confirm Installation” screen press “Next”, then it will appear the installation progress and assuming all goes well a completion screen.
The setup will install the following assemblies in the selected folder (Default: C:\Program Files (x86)\Biztalk ScheduledTask Adapter):
- Biztalk.Adapter.ScheduledTaskProperties.dll
- Calendar.Schedules.dll
- Microsoft.BizTalk.CommonSettings.dll
- Microsoft.BizTalk.SqmFramework.dll
- ScheduledTaskAdapter.Admin.dll
- ScheduledTaskAdapter.dll
- ScheduledTaskAdapter.TaskComponents.dll
- stdole.dll
The setup will add the following assemblies to the Global Assembly Cache (GAC)
- Biztalk.Adapter.ScheduledTaskProperties.dll
- Calendar.Schedules.dll
- ScheduledTaskAdapter.dll
- ScheduledTaskAdapter.Admin.dll
- ScheduledTaskAdapter.TaskComponents.dll
Post-Installation
Register the Adapter with BizTalk
As it happens with all adapters that we installed on our BizTalk Servers before we can begin to use it we need to register or configure the adapter. To accomplish that we need to:
- Open BizTalk Administration Console
- In the console left tree, expand “BizTalk Server Administration –> BizTalk Group –> Platform Settings” and then “Adapters”
- Right-click on “Adapters” and add a new adapter by selecting the option “New –> Adapter”
- In the “Adapter Properties” window
- Set the name of the adapter: Name = Schedule
- In the adapter combo box select the option: Schedule
- Set the description of the adapter: “BizTalk Scheduled Task Adapter. The schedule capabilities are similar to those available with the Windows Scheduled Task Service.” (this property is optional but I would suggest to always be filled)
Note: This configuration requires that you restart the host instance associated with the adapter.
Using the adapter Context Properties
To utilize the Scheduled Task adapter’s context properties within a filter or orchestration the Biztalk.Adapter.ScheduledTaskProperties.dll must be deployed into the BizTalkMgmtDb.
This can be achieved using the Biztalk Deployment Wizard or equivalent tool.
Note: This step is optional; you only need to do this if you want to use Scheduled Task adapter’s context properties within a filter or orchestration.
As previously mentioned, you can deploy Biztalk.Adapter.ScheduledTaskProperties.dll in various ways; I suggest that you do the following steps:
- Open BizTalk Administration Console
- In the console left tree, expand “BizTalk Server Administration –> BizTalk Group” and then “Applications”
- Right-click on “Applications” and add a new application by selecting the option “New –> Application”
- In the “Adapter Properties” window
- Set the name of the application: BizTalk.Global
- Set the description of the application: “Application that contain common resources to several applications” (this property is optional but I would suggest to always be filled)
- Expand the application created previous and select the option “Resources”
- Right-click and add a new BizTalk resource by selecting the option “New –> BizTalk Assemblies…”
- In the “Add Resources” window select “Add…” button and from the installation directory select the DLL “Biztalk.Adapter.ScheduledTaskProperties.dll”
- And select the options: “Overwrite all”, “Add to the global assembly cache on add resource (gacutil)” and “Add to the global assembly cache on MSI file install (gacutil)”
- Select “OK” button
Important note: The BizTalk assembly containing the orchestration code must also add this assembly as a reference
List of improvements in version 4.0
In this new version are available small improvements compared to the current version (3.0). We can highlight the following improvements or changes:
- 24 hours support in “start time” property. Previous versions had an issue with setting the start time, as it shown 12 hours watch but no AM/PM.
- Daily scheduler review. Solved a small bug on Daily Properties: unable to switch between “Every day” and “on these days”
- Installation experience improved. You no longer need to manually add the DLL in GAC.
- Support for 32 and 64 bit Host Instances.
- Compiled in Visual Studio 2010 and .NET Framework 4.0.
- Optimized for BizTalk Server 2010.
- Documentation improved.