Reputation: 1205
Hello and thanks for reading.
I'm having difficulty understanding the concept of how the runtime is used to execute workflows in the Windows Workflow Foundation. I would expect a single runtime to be hosted on a machine, and the workflows access this single instance in order to execute themselves. Does WWF operate in this manner? Most of the examples I find create a new WorkflowRuntime instance, execute a workflow, and then dispose of the runtime.
How would you use the WWF to operate a single hosted runtime in order to properly manage schedules, in the same manner as an application server? I feel that I'm misunderstanding the concept of how WWF is "supposed" to be used.
Any help is appreciated, thank you :)
Upvotes: 0
Views: 377
Reputation: 27632
WF4 uses a different workflow runtime for each workflow instance. You new up a WorkflowInvoker or WorkflowApplication for each workflow instance. If you use workflow services you create a single WorkflowServiceHost per workflow type and it manages each instance under the hood but they still have their own runtime components.
BTW WorkflowRuntime is a WF3 concept not a WF4 one.
Upvotes: 2