- it doesn't unload workflows in memory
- it doesn't reset the workflow performance counters
Try it for yourself:
using(WorkflowRuntime workflowRuntime = new WorkflowRuntime())
{
workflowRuntime.AddService(new SqlWorkflowPersistenceService(Properties.Settings.Default.WorkflowPersistenceConnectionString));
WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(WorkflowConsoleApplication1.Workflow1));
instance.Start();
//workflowRuntime.StopRuntime(); // uncomment me to get the instance to be persisted
}
This is particularly unfortunate given all of the samples for WF (and the boilerplate code that gets created in new WF projects) just allow the runtime to be disposed when it drops out of scope. And needless to say it goes against the grain of how Dispose() works in practice: as a 'clean up gracefully' rather than just a 'free unmanaged resources' (think SqlConnections getting closed, Transactions being rolled back etc...)
https://connect.microsoft.com/wf/feedback/ViewFeedback.aspx?FeedbackID=224627
No comments:
Post a Comment