Well now that my part of the SAMS BizTalk 2004 Unleashed book's done, I'm bored.
So, I wrote a little utility that we at Neudesic could have used on a couple of our BizTalk projects, and I'm thinking others may need it as well. So, say hello to "ServiceWindows".
What is ServiceWindows?
ServiceWindows is a utility that allows you to turn BizTalk 2004 receive locations on and off at intervals specified in a configuration file.
What problem does ServiceWindows solve?
BizTalk Server 2004 provides a powerful business process automation capability via orchestrations. However, you may only want these processes to run during defined service windows. An effective way to control execution of orchestrations is by controlling the receive locations that trigger instantiation of the process, effectively “turning the tap on and off”.
BizTalk Server 2004 allows you to specify a single service window for a receive location (eg: “process messages between 1:00AM and 2:00AM every day”). ServiceWindows extends this capability by allowing you to turn on receive locations at specified intervals, and automatically disable them after a specified duration has elapsed (eg:”Enable this receive location every hour, and keep it enabled for 10 minutes”).
How does it work?
ServiceWindows uses the BizTalk Server Explorer Object Model, and I manipulate the receive location state through that.
Is it easy to use?
You betcha! Here's an example:
ServiceWindowManager mgr = new ServiceWindowManager(@"C:\Visual Studio Projects\BTSServiceWindows\BTSServiceWindows\ServiceWindows.xml");
mgr.LoggingEnabled = true;
There are two sample programs included with it, a console app and a sample Windows service, to show you how to use it.
You can see the readme here.
You can download ServiceWindows here.