I am trying to create a WF RuntimeHost Server kind of process. I think the description I wrote was not enough. I am using what you proposed to Invoke a WF with 4.0.
If my response answers your question, please mark it as the "Answer" by clicking that button above my post. I'm just looking for some details on how the new system works "under the hood." Hopefully it's not too much to ask of the MS WF team considering that we will have to likely rewrite our applications for WF 4.0 and I'd just like some time to think through things before it's out. Currently I use the runtime for things like logging startup, shutdown and service layer exceptions and I want to know how this would work on the new architecture. I spent a lot of time and effort learning the underlying architecture of 3.5 so that I could provide "under the hood" type insight for my clients and also I have a similar situation to Ammit where I've created a running server now and I want to know how I'd build a similar system in 4.0. I'm basically looking for "under the hood" details here. Thanks, Amy Thanks for trying to answer my question but as I am aware that the runtime is no longer available to interact with but as I said above I watched Kenny's PDC web talk online and he definitely showed the runtime as still being a part of the underlying architecture and I want to know how it fits into the picture. Check out this blog,, to see if it answers your questions and let me know if you have anything else specific you'd like to know about the new runtime. In WF4 we create individual workflow instances. Hi Ryan, In WF4 there is no longer a central WorkflowRuntime object. Would appriciate if someone can throw some light. If no then can i run a lot fo WFs on a single process? why does WF Runtime restrict me to the number of threads i can use on my machine WFs on my Duo Core with 3.5] what if my WFs are long running but quite lightweight I think i posted a lot of items related to WF Runtime.
but now there is only 1 WF Runtime per process that can run number WFs So if i want WF Runtime server like mechanism then i need to clone WF runtime hosting process and run a lot of WFs right? Do you see any performance hit while i do that? If yes then what it would be and what will you advise? Also in 3.5 each WF used to get hosted on a thread available in thread pool.
right now i am doing all that by myself through a WF runtime hosting application that listens to incoming jobs. where all i need to do is to tell WF Runtime Server that Execute WF X for me with param A and its WF Runtime's job is to make that run on the available server and all. I mean "WF Runtime Server" kind of thing. I want to make sure that MS workflow runtime has no feature available that can host a lot of WFs in a "server like manner". As of now wWe have written a mechnism to host them ourselves Hey, I have similar use case where we need a huge hosting framework for WF. > if no then can i run a lot fo WFs on a single process? Yes > why does WF Runtime restrict me to the number of threads i can use on my machine WFs on my Duo Core with 3.5] what if my WFs are long running but quite lightweight What restriction are you seeing? but now there is only 1 WF Runtime per process that can run number WFs No, you can have as many ActivityRuntimes in your app-domain as you want. You should use WorkflowInvoker.Invoke for the simple pattern of executing a volatile workflow with parameters just like you would a method > I can do similar thing in 4.0 as well. From another fork: > where all i need to do is to tell WF Runtime Server that Execute WF X for me with param A and its WF Runtime's job is to make that run on the available server and all. You can create bookmarks (continuations), schedule activities, resolve data, etc. More details at 3) ActivityExecutionContext is your activity-level ("internal facing") construct to interact with the runtime. Each host determines how that is provided, but at the lowest layer, ActivityRuntime takes a SynchronizationContext, will call synchronizationContext.Post() to kick off a "pulse" of work, runs as many work items as possible under that thread, and then yields when the workflow is idle. 2) Threading is all based on SynchronizationContext. The host provides an "externally facing" interface to the runtime. Host authors subclass ActivityRuntime in order to implement their host guts and expose a public facing surface (WorkflowServiceHost, WorkflowInvoker, and WorkflowInstance all do this). You have an instance of ActivityRuntime per workflow instance (in Beta2 we've renamed this class to WorkflowInstance to clearly reflect this). Whew, lots of questions on this thread :) I will eventually blog more on, but until I get more time for that, here are some quick notes: 1) In Beta1, is the lowest level interface into the WF runtime.