Like me, you may have read in various books and articles that there exists a restriction of one WorkflowRuntime instance for each App Domain. This is, in fact, not true. In an early beta release of WF such a restriction existed, and this fact has been perpetuated even though the restriction has long since been removed.

The following code sample is a simple demonstration to show that there is no problem creating multiple WorkflowRuntime instances. 

The Workflow1 class contains a code activity that writes a message to console and a delay activity that pauses for five seconds.

 

And the result:

 

 

Download the sample code: MultiRuntime.zip (27.55 kb)

 

 

Thanks go out to my learned colleague, Jeff Brokenshire, who brought it to my attention and pointed me to this blog post.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

Saturday, October 11, 2008 1:05 PM

Daniel Vaughan

Daniel Vaughan's .NET blog