Home > NetFx3 > WorkflowWebRequestContext removed from WWF Beta 2.2

WorkflowWebRequestContext removed from WWF Beta 2.2

This came as a surprise to me. In fact, I was using WWF Beta 2 in my application, where my web service was triggering the workflow. In a web scenario, this class was really useful in ensuring that there was only one workflow runtime instance per app domain, which is otherwise slightly difficult to ensure. Last week, I came to know that this class has been removed in Beta 2.2. I decided to check out why Microsoft WWF team had decided to remove this type from the library.

When I started searching for some information on this, I hit upon this document, which talks about the Microsoft® Visual Studio® 2005 Extensions for Windows® Workflow Foundation Beta 2 to Beta 2.2 Key Changes. What this document says is that:

The WorkflowWebRequestContext type will be removed to protect the WorkflowRuntime being accessed by all of the workflow instances.

The following will be added to WorkflowWebService:

protected WorkflowRuntime WorkflowRuntime { get; }

 

One way to ensure that only one workflow runtime instance is present per app domain; is to instantiate the workflow runtime in the Global.asax application start event and use this instance across the application.

I have not personally used the WorkflowWebService class, but it represents the base class for all workflow Web services. So in my case I will have to inherit my web service class from WorkflowWebService class and then use the newly added protected WorkflowRuntime property to get the current instance of the workflow runtime. The WorkflowWebService class actually inherits from System.Web.Services.WebService class.

Advertisements
Categories: NetFx3
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: