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.