by community-syndication | Sep 1, 2010 | BizTalk Community Blogs via Syndication
It has been a while since I have been to Perth and I am looking forward to catching up with some of the people I know there. I will be there for the week of the 4th – 8th of October teaching the SolidQ BI Bootcamp course, of if you are interested in catching up or doing some SQL training drop me an email.
by community-syndication | Sep 1, 2010 | BizTalk Community Blogs via Syndication
Today on endpoint.tv I showed how to create a workflow service that can do background work on a scheduled basis (The sample code is posted here). In the example I showed a web UI that allows you to start the job by clicking on a submit button.
Somebody asked me if there was a way to do this without a human starting the process. They wanted the system to automatically start the process whenever the app started up.
Yes there is a way and here is how you can do it. I decided to add some settings to web.config that would allow you to create an auto start counter.
Add the following to web.config
<configuration>
<appSettings>
<!-- The following will cause a batch process to start counting when the app auto-starts. -->
<!-- The format is (count to)|(delay)-->
<add key="AutoCount" value="1000|10"/>
</appSettings>
Add the following code to the Global.asax.cs file in the Application_Start method
private void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
string autoCount = ConfigurationManager.AppSettings["AutoCount"];
if (string.IsNullOrWhiteSpace(autoCount)) return;
var values = autoCount.Split('|');
// Check for valid value
if (values.Length != 2)
return;
int count;
if (!Int32.TryParse(values[0], out count)) return;
int delay;
if (!Int32.TryParse(values[1], out delay)) return;
var request = new BatchRequest
{
CountTo = count,
Delay = TimeSpan.FromSeconds(delay),
StartAt = DateTime.Now
};
var proxy = new BatchWorkerClient(new NetNamedPipeBinding(), new EndpointAddress("net.pipe://localhost/BatchWeb/BatchWorker.xamlx"));
try
{
var response = proxy.SubmitJob(request);
proxy.Close();
}
catch
{
proxy.Abort();
throw;
}
}
Then using IIS manager do the following
Enable named pipes
- Right click on the BatchWeb site and select Manage Application / Advanced Settings
- Add net.pipe to the list of enabled protocols
Enable Auto-Start
- Right click on the BatchWeb site and select Manage WCF and WF Services
- On the Auto-Start tab set the app to auto start
Now when the system boots (or the app pool recycles) the system will start a counting job. You might want to include a way to check and see if the batch work is already in process before starting another one. My code always starts up a new one.
by community-syndication | Sep 1, 2010 | BizTalk Community Blogs via Syndication
This blog post is about creating a custom BizTalk pipeline that allows the original data stream to be seekable. If the position of this stream is not reset when it’s returned then the message…
Daniel Berg’s blog about ASP.NET, EPiServer, SharePoint, BizTalk
by community-syndication | Sep 1, 2010 | BizTalk Community Blogs via Syndication
I’m Dad again for the second time . Baby Rachel arrived last week and is already alert and ready to take over the world. Just check out the picture. Well, I guess that pretty much squeezes down my community project bandwidth down to a minimum. This is going to be a long project. Western parents […]
by community-syndication | Sep 1, 2010 | BizTalk Community Blogs via Syndication
Running the Experimental Instance from Command Line Sometimes when running the experimental instance (for example when debugging a visual studio extension such as Feature Builder), the system throws error messages such as the error in following screenshot and asks us to run the application (that is, the experimental instance) on the command line with a […]
by community-syndication | Sep 1, 2010 | BizTalk Community Blogs via Syndication
My first post for our MCS Solution Development Blogis now live and it’s on the topic of Feature Builder. This is the first in a series of posts in which we will go deep into the Feature Builder tooling and explore all that it offers for building Feature Extensions. I’ll link to the posts here […]
by community-syndication | Sep 1, 2010 | BizTalk Community Blogs via Syndication
Integrating Agile methodology and User Experience Design has long been a challenge. This diagram shows how the two can work in harmony with each other to produce profitable products that meet the demands of stakeholders.
by community-syndication | Sep 1, 2010 | BizTalk Community Blogs via Syndication
Hi all
If you go to http://msdn.microsoft.com/en-us/biztalk/default.aspx you
can see that this month I am the featured BizTalk MVP – yeah
—
eliasen
by community-syndication | Sep 1, 2010 | BizTalk Community Blogs via Syndication
This diagram shows the stages and deliverables of the User Experience Design process.
by community-syndication | Sep 1, 2010 | BizTalk Community Blogs via Syndication
Sometimes you have work that you want to schedule for off-peak times or have happen on a recurring schedule, such as every 3 hours. While there are many ways to do this, Workflow Services are an interesting option. In this episode, I’ll show you how you can create a service that accepts start, stop, and query messages, and supports scheduling.
WF4 Batch Job Example (MSDN Code Gallery)
Ron Jacobs
blog http://blogs.msdn.com/rjacobs
twitter @ronljacobs