I'm using WorkflowFoundation 4.0 in WinForms application. When the user closes the form, the program doesn't exit because the workflow is running in background.
The workflow is created like this:
WorkflowApplication workflow = new WorkflowApplication(new myActivity());
workflow.Run();
I'd like to 'close' it in my FormClosing event. Which method should I use? Terminate
, Abort
or Cancel
?